{
  "contractName": "Buffer",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"A library for working with mutable byte buffers in Solidity. * Byte buffers are mutable and expandable, and provide a variety of primitives for writing to them. At any time you can fetch a bytes object containing the current contents of the buffer. The bytes object should not be stored between operations, as it may change due to resizing of the buffer.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@ensdomains/buffer/contracts/Buffer.sol\":\"Buffer\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"keccak256\":\"0x1264adbd06f6e05b04539bb225063a988b7fa90343d068de60cdde6cfb6fa92d\",\"urls\":[\"bzzr://8f1cb39e242b73bb7fac1f48bf0380ccccad14f06aae9cf4f87329cc78186122\"]}},\"version\":1}",
  "bytecode": "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820d9bf989cef3ee27766e4a228ac26960245aa7cc6dda309c2c6a6e6bcfa67d6580029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820d9bf989cef3ee27766e4a228ac26960245aa7cc6dda309c2c6a6e6bcfa67d6580029",
  "sourceMap": "403:10156:14:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24",
  "deployedSourceMap": "403:10156:14:-;;;;;;;;",
  "source": "pragma solidity >0.4.18;\n\n/**\n* @dev A library for working with mutable byte buffers in Solidity.\n*\n* Byte buffers are mutable and expandable, and provide a variety of primitives\n* for writing to them. At any time you can fetch a bytes object containing the\n* current contents of the buffer. The bytes object should not be stored between\n* operations, as it may change due to resizing of the buffer.\n*/\nlibrary Buffer {\n    /**\n    * @dev Represents a mutable buffer. Buffers have a current value (buf) and\n    *      a capacity. The capacity may be longer than the current value, in\n    *      which case it can be extended without the need to allocate more memory.\n    */\n    struct buffer {\n        bytes buf;\n        uint capacity;\n    }\n\n    /**\n    * @dev Initializes a buffer with an initial capacity.\n    * @param buf The buffer to initialize.\n    * @param capacity The number of bytes of space to allocate the buffer.\n    * @return The buffer, for chaining.\n    */\n    function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\n        if (capacity % 32 != 0) {\n            capacity += 32 - (capacity % 32);\n        }\n        // Allocate space for the buffer data\n        buf.capacity = capacity;\n        assembly {\n            let ptr := mload(0x40)\n            mstore(buf, ptr)\n            mstore(ptr, 0)\n            mstore(0x40, add(32, add(ptr, capacity)))\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Initializes a new buffer from an existing bytes object.\n    *      Changes to the buffer may mutate the original value.\n    * @param b The bytes object to initialize the buffer with.\n    * @return A new buffer.\n    */\n    function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n        buffer memory buf;\n        buf.buf = b;\n        buf.capacity = b.length;\n        return buf;\n    }\n\n    function resize(buffer memory buf, uint capacity) private pure {\n        bytes memory oldbuf = buf.buf;\n        init(buf, capacity);\n        append(buf, oldbuf);\n    }\n\n    function max(uint a, uint b) private pure returns(uint) {\n        if (a > b) {\n            return a;\n        }\n        return b;\n    }\n\n    /**\n    * @dev Sets buffer length to 0.\n    * @param buf The buffer to truncate.\n    * @return The original buffer, for chaining..\n    */\n    function truncate(buffer memory buf) internal pure returns (buffer memory) {\n        assembly {\n            let bufptr := mload(buf)\n            mstore(bufptr, 0)\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The start offset to write to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) {\n        require(len <= data.length);\n\n        if (off + len > buf.capacity) {\n            resize(buf, max(buf.capacity, len + off) * 2);\n        }\n\n        uint dest;\n        uint src;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Start address = buffer address + offset + sizeof(buffer length)\n            dest := add(add(bufptr, 32), off)\n            // Update buffer length if we're extending it\n            if gt(add(len, off), buflen) {\n                mstore(bufptr, add(len, off))\n            }\n            src := add(data, 32)\n        }\n\n        // Copy word-length chunks while possible\n        for (; len >= 32; len -= 32) {\n            assembly {\n                mstore(dest, mload(src))\n            }\n            dest += 32;\n            src += 32;\n        }\n\n        // Copy remaining bytes\n        uint mask = 256 ** (32 - len) - 1;\n        assembly {\n            let srcpart := and(mload(src), not(mask))\n            let destpart := and(mload(dest), mask)\n            mstore(dest, or(destpart, srcpart))\n        }\n\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, len);\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, data.length);\n    }\n\n    /**\n    * @dev Writes a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write the byte at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) {\n        if (off >= buf.capacity) {\n            resize(buf, buf.capacity * 2);\n        }\n\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Address = buffer address + sizeof(buffer length) + off\n            let dest := add(add(bufptr, off), 32)\n            mstore8(dest, data)\n            // Update buffer length if we extended it\n            if eq(off, buflen) {\n                mstore(bufptr, add(buflen, 1))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n        return writeUint8(buf, buf.buf.length, data);\n    }\n\n    /**\n    * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n    *      exceed the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (left-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, (len + off) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        // Right-align data\n        data = data >> (8 * (32 - len));\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + sizeof(buffer length) + off + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, off, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chhaining.\n    */\n    function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, 32);\n    }\n\n    /**\n    * @dev Writes an integer to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (right-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, (len + off) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + off + sizeof(buffer length) + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n\n    /**\n     * @dev Appends a byte to the end of the buffer. Resizes if doing so would\n     * exceed the capacity of the buffer.\n     * @param buf The buffer to append to.\n     * @param data The data to append.\n     * @return The original buffer.\n     */\n    function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\n        return writeInt(buf, buf.buf.length, data, len);\n    }\n}\n",
  "sourcePath": "@ensdomains/buffer/contracts/Buffer.sol",
  "ast": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        2360
      ]
    },
    "id": 2361,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1891,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:14"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@dev A library for working with mutable byte buffers in Solidity.\n* Byte buffers are mutable and expandable, and provide a variety of primitives\nfor writing to them. At any time you can fetch a bytes object containing the\ncurrent contents of the buffer. The bytes object should not be stored between\noperations, as it may change due to resizing of the buffer.",
        "fullyImplemented": true,
        "id": 2360,
        "linearizedBaseContracts": [
          2360
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 1896,
            "members": [
              {
                "constant": false,
                "id": 1893,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 1896,
                "src": "702:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 1892,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1895,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 1896,
                "src": "721:13:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 1894,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 2360,
            "src": "678:63:14",
            "visibility": "public"
          },
          {
            "body": {
              "id": 1930,
              "nodeType": "Block",
              "src": "1063:370:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1909,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1907,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 1905,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1900,
                        "src": "1077:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 1906,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 1908,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1920,
                  "nodeType": "IfStatement",
                  "src": "1073:81:14",
                  "trueBody": {
                    "id": 1919,
                    "nodeType": "Block",
                    "src": "1097:57:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1917,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 1910,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1900,
                            "src": "1111:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1916,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 1911,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1914,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 1912,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1900,
                                    "src": "1129:8:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 1913,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:14",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1915,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1918,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1925,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1921,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1898,
                        "src": "1209:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1923,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "1209:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1924,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1900,
                      "src": "1224:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1926,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 1898,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 1900,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1386:8:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1927,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    mstore(buf, ptr)\n    mstore(ptr, 0)\n    mstore(0x40, add(32, add(ptr, capacity)))\n}",
                  "src": "1242:165:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1928,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1898,
                    "src": "1423:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1904,
                  "id": 1929,
                  "nodeType": "Return",
                  "src": "1416:10:14"
                }
              ]
            },
            "documentation": "@dev Initializes a buffer with an initial capacity.\n@param buf The buffer to initialize.\n@param capacity The number of bytes of space to allocate the buffer.\n@return The buffer, for chaining.",
            "id": 1931,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1901,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1898,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "992:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1897,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "992:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1900,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "1011:13:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1899,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:14"
            },
            "returnParameters": {
              "id": 1904,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1903,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "1048:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1902,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1048:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:14"
            },
            "scope": 2360,
            "src": "978:455:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1956,
              "nodeType": "Block",
              "src": "1748:108:14",
              "statements": [
                {
                  "assignments": [
                    1939
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1939,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1956,
                      "src": "1758:17:14",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 1938,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 1896,
                        "src": "1758:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1940,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1945,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1941,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1939,
                        "src": "1785:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1943,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1893,
                      "src": "1785:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1944,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1933,
                      "src": "1795:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 1946,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1952,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1947,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1939,
                        "src": "1806:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1949,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "1806:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1950,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1933,
                        "src": "1821:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 1951,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1821:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1953,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1954,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1939,
                    "src": "1846:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1937,
                  "id": 1955,
                  "nodeType": "Return",
                  "src": "1839:10:14"
                }
              ]
            },
            "documentation": "@dev Initializes a new buffer from an existing bytes object.\n     Changes to the buffer may mutate the original value.\n@param b The bytes object to initialize the buffer with.\n@return A new buffer.",
            "id": 1957,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1934,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1933,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1957,
                  "src": "1695:14:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1932,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:14"
            },
            "returnParameters": {
              "id": 1937,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1936,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1957,
                  "src": "1733:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1935,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1733:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:14"
            },
            "scope": 2360,
            "src": "1676:180:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1979,
              "nodeType": "Block",
              "src": "1925:104:14",
              "statements": [
                {
                  "assignments": [
                    1965
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1965,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1979,
                      "src": "1935:19:14",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1964,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1968,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 1966,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1959,
                      "src": "1957:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 1967,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 1893,
                    "src": "1957:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1959,
                        "src": "1979:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1971,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1961,
                        "src": "1984:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1969,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1931,
                      "src": "1974:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1972,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1973,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1975,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1959,
                        "src": "2010:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1976,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1965,
                        "src": "2015:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 1974,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2112,
                        2132
                      ],
                      "referencedDeclaration": 2132,
                      "src": "2003:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1977,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1978,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:14"
                }
              ]
            },
            "documentation": null,
            "id": 1980,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1962,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1959,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1980,
                  "src": "1878:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1958,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1878:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1961,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1980,
                  "src": "1897:13:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1960,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:14"
            },
            "returnParameters": {
              "id": 1963,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:14"
            },
            "scope": 2360,
            "src": "1862:167:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1998,
              "nodeType": "Block",
              "src": "2091:78:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1991,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 1989,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1982,
                      "src": "2105:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 1990,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1984,
                      "src": "2109:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1995,
                  "nodeType": "IfStatement",
                  "src": "2101:44:14",
                  "trueBody": {
                    "id": 1994,
                    "nodeType": "Block",
                    "src": "2112:33:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1992,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1982,
                          "src": "2133:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1988,
                        "id": 1993,
                        "nodeType": "Return",
                        "src": "2126:8:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1996,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1984,
                    "src": "2161:1:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1988,
                  "id": 1997,
                  "nodeType": "Return",
                  "src": "2154:8:14"
                }
              ]
            },
            "documentation": null,
            "id": 1999,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1985,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1982,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2048:6:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1981,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1984,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2056:6:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1983,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:14"
            },
            "returnParameters": {
              "id": 1988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1987,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2085:4:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1986,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:14"
            },
            "scope": 2360,
            "src": "2035:134:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2009,
              "nodeType": "Block",
              "src": "2392:123:14",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2001,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2445:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2006,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2402:87:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2001,
                    "src": "2505:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2005,
                  "id": 2008,
                  "nodeType": "Return",
                  "src": "2498:10:14"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 2010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2002,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2001,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2010,
                  "src": "2335:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2000,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2335:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:14"
            },
            "returnParameters": {
              "id": 2005,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2004,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2010,
                  "src": "2377:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2003,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2377:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:14"
            },
            "scope": 2360,
            "src": "2317:198:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2090,
              "nodeType": "Block",
              "src": "2985:1216:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 2027,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2024,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2018,
                          "src": "3003:3:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2025,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2016,
                            "src": "3010:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 2026,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3010:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2023,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4136,
                        4137
                      ],
                      "referencedDeclaration": 4136,
                      "src": "2995:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2028,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2029,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:14"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2035,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2032,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2030,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2014,
                        "src": "3037:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2031,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2018,
                        "src": "3043:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2033,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2012,
                        "src": "3049:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2034,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "3049:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2050,
                  "nodeType": "IfStatement",
                  "src": "3033:100:14",
                  "trueBody": {
                    "id": 2049,
                    "nodeType": "Block",
                    "src": "3063:70:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2037,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2012,
                              "src": "3084:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2046,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2039,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2012,
                                      "src": "3093:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 2040,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1895,
                                    "src": "3093:12:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2043,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2041,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2018,
                                      "src": "3107:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2042,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2014,
                                      "src": "3113:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 2038,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1999,
                                  "src": "3089:3:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 2044,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2045,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2036,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "3077:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2047,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2048,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2052
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2052,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3143:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2051,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2053,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:14"
                },
                {
                  "assignments": [
                    2055
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2055,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3162:8:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2054,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2056,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2012,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3272:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3454:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2018,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3568:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3573:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3483:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 2055,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3661:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2018,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3624:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3629:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2016,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3672:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2057,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    dest := add(add(bufptr, 32), off)\n    if gt(add(len, off), buflen)\n    {\n        mstore(bufptr, add(len, off))\n    }\n    src := add(data, 32)\n}",
                  "src": "3180:511:14"
                },
                {
                  "body": {
                    "id": 2074,
                    "nodeType": "Block",
                    "src": "3780:136:14",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "src": {
                              "declaration": 2055,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3840:3:14",
                              "valueSize": 1
                            }
                          },
                          {
                            "dest": {
                              "declaration": 2052,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3828:4:14",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 2065,
                        "nodeType": "InlineAssembly",
                        "operations": "{\n    mstore(dest, mload(src))\n}",
                        "src": "3794:65:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 2068,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 2066,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2052,
                            "src": "3872:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 2067,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:14",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2069,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 2072,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 2070,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2055,
                            "src": "3896:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 2071,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:14",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2073,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:14"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2060,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2058,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2018,
                      "src": "3758:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 2059,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2075,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2063,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2061,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2018,
                        "src": "3769:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 2062,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2064,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:14"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:14"
                },
                {
                  "assignments": [
                    2077
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2077,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3958:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2076,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2086,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2085,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2083,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2078,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 2081,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 2079,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 2080,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2018,
                              "src": "3983:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 2082,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2084,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:14"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 2055,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4049:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4059:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4104:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4111:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4136:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2087,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let srcpart := and(mload(src), not(mask))\n    let destpart := and(mload(dest), mask)\n    mstore(dest, or(destpart, srcpart))\n}",
                  "src": "4001:173:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2088,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2012,
                    "src": "4191:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2022,
                  "id": 2089,
                  "nodeType": "Return",
                  "src": "4184:10:14"
                }
              ]
            },
            "documentation": "@dev Writes a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The start offset to write to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 2091,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2019,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2012,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2890:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2011,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2890:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2014,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2909:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2013,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2016,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2919:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2015,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2018,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2938:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2017,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:14"
            },
            "returnParameters": {
              "id": 2022,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2021,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2970:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2020,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2970:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:14"
            },
            "scope": 2360,
            "src": "2875:1326:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2111,
              "nodeType": "Block",
              "src": "4617:61:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2103,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2093,
                        "src": "4640:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2104,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2093,
                            "src": "4645:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2105,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "4645:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2106,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4645:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2107,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2095,
                        "src": "4661:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2108,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2097,
                        "src": "4667:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2102,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2091,
                      "src": "4634:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2109,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2101,
                  "id": 2110,
                  "nodeType": "Return",
                  "src": "4627:44:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 2112,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2098,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2093,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4531:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2092,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4531:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2095,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4550:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2094,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2097,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4569:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2096,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:14"
            },
            "returnParameters": {
              "id": 2101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2100,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4602:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2099,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4602:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:14"
            },
            "scope": 2360,
            "src": "4515:163:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2131,
              "nodeType": "Block",
              "src": "5038:69:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2122,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2114,
                        "src": "5061:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2123,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2114,
                            "src": "5066:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2124,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "5066:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2125,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5066:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2126,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2116,
                        "src": "5082:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2127,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2116,
                          "src": "5088:4:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2128,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5088:11:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2121,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2091,
                      "src": "5055:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2129,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2120,
                  "id": 2130,
                  "nodeType": "Return",
                  "src": "5048:52:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2132,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2117,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2114,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "4962:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2113,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4962:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2116,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "4981:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2115,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:14"
            },
            "returnParameters": {
              "id": 2120,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2119,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "5023:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2118,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5023:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:14"
            },
            "scope": 2360,
            "src": "4946:161:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2160,
              "nodeType": "Block",
              "src": "5517:617:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2146,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2143,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2136,
                      "src": "5531:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2144,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2134,
                        "src": "5538:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2145,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "5538:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2156,
                  "nodeType": "IfStatement",
                  "src": "5527:79:14",
                  "trueBody": {
                    "id": 2155,
                    "nodeType": "Block",
                    "src": "5552:54:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2148,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2134,
                              "src": "5573:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2152,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2149,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2134,
                                  "src": "5578:3:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 2150,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1895,
                                "src": "5578:12:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2151,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2147,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "5566:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2153,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2154,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:14"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2134,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5708:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6023:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5909:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2138,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5945:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2157,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    let dest := add(add(bufptr, off), 32)\n    mstore8(dest, data)\n    if eq(off, buflen)\n    {\n        mstore(bufptr, add(buflen, 1))\n    }\n}",
                  "src": "5616:492:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2158,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2134,
                    "src": "6124:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2142,
                  "id": 2159,
                  "nodeType": "Return",
                  "src": "6117:10:14"
                }
              ]
            },
            "documentation": "@dev Writes a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write the byte at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2161,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2139,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2134,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5439:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2133,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5439:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2136,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5458:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2135,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2138,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5468:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2137,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:14"
            },
            "returnParameters": {
              "id": 2142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5502:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2140,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5502:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:14"
            },
            "scope": 2360,
            "src": "5419:715:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2178,
              "nodeType": "Block",
              "src": "6486:61:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2171,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2163,
                        "src": "6514:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2172,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2163,
                            "src": "6519:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2173,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "6519:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2174,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6519:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2175,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2165,
                        "src": "6535:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2170,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2161,
                      "src": "6503:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2176,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2169,
                  "id": 2177,
                  "nodeType": "Return",
                  "src": "6496:44:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2179,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2166,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2163,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6418:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2162,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6418:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2165,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6437:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2164,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:14"
            },
            "returnParameters": {
              "id": 2169,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2168,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6471:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2167,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6471:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:14"
            },
            "scope": 2360,
            "src": "6397:150:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2233,
              "nodeType": "Block",
              "src": "7024:695:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2197,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2194,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2192,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2187,
                        "src": "7038:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2193,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2183,
                        "src": "7044:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2195,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2181,
                        "src": "7050:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2196,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "7050:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2209,
                  "nodeType": "IfStatement",
                  "src": "7034:83:14",
                  "trueBody": {
                    "id": 2208,
                    "nodeType": "Block",
                    "src": "7064:53:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2199,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2181,
                              "src": "7085:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2205,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2202,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2200,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2187,
                                      "src": "7091:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2201,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2183,
                                      "src": "7097:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 2203,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2204,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2198,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "7078:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2206,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2207,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2211
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2211,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2233,
                      "src": "7127:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2210,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2217,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2216,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2214,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2212,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2213,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2187,
                        "src": "7146:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2215,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2228,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2218,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2185,
                      "src": "7191:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 2227,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2219,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2185,
                        "src": "7198:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 2225,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 2220,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 2223,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 2221,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:14",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 2222,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2187,
                                    "src": "7217:3:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 2224,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 2226,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 2229,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2181,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7324:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2211,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7505:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7445:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7451:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7596:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7601:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2185,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7513:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7659:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7664:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2230,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "7232:461:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2231,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2181,
                    "src": "7709:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2191,
                  "id": 2232,
                  "nodeType": "Return",
                  "src": "7702:10:14"
                }
              ]
            },
            "documentation": "@dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n     exceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (left-aligned).\n@return The original buffer, for chaining.",
            "id": 2234,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2188,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2181,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6935:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2180,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6935:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2183,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6954:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2182,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2185,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6964:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2184,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2187,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6978:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2186,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:14"
            },
            "returnParameters": {
              "id": 2191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2190,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "7009:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2189,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "7009:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:14"
            },
            "scope": 2360,
            "src": "6920:799:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2254,
              "nodeType": "Block",
              "src": "8128:58:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2246,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2236,
                        "src": "8151:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2247,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2238,
                        "src": "8156:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2249,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2240,
                            "src": "8169:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 2248,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 2250,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 2251,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        }
                      ],
                      "id": 2245,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8145:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2252,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2244,
                  "id": 2253,
                  "nodeType": "Return",
                  "src": "8138:41:14"
                }
              ]
            },
            "documentation": "@dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2255,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2241,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2236,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8047:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2235,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8047:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2238,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8066:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2237,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2240,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8076:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 2239,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:14"
            },
            "returnParameters": {
              "id": 2244,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2243,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8113:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2242,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8113:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:14"
            },
            "scope": 2360,
            "src": "8025:161:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2275,
              "nodeType": "Block",
              "src": "8547:69:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2265,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2257,
                        "src": "8570:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2266,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2257,
                            "src": "8575:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2267,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "8575:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2268,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8575:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2270,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2259,
                            "src": "8599:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 2269,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 2271,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 2272,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        }
                      ],
                      "id": 2264,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8564:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2273,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2263,
                  "id": 2274,
                  "nodeType": "Return",
                  "src": "8557:52:14"
                }
              ]
            },
            "documentation": "@dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chhaining.",
            "id": 2276,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2260,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2257,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8476:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2256,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8476:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2259,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8495:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 2258,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:14"
            },
            "returnParameters": {
              "id": 2263,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2262,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8532:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2261,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8532:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:14"
            },
            "scope": 2360,
            "src": "8453:163:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2294,
              "nodeType": "Block",
              "src": "8976:60:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2286,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2278,
                        "src": "8999:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2287,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2278,
                            "src": "9004:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2288,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "9004:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2289,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9004:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2290,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2280,
                        "src": "9020:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 2291,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        }
                      ],
                      "id": 2285,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8993:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2292,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2284,
                  "id": 2293,
                  "nodeType": "Return",
                  "src": "8986:43:14"
                }
              ]
            },
            "documentation": "@dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2295,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2281,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2278,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8905:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2277,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8905:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2280,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8924:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2279,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:14"
            },
            "returnParameters": {
              "id": 2284,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2283,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8961:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2282,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8961:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:14"
            },
            "scope": 2360,
            "src": "8882:154:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2337,
              "nodeType": "Block",
              "src": "9510:626:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2313,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2310,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2308,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2303,
                        "src": "9524:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2309,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2299,
                        "src": "9530:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2311,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2297,
                        "src": "9536:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2312,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "9536:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2325,
                  "nodeType": "IfStatement",
                  "src": "9520:83:14",
                  "trueBody": {
                    "id": 2324,
                    "nodeType": "Block",
                    "src": "9550:53:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2315,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2297,
                              "src": "9571:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2321,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2318,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2316,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2303,
                                      "src": "9577:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2317,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2299,
                                      "src": "9583:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 2319,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2320,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2314,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "9564:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2322,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2323,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2327
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2327,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2337,
                      "src": "9613:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2326,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2333,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2330,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2328,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2329,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2303,
                        "src": "9632:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2331,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2297,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9741:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2327,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9922:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9862:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9868:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10013:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10018:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2301,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9930:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10076:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10081:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2334,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "9649:461:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2335,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2297,
                    "src": "10126:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2307,
                  "id": 2336,
                  "nodeType": "Return",
                  "src": "10119:10:14"
                }
              ]
            },
            "documentation": "@dev Writes an integer to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (right-aligned).\n@return The original buffer, for chaining.",
            "id": 2338,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2304,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2297,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9424:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2296,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "9424:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2299,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9443:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2298,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2301,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9453:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2300,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2303,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9464:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2302,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:14"
            },
            "returnParameters": {
              "id": 2307,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2306,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9495:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2305,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "9495:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:14"
            },
            "scope": 2360,
            "src": "9406:730:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2358,
              "nodeType": "Block",
              "src": "10493:64:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2350,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2340,
                        "src": "10519:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2351,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2340,
                            "src": "10524:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2352,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "10524:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2353,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "10524:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2354,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2342,
                        "src": "10540:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2355,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2344,
                        "src": "10546:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2349,
                      "name": "writeInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2338,
                      "src": "10510:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint256,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2356,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10510:40:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2348,
                  "id": 2357,
                  "nodeType": "Return",
                  "src": "10503:47:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the end of the buffer. Resizes if doing so would\nexceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer.",
            "id": 2359,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2345,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2340,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10416:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2339,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "10416:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2342,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10435:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2341,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10435:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2344,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10446:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2343,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10446:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10415:40:14"
            },
            "returnParameters": {
              "id": 2348,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2347,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10478:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2346,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "10478:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10477:15:14"
            },
            "scope": 2360,
            "src": "10397:160:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 2361,
        "src": "403:10156:14"
      }
    ],
    "src": "0:10560:14"
  },
  "legacyAST": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        2360
      ]
    },
    "id": 2361,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 1891,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:14"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@dev A library for working with mutable byte buffers in Solidity.\n* Byte buffers are mutable and expandable, and provide a variety of primitives\nfor writing to them. At any time you can fetch a bytes object containing the\ncurrent contents of the buffer. The bytes object should not be stored between\noperations, as it may change due to resizing of the buffer.",
        "fullyImplemented": true,
        "id": 2360,
        "linearizedBaseContracts": [
          2360
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 1896,
            "members": [
              {
                "constant": false,
                "id": 1893,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 1896,
                "src": "702:9:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 1892,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 1895,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 1896,
                "src": "721:13:14",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 1894,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:14",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 2360,
            "src": "678:63:14",
            "visibility": "public"
          },
          {
            "body": {
              "id": 1930,
              "nodeType": "Block",
              "src": "1063:370:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1909,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1907,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 1905,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1900,
                        "src": "1077:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 1906,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 1908,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1920,
                  "nodeType": "IfStatement",
                  "src": "1073:81:14",
                  "trueBody": {
                    "id": 1919,
                    "nodeType": "Block",
                    "src": "1097:57:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1917,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 1910,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1900,
                            "src": "1111:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1916,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 1911,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1914,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 1912,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1900,
                                    "src": "1129:8:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 1913,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:14",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1915,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1918,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1925,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1921,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1898,
                        "src": "1209:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1923,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "1209:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1924,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1900,
                      "src": "1224:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1926,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 1898,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 1900,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1386:8:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1927,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    mstore(buf, ptr)\n    mstore(ptr, 0)\n    mstore(0x40, add(32, add(ptr, capacity)))\n}",
                  "src": "1242:165:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1928,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1898,
                    "src": "1423:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1904,
                  "id": 1929,
                  "nodeType": "Return",
                  "src": "1416:10:14"
                }
              ]
            },
            "documentation": "@dev Initializes a buffer with an initial capacity.\n@param buf The buffer to initialize.\n@param capacity The number of bytes of space to allocate the buffer.\n@return The buffer, for chaining.",
            "id": 1931,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1901,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1898,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "992:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1897,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "992:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1900,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "1011:13:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1899,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:14"
            },
            "returnParameters": {
              "id": 1904,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1903,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1931,
                  "src": "1048:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1902,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1048:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:14"
            },
            "scope": 2360,
            "src": "978:455:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1956,
              "nodeType": "Block",
              "src": "1748:108:14",
              "statements": [
                {
                  "assignments": [
                    1939
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1939,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1956,
                      "src": "1758:17:14",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 1938,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 1896,
                        "src": "1758:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1940,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1945,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1941,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1939,
                        "src": "1785:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1943,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1893,
                      "src": "1785:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 1944,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1933,
                      "src": "1795:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 1946,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1952,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1947,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1939,
                        "src": "1806:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1949,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "1806:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1950,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1933,
                        "src": "1821:1:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 1951,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1821:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1953,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1954,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1939,
                    "src": "1846:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1937,
                  "id": 1955,
                  "nodeType": "Return",
                  "src": "1839:10:14"
                }
              ]
            },
            "documentation": "@dev Initializes a new buffer from an existing bytes object.\n     Changes to the buffer may mutate the original value.\n@param b The bytes object to initialize the buffer with.\n@return A new buffer.",
            "id": 1957,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1934,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1933,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1957,
                  "src": "1695:14:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1932,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:14"
            },
            "returnParameters": {
              "id": 1937,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1936,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1957,
                  "src": "1733:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1935,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1733:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:14"
            },
            "scope": 2360,
            "src": "1676:180:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1979,
              "nodeType": "Block",
              "src": "1925:104:14",
              "statements": [
                {
                  "assignments": [
                    1965
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1965,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1979,
                      "src": "1935:19:14",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1964,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1968,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 1966,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1959,
                      "src": "1957:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 1967,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 1893,
                    "src": "1957:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1959,
                        "src": "1979:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1971,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1961,
                        "src": "1984:8:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1969,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1931,
                      "src": "1974:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1972,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1973,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1975,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1959,
                        "src": "2010:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1976,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1965,
                        "src": "2015:6:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 1974,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2112,
                        2132
                      ],
                      "referencedDeclaration": 2132,
                      "src": "2003:6:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1977,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1978,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:14"
                }
              ]
            },
            "documentation": null,
            "id": 1980,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1962,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1959,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1980,
                  "src": "1878:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1958,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "1878:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1961,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1980,
                  "src": "1897:13:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1960,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:14"
            },
            "returnParameters": {
              "id": 1963,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:14"
            },
            "scope": 2360,
            "src": "1862:167:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1998,
              "nodeType": "Block",
              "src": "2091:78:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1991,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 1989,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1982,
                      "src": "2105:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 1990,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1984,
                      "src": "2109:1:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1995,
                  "nodeType": "IfStatement",
                  "src": "2101:44:14",
                  "trueBody": {
                    "id": 1994,
                    "nodeType": "Block",
                    "src": "2112:33:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 1992,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1982,
                          "src": "2133:1:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1988,
                        "id": 1993,
                        "nodeType": "Return",
                        "src": "2126:8:14"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1996,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1984,
                    "src": "2161:1:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1988,
                  "id": 1997,
                  "nodeType": "Return",
                  "src": "2154:8:14"
                }
              ]
            },
            "documentation": null,
            "id": 1999,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1985,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1982,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2048:6:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1981,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1984,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2056:6:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1983,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:14"
            },
            "returnParameters": {
              "id": 1988,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1987,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1999,
                  "src": "2085:4:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1986,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:14"
            },
            "scope": 2360,
            "src": "2035:134:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2009,
              "nodeType": "Block",
              "src": "2392:123:14",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2001,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2445:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2006,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2402:87:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2001,
                    "src": "2505:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2005,
                  "id": 2008,
                  "nodeType": "Return",
                  "src": "2498:10:14"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 2010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2002,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2001,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2010,
                  "src": "2335:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2000,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2335:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:14"
            },
            "returnParameters": {
              "id": 2005,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2004,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2010,
                  "src": "2377:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2003,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2377:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:14"
            },
            "scope": 2360,
            "src": "2317:198:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2090,
              "nodeType": "Block",
              "src": "2985:1216:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 2027,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 2024,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2018,
                          "src": "3003:3:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2025,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2016,
                            "src": "3010:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 2026,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3010:11:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 2023,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4136,
                        4137
                      ],
                      "referencedDeclaration": 4136,
                      "src": "2995:7:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 2028,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2029,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:14"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2035,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2032,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2030,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2014,
                        "src": "3037:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2031,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2018,
                        "src": "3043:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2033,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2012,
                        "src": "3049:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2034,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "3049:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2050,
                  "nodeType": "IfStatement",
                  "src": "3033:100:14",
                  "trueBody": {
                    "id": 2049,
                    "nodeType": "Block",
                    "src": "3063:70:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2037,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2012,
                              "src": "3084:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2046,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 2039,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2012,
                                      "src": "3093:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 2040,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 1895,
                                    "src": "3093:12:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2043,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2041,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2018,
                                      "src": "3107:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2042,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2014,
                                      "src": "3113:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 2038,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1999,
                                  "src": "3089:3:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 2044,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2045,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2036,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "3077:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2047,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2048,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2052
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2052,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3143:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2051,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2053,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:14"
                },
                {
                  "assignments": [
                    2055
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2055,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3162:8:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2054,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2056,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2012,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3272:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3454:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2018,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3568:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3573:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3483:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 2055,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3661:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2018,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3624:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2014,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3629:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2016,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3672:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2057,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    dest := add(add(bufptr, 32), off)\n    if gt(add(len, off), buflen)\n    {\n        mstore(bufptr, add(len, off))\n    }\n    src := add(data, 32)\n}",
                  "src": "3180:511:14"
                },
                {
                  "body": {
                    "id": 2074,
                    "nodeType": "Block",
                    "src": "3780:136:14",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "src": {
                              "declaration": 2055,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3840:3:14",
                              "valueSize": 1
                            }
                          },
                          {
                            "dest": {
                              "declaration": 2052,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3828:4:14",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 2065,
                        "nodeType": "InlineAssembly",
                        "operations": "{\n    mstore(dest, mload(src))\n}",
                        "src": "3794:65:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 2068,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 2066,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2052,
                            "src": "3872:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 2067,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:14",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2069,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:14"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 2072,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 2070,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2055,
                            "src": "3896:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 2071,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:14",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 2073,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:14"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2060,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2058,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2018,
                      "src": "3758:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 2059,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2075,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2063,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 2061,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2018,
                        "src": "3769:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 2062,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2064,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:14"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:14"
                },
                {
                  "assignments": [
                    2077
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2077,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2090,
                      "src": "3958:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2076,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2086,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2085,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2083,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2078,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 2081,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 2079,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 2080,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2018,
                              "src": "3983:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 2082,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2084,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:14"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 2055,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4049:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4059:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4104:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4111:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 2052,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4136:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2087,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let srcpart := and(mload(src), not(mask))\n    let destpart := and(mload(dest), mask)\n    mstore(dest, or(destpart, srcpart))\n}",
                  "src": "4001:173:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2088,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2012,
                    "src": "4191:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2022,
                  "id": 2089,
                  "nodeType": "Return",
                  "src": "4184:10:14"
                }
              ]
            },
            "documentation": "@dev Writes a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The start offset to write to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 2091,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2019,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2012,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2890:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2011,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2890:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2014,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2909:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2013,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2016,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2919:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2015,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2018,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2938:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2017,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:14"
            },
            "returnParameters": {
              "id": 2022,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2021,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2091,
                  "src": "2970:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2020,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "2970:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:14"
            },
            "scope": 2360,
            "src": "2875:1326:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2111,
              "nodeType": "Block",
              "src": "4617:61:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2103,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2093,
                        "src": "4640:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2104,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2093,
                            "src": "4645:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2105,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "4645:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2106,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4645:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2107,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2095,
                        "src": "4661:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2108,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2097,
                        "src": "4667:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2102,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2091,
                      "src": "4634:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2109,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2101,
                  "id": 2110,
                  "nodeType": "Return",
                  "src": "4627:44:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 2112,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2098,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2093,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4531:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2092,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4531:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2095,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4550:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2094,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2097,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4569:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2096,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:14"
            },
            "returnParameters": {
              "id": 2101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2100,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2112,
                  "src": "4602:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2099,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4602:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:14"
            },
            "scope": 2360,
            "src": "4515:163:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2131,
              "nodeType": "Block",
              "src": "5038:69:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2122,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2114,
                        "src": "5061:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2123,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2114,
                            "src": "5066:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2124,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "5066:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2125,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5066:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2126,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2116,
                        "src": "5082:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 2127,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2116,
                          "src": "5088:4:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2128,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5088:11:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2121,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2091,
                      "src": "5055:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2129,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2120,
                  "id": 2130,
                  "nodeType": "Return",
                  "src": "5048:52:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2132,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2117,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2114,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "4962:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2113,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "4962:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2116,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "4981:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 2115,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:14"
            },
            "returnParameters": {
              "id": 2120,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2119,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2132,
                  "src": "5023:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2118,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5023:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:14"
            },
            "scope": 2360,
            "src": "4946:161:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2160,
              "nodeType": "Block",
              "src": "5517:617:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2146,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2143,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2136,
                      "src": "5531:3:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2144,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2134,
                        "src": "5538:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2145,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "5538:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2156,
                  "nodeType": "IfStatement",
                  "src": "5527:79:14",
                  "trueBody": {
                    "id": 2155,
                    "nodeType": "Block",
                    "src": "5552:54:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2148,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2134,
                              "src": "5573:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2152,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 2149,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 2134,
                                  "src": "5578:3:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 2150,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 1895,
                                "src": "5578:12:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2151,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2147,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "5566:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2153,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2154,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:14"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2134,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5708:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6023:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2136,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5909:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2138,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5945:4:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2157,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    let dest := add(add(bufptr, off), 32)\n    mstore8(dest, data)\n    if eq(off, buflen)\n    {\n        mstore(bufptr, add(buflen, 1))\n    }\n}",
                  "src": "5616:492:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2158,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2134,
                    "src": "6124:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2142,
                  "id": 2159,
                  "nodeType": "Return",
                  "src": "6117:10:14"
                }
              ]
            },
            "documentation": "@dev Writes a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write the byte at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2161,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2139,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2134,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5439:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2133,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5439:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2136,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5458:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2135,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2138,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5468:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2137,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:14"
            },
            "returnParameters": {
              "id": 2142,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2141,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2161,
                  "src": "5502:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2140,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "5502:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:14"
            },
            "scope": 2360,
            "src": "5419:715:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2178,
              "nodeType": "Block",
              "src": "6486:61:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2171,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2163,
                        "src": "6514:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2172,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2163,
                            "src": "6519:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2173,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "6519:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2174,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6519:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2175,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2165,
                        "src": "6535:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 2170,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2161,
                      "src": "6503:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2176,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2169,
                  "id": 2177,
                  "nodeType": "Return",
                  "src": "6496:44:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2179,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2166,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2163,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6418:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2162,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6418:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2165,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6437:10:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 2164,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:14"
            },
            "returnParameters": {
              "id": 2169,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2168,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2179,
                  "src": "6471:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2167,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6471:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:14"
            },
            "scope": 2360,
            "src": "6397:150:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2233,
              "nodeType": "Block",
              "src": "7024:695:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2197,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2194,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2192,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2187,
                        "src": "7038:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2193,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2183,
                        "src": "7044:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2195,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2181,
                        "src": "7050:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2196,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "7050:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2209,
                  "nodeType": "IfStatement",
                  "src": "7034:83:14",
                  "trueBody": {
                    "id": 2208,
                    "nodeType": "Block",
                    "src": "7064:53:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2199,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2181,
                              "src": "7085:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2205,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2202,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2200,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2187,
                                      "src": "7091:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2201,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2183,
                                      "src": "7097:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 2203,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2204,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2198,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "7078:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2206,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2207,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2211
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2211,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2233,
                      "src": "7127:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2210,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2217,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2216,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2214,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2212,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2213,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2187,
                        "src": "7146:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2215,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2228,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 2218,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2185,
                      "src": "7191:4:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 2227,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2219,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2185,
                        "src": "7198:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 2225,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 2220,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:14",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 2223,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 2221,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:14",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 2222,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 2187,
                                    "src": "7217:3:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:14",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 2224,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 2226,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 2229,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2181,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7324:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2211,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7505:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7445:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7451:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7596:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7601:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2185,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7513:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2183,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7659:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2187,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7664:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2230,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "7232:461:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2231,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2181,
                    "src": "7709:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2191,
                  "id": 2232,
                  "nodeType": "Return",
                  "src": "7702:10:14"
                }
              ]
            },
            "documentation": "@dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n     exceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (left-aligned).\n@return The original buffer, for chaining.",
            "id": 2234,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2188,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2181,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6935:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2180,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "6935:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2183,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6954:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2182,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2185,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6964:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2184,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2187,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "6978:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2186,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:14"
            },
            "returnParameters": {
              "id": 2191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2190,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2234,
                  "src": "7009:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2189,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "7009:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:14"
            },
            "scope": 2360,
            "src": "6920:799:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2254,
              "nodeType": "Block",
              "src": "8128:58:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2246,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2236,
                        "src": "8151:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2247,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2238,
                        "src": "8156:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2249,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2240,
                            "src": "8169:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 2248,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 2250,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 2251,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        }
                      ],
                      "id": 2245,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8145:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2252,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2244,
                  "id": 2253,
                  "nodeType": "Return",
                  "src": "8138:41:14"
                }
              ]
            },
            "documentation": "@dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2255,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2241,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2236,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8047:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2235,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8047:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2238,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8066:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2237,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2240,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8076:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 2239,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:14"
            },
            "returnParameters": {
              "id": 2244,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2243,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2255,
                  "src": "8113:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2242,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8113:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:14"
            },
            "scope": 2360,
            "src": "8025:161:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2275,
              "nodeType": "Block",
              "src": "8547:69:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2265,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2257,
                        "src": "8570:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2266,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2257,
                            "src": "8575:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2267,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "8575:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2268,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8575:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 2270,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2259,
                            "src": "8599:4:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 2269,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 2271,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 2272,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        }
                      ],
                      "id": 2264,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8564:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2273,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2263,
                  "id": 2274,
                  "nodeType": "Return",
                  "src": "8557:52:14"
                }
              ]
            },
            "documentation": "@dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chhaining.",
            "id": 2276,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2260,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2257,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8476:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2256,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8476:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2259,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8495:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 2258,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:14"
            },
            "returnParameters": {
              "id": 2263,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2262,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2276,
                  "src": "8532:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2261,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8532:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:14"
            },
            "scope": 2360,
            "src": "8453:163:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2294,
              "nodeType": "Block",
              "src": "8976:60:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2286,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2278,
                        "src": "8999:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2287,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2278,
                            "src": "9004:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2288,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "9004:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2289,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9004:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2290,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2280,
                        "src": "9020:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 2291,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        }
                      ],
                      "id": 2285,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2091,
                        2234
                      ],
                      "referencedDeclaration": 2234,
                      "src": "8993:5:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2292,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2284,
                  "id": 2293,
                  "nodeType": "Return",
                  "src": "8986:43:14"
                }
              ]
            },
            "documentation": "@dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 2295,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2281,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2278,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8905:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2277,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8905:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2280,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8924:12:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2279,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:14"
            },
            "returnParameters": {
              "id": 2284,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2283,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2295,
                  "src": "8961:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2282,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "8961:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:14"
            },
            "scope": 2360,
            "src": "8882:154:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 2337,
              "nodeType": "Block",
              "src": "9510:626:14",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2313,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2310,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 2308,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2303,
                        "src": "9524:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2309,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2299,
                        "src": "9530:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2311,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2297,
                        "src": "9536:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 2312,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 1895,
                      "src": "9536:12:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2325,
                  "nodeType": "IfStatement",
                  "src": "9520:83:14",
                  "trueBody": {
                    "id": 2324,
                    "nodeType": "Block",
                    "src": "9550:53:14",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 2315,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2297,
                              "src": "9571:3:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 2321,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 2318,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 2316,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2303,
                                      "src": "9577:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 2317,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 2299,
                                      "src": "9583:3:14",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:14",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 2319,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:14",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 2320,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:14",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:14",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 2314,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1980,
                            "src": "9564:6:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 2322,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 2323,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:14"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    2327
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2327,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 2337,
                      "src": "9613:9:14",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 2326,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2333,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 2330,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 2328,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:14",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 2329,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2303,
                        "src": "9632:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 2331,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:14",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:14"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 2297,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9741:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 2327,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9922:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9862:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9868:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10013:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10018:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 2301,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9930:4:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 2299,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10076:3:14",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 2303,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10081:3:14",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 2334,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "9649:461:14"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2335,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 2297,
                    "src": "10126:3:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2307,
                  "id": 2336,
                  "nodeType": "Return",
                  "src": "10119:10:14"
                }
              ]
            },
            "documentation": "@dev Writes an integer to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (right-aligned).\n@return The original buffer, for chaining.",
            "id": 2338,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2304,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2297,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9424:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2296,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "9424:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2299,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9443:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2298,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2301,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9453:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2300,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2303,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9464:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2302,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:14"
            },
            "returnParameters": {
              "id": 2307,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2306,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2338,
                  "src": "9495:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2305,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "9495:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:14"
            },
            "scope": 2360,
            "src": "9406:730:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 2358,
              "nodeType": "Block",
              "src": "10493:64:14",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2350,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2340,
                        "src": "10519:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 2351,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2340,
                            "src": "10524:3:14",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 2352,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 1893,
                          "src": "10524:7:14",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 2353,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "10524:14:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2354,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2342,
                        "src": "10540:4:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 2355,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2344,
                        "src": "10546:3:14",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 2349,
                      "name": "writeInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2338,
                      "src": "10510:8:14",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$1896_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_buffer_$1896_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint256,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 2356,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10510:40:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 2348,
                  "id": 2357,
                  "nodeType": "Return",
                  "src": "10503:47:14"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the end of the buffer. Resizes if doing so would\nexceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer.",
            "id": 2359,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2345,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2340,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10416:17:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2339,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "10416:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2342,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10435:9:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2341,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10435:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2344,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10446:8:14",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 2343,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10446:4:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10415:40:14"
            },
            "returnParameters": {
              "id": 2348,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2347,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2359,
                  "src": "10478:13:14",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$1896_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 2346,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1896,
                    "src": "10478:6:14",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$1896_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10477:15:14"
            },
            "scope": 2360,
            "src": "10397:160:14",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 2361,
        "src": "403:10156:14"
      }
    ],
    "src": "0:10560:14"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.8+commit.23d335f2.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.16",
  "updatedAt": "2020-02-10T18:46:21.040Z",
  "devdoc": {
    "details": "A library for working with mutable byte buffers in Solidity. * Byte buffers are mutable and expandable, and provide a variety of primitives for writing to them. At any time you can fetch a bytes object containing the current contents of the buffer. The bytes object should not be stored between operations, as it may change due to resizing of the buffer.",
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}