{
  "contractName": "Buffer",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"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\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"keccak256\":\"0x1264adbd06f6e05b04539bb225063a988b7fa90343d068de60cdde6cfb6fa92d\",\"urls\":[\"bzz-raw://9362e5c8306c61ad32144028b5b6c3a90ff868c86e814d26f096a59243598ed2\",\"dweb:/ipfs/QmQPRLNQu1iN6KHKPbhkGvRZnsKgjddjzEza8Q8oJ5FfwH\"]}},\"version\":1}",
  "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820da4d3ccfdd17bdd00b91721db7d45ff3a6b4064fc59562b4bc794a95ec34ef5d64736f6c63430005100032",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820da4d3ccfdd17bdd00b91721db7d45ff3a6b4064fc59562b4bc794a95ec34ef5d64736f6c63430005100032",
  "sourceMap": "403:10156:20:-;;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:20:-;;;;;;;;",
  "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": [
        5084
      ]
    },
    "id": 5085,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4615,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:20"
      },
      {
        "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": 5084,
        "linearizedBaseContracts": [
          5084
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 4620,
            "members": [
              {
                "constant": false,
                "id": 4617,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 4620,
                "src": "702:9:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 4616,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 4619,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 4620,
                "src": "721:13:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 4618,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 5084,
            "src": "678:63:20",
            "visibility": "public"
          },
          {
            "body": {
              "id": 4654,
              "nodeType": "Block",
              "src": "1063:370:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4633,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4631,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4629,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4624,
                        "src": "1077:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 4630,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4632,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4644,
                  "nodeType": "IfStatement",
                  "src": "1073:81:20",
                  "trueBody": {
                    "id": 4643,
                    "nodeType": "Block",
                    "src": "1097:57:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4641,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4634,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4624,
                            "src": "1111:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 4640,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 4635,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:20",
                              "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": 4638,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 4636,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4624,
                                    "src": "1129:8:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 4637,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:20",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 4639,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4642,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4649,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4645,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4622,
                        "src": "1209:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4647,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "1209:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 4648,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4624,
                      "src": "1224:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4650,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4622,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 4624,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1386:8:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4651,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4652,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4622,
                    "src": "1423:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4628,
                  "id": 4653,
                  "nodeType": "Return",
                  "src": "1416:10:20"
                }
              ]
            },
            "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": 4655,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4625,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4622,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "992:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4621,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "992:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4624,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "1011:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4623,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:20"
            },
            "returnParameters": {
              "id": 4628,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4627,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "1048:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4626,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1048:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:20"
            },
            "scope": 5084,
            "src": "978:455:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4680,
              "nodeType": "Block",
              "src": "1748:108:20",
              "statements": [
                {
                  "assignments": [
                    4663
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4663,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 4680,
                      "src": "1758:17:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 4662,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 4620,
                        "src": "1758:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4664,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4669,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4665,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4663,
                        "src": "1785:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4667,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4617,
                      "src": "1785:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 4668,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4657,
                      "src": "1795:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 4670,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4676,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4671,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4663,
                        "src": "1806:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4673,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "1806:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4674,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4657,
                        "src": "1821:1:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4675,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1821:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4677,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4678,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4663,
                    "src": "1846:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4661,
                  "id": 4679,
                  "nodeType": "Return",
                  "src": "1839:10:20"
                }
              ]
            },
            "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": 4681,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4658,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4657,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4681,
                  "src": "1695:14:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4656,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:20"
            },
            "returnParameters": {
              "id": 4661,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4660,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4681,
                  "src": "1733:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4659,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1733:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:20"
            },
            "scope": 5084,
            "src": "1676:180:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4703,
              "nodeType": "Block",
              "src": "1925:104:20",
              "statements": [
                {
                  "assignments": [
                    4689
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4689,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 4703,
                      "src": "1935:19:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 4688,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4692,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 4690,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4683,
                      "src": "1957:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 4691,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 4617,
                    "src": "1957:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4694,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4683,
                        "src": "1979:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4695,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4685,
                        "src": "1984:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4693,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4655,
                      "src": "1974:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4696,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 4697,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4699,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4683,
                        "src": "2010:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4700,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4689,
                        "src": "2015:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 4698,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4836,
                        4856
                      ],
                      "referencedDeclaration": 4856,
                      "src": "2003:6:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4701,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 4702,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:20"
                }
              ]
            },
            "documentation": null,
            "id": 4704,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4686,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4683,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4704,
                  "src": "1878:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4682,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1878:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4685,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 4704,
                  "src": "1897:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4684,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:20"
            },
            "returnParameters": {
              "id": 4687,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:20"
            },
            "scope": 5084,
            "src": "1862:167:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4722,
              "nodeType": "Block",
              "src": "2091:78:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4715,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4713,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4706,
                      "src": "2105:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4714,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4708,
                      "src": "2109:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4719,
                  "nodeType": "IfStatement",
                  "src": "2101:44:20",
                  "trueBody": {
                    "id": 4718,
                    "nodeType": "Block",
                    "src": "2112:33:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4716,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4706,
                          "src": "2133:1:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4712,
                        "id": 4717,
                        "nodeType": "Return",
                        "src": "2126:8:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4720,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4708,
                    "src": "2161:1:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4712,
                  "id": 4721,
                  "nodeType": "Return",
                  "src": "2154:8:20"
                }
              ]
            },
            "documentation": null,
            "id": 4723,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4709,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4706,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2048:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4705,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4708,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2056:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4707,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:20"
            },
            "returnParameters": {
              "id": 4712,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4711,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2085:4:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4710,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:20"
            },
            "scope": 5084,
            "src": "2035:134:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4733,
              "nodeType": "Block",
              "src": "2392:123:20",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4725,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2445:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4730,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2402:87:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4731,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4725,
                    "src": "2505:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4729,
                  "id": 4732,
                  "nodeType": "Return",
                  "src": "2498:10:20"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 4734,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4726,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4725,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4734,
                  "src": "2335:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4724,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2335:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:20"
            },
            "returnParameters": {
              "id": 4729,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4728,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4734,
                  "src": "2377:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4727,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2377:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:20"
            },
            "scope": 5084,
            "src": "2317:198:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4814,
              "nodeType": "Block",
              "src": "2985:1216:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4751,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4748,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4742,
                          "src": "3003:3:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4749,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4740,
                            "src": "3010:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4750,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3010:11:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 4747,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        13013,
                        13014
                      ],
                      "referencedDeclaration": 13013,
                      "src": "2995:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 4752,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 4753,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:20"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4759,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4756,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4754,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4738,
                        "src": "3037:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4755,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4742,
                        "src": "3043:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4757,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4736,
                        "src": "3049:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4758,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "3049:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4774,
                  "nodeType": "IfStatement",
                  "src": "3033:100:20",
                  "trueBody": {
                    "id": 4773,
                    "nodeType": "Block",
                    "src": "3063:70:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4761,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4736,
                              "src": "3084:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4770,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4763,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4736,
                                      "src": "3093:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 4764,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4619,
                                    "src": "3093:12:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 4767,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 4765,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4742,
                                      "src": "3107:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 4766,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4738,
                                      "src": "3113:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 4762,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4723,
                                  "src": "3089:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 4768,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4769,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4760,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "3077:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4771,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4772,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4776
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4776,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3143:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4775,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4777,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:20"
                },
                {
                  "assignments": [
                    4779
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4779,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3162:8:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4778,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4780,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4736,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3272:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3454:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3483:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4742,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3568:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3573:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 4779,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3661:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4742,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3624:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3629:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4740,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3672:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4781,
                  "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) { mstore(bufptr, add(len, off)) }\n    src := add(data, 32)\n}",
                  "src": "3180:511:20"
                },
                {
                  "body": {
                    "id": 4798,
                    "nodeType": "Block",
                    "src": "3780:136:20",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "src": {
                              "declaration": 4779,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3840:3:20",
                              "valueSize": 1
                            }
                          },
                          {
                            "dest": {
                              "declaration": 4776,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3828:4:20",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 4789,
                        "nodeType": "InlineAssembly",
                        "operations": "{ mstore(dest, mload(src)) }",
                        "src": "3794:65:20"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4792,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4790,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4776,
                            "src": "3872:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 4791,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4793,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:20"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4794,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4779,
                            "src": "3896:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 4795,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4797,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:20"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4784,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4782,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4742,
                      "src": "3758:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 4783,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 4799,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 4787,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 4785,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4742,
                        "src": "3769:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 4786,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 4788,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:20"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:20"
                },
                {
                  "assignments": [
                    4801
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4801,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3958:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4800,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4810,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4809,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4807,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 4802,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:20",
                        "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": 4805,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 4803,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:20",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 4804,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4742,
                              "src": "3983:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 4806,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 4808,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:20"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 4779,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4049:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4801,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4059:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4104:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4801,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4111:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4136:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4811,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4812,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4736,
                    "src": "4191:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4746,
                  "id": 4813,
                  "nodeType": "Return",
                  "src": "4184:10:20"
                }
              ]
            },
            "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": 4815,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4743,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4736,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2890:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4735,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2890:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4738,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2909:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4737,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4740,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2919:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4739,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4742,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2938:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4741,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:20"
            },
            "returnParameters": {
              "id": 4746,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4745,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2970:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4744,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2970:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:20"
            },
            "scope": 5084,
            "src": "2875:1326:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4835,
              "nodeType": "Block",
              "src": "4617:61:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4827,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4817,
                        "src": "4640:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4828,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4817,
                            "src": "4645:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4829,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "4645:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4830,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4645:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4831,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4819,
                        "src": "4661:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4832,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4821,
                        "src": "4667:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4826,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4815,
                      "src": "4634:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4833,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4825,
                  "id": 4834,
                  "nodeType": "Return",
                  "src": "4627:44:20"
                }
              ]
            },
            "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": 4836,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4822,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4817,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4531:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4816,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4531:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4819,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4550:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4818,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4821,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4569:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4820,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:20"
            },
            "returnParameters": {
              "id": 4825,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4824,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4602:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4823,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4602:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:20"
            },
            "scope": 5084,
            "src": "4515:163:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4855,
              "nodeType": "Block",
              "src": "5038:69:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4846,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4838,
                        "src": "5061:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4847,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4838,
                            "src": "5066:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4848,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "5066:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4849,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5066:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4850,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4840,
                        "src": "5082:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4851,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4840,
                          "src": "5088:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4852,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5088:11:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4845,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4815,
                      "src": "5055:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4853,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4844,
                  "id": 4854,
                  "nodeType": "Return",
                  "src": "5048:52:20"
                }
              ]
            },
            "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": 4856,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4841,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4838,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "4962:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4837,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4962:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4840,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "4981:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4839,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:20"
            },
            "returnParameters": {
              "id": 4844,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4843,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "5023:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4842,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5023:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:20"
            },
            "scope": 5084,
            "src": "4946:161:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4884,
              "nodeType": "Block",
              "src": "5517:617:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4870,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4867,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4860,
                      "src": "5531:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4868,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4858,
                        "src": "5538:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4869,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "5538:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4880,
                  "nodeType": "IfStatement",
                  "src": "5527:79:20",
                  "trueBody": {
                    "id": 4879,
                    "nodeType": "Block",
                    "src": "5552:54:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4872,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4858,
                              "src": "5573:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4876,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4873,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4858,
                                  "src": "5578:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 4874,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 4619,
                                "src": "5578:12:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4875,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4871,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "5566:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4877,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4878,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:20"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4858,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5708:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4860,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6023:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4860,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5909:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4862,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5945:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4881,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4882,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4858,
                    "src": "6124:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4866,
                  "id": 4883,
                  "nodeType": "Return",
                  "src": "6117:10:20"
                }
              ]
            },
            "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": 4885,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4863,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4858,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5439:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4857,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5439:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4860,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5458:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4859,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4862,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5468:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4861,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:20"
            },
            "returnParameters": {
              "id": 4866,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4865,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5502:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4864,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5502:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:20"
            },
            "scope": 5084,
            "src": "5419:715:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4902,
              "nodeType": "Block",
              "src": "6486:61:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4895,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4887,
                        "src": "6514:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4896,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4887,
                            "src": "6519:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4897,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "6519:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4898,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6519:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4899,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4889,
                        "src": "6535:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 4894,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4885,
                      "src": "6503:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4893,
                  "id": 4901,
                  "nodeType": "Return",
                  "src": "6496:44:20"
                }
              ]
            },
            "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": 4903,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4890,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4887,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6418:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4886,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6418:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4889,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6437:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4888,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:20"
            },
            "returnParameters": {
              "id": 4893,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4892,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6471:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4891,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6471:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:20"
            },
            "scope": 5084,
            "src": "6397:150:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4957,
              "nodeType": "Block",
              "src": "7024:695:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4918,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4916,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4911,
                        "src": "7038:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4917,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4907,
                        "src": "7044:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4919,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4905,
                        "src": "7050:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4920,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "7050:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4933,
                  "nodeType": "IfStatement",
                  "src": "7034:83:20",
                  "trueBody": {
                    "id": 4932,
                    "nodeType": "Block",
                    "src": "7064:53:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4923,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4905,
                              "src": "7085:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4929,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 4926,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 4924,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4911,
                                      "src": "7091:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 4925,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4907,
                                      "src": "7097:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 4927,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4928,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4922,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "7078:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4930,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4931,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4935
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4935,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 4957,
                      "src": "7127:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4934,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4941,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4940,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4938,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 4936,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4937,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4911,
                        "src": "7146:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 4939,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4952,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4942,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4909,
                      "src": "7191:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 4951,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4943,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4909,
                        "src": "7198:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 4949,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 4944,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:20",
                              "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": 4947,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 4945,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:20",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 4946,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4911,
                                    "src": "7217:3:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 4948,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 4950,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4953,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4905,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7324:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4935,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7505:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7445:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7451:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7596:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7601:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4909,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7513:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7659:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7664:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4954,
                  "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)) { mstore(bufptr, add(off, len)) }\n}",
                  "src": "7232:461:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4955,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4905,
                    "src": "7709:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4915,
                  "id": 4956,
                  "nodeType": "Return",
                  "src": "7702:10:20"
                }
              ]
            },
            "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": 4958,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4912,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4905,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6935:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4904,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6935:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4907,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6954:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4906,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4909,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6964:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4908,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4911,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6978:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4910,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:20"
            },
            "returnParameters": {
              "id": 4915,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4914,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "7009:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4913,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "7009:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:20"
            },
            "scope": 5084,
            "src": "6920:799:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4978,
              "nodeType": "Block",
              "src": "8128:58:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4960,
                        "src": "8151:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4971,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4962,
                        "src": "8156:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4973,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4964,
                            "src": "8169:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 4972,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 4974,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 4975,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4969,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8145:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4976,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4968,
                  "id": 4977,
                  "nodeType": "Return",
                  "src": "8138:41:20"
                }
              ]
            },
            "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": 4979,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4965,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4960,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8047:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4959,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8047:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4962,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8066:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4961,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4964,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8076:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 4963,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:20"
            },
            "returnParameters": {
              "id": 4968,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4967,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8113:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4966,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8113:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:20"
            },
            "scope": 5084,
            "src": "8025:161:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4999,
              "nodeType": "Block",
              "src": "8547:69:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4989,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4981,
                        "src": "8570:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4990,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4981,
                            "src": "8575:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4991,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "8575:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4992,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8575:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4994,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4983,
                            "src": "8599:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 4993,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 4995,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 4996,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4988,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8564:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4997,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4987,
                  "id": 4998,
                  "nodeType": "Return",
                  "src": "8557:52:20"
                }
              ]
            },
            "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": 5000,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4984,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4981,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8476:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4980,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8476:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4983,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8495:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 4982,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:20"
            },
            "returnParameters": {
              "id": 4987,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4986,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8532:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4985,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8532:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:20"
            },
            "scope": 5084,
            "src": "8453:163:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5018,
              "nodeType": "Block",
              "src": "8976:60:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5010,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5002,
                        "src": "8999:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5011,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5002,
                            "src": "9004:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 5012,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "9004:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 5013,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9004:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5014,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5004,
                        "src": "9020:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 5015,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 5009,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8993:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 5016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5008,
                  "id": 5017,
                  "nodeType": "Return",
                  "src": "8986:43:20"
                }
              ]
            },
            "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": 5019,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5005,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5002,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8905:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5001,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8905:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5004,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8924:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5003,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:20"
            },
            "returnParameters": {
              "id": 5008,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5007,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8961:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5006,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8961:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:20"
            },
            "scope": 5084,
            "src": "8882:154:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5061,
              "nodeType": "Block",
              "src": "9510:626:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5037,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5034,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 5032,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5027,
                        "src": "9524:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 5033,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5023,
                        "src": "9530:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 5035,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5021,
                        "src": "9536:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 5036,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "9536:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 5049,
                  "nodeType": "IfStatement",
                  "src": "9520:83:20",
                  "trueBody": {
                    "id": 5048,
                    "nodeType": "Block",
                    "src": "9550:53:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 5039,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5021,
                              "src": "9571:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5045,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 5042,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 5040,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5027,
                                      "src": "9577:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 5041,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5023,
                                      "src": "9583:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 5043,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 5044,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5038,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "9564:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 5046,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5047,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    5051
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5051,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 5061,
                      "src": "9613:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5050,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5057,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5056,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5054,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 5052,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 5053,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5027,
                        "src": "9632:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 5055,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 5021,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9741:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 5051,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9922:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9862:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9868:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10013:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10018:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 5025,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9930:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10076:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10081:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5058,
                  "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)) { mstore(bufptr, add(off, len)) }\n}",
                  "src": "9649:461:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5059,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5021,
                    "src": "10126:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5031,
                  "id": 5060,
                  "nodeType": "Return",
                  "src": "10119:10:20"
                }
              ]
            },
            "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": 5062,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5028,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5021,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9424:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5020,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "9424:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5023,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9443:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5022,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5025,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9453:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5024,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5027,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9464:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5026,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:20"
            },
            "returnParameters": {
              "id": 5031,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5030,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9495:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5029,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "9495:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:20"
            },
            "scope": 5084,
            "src": "9406:730:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5082,
              "nodeType": "Block",
              "src": "10493:64:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5074,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5064,
                        "src": "10519:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5075,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5064,
                            "src": "10524:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 5076,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "10524:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 5077,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "10524:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5078,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5066,
                        "src": "10540:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5079,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5068,
                        "src": "10546:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5073,
                      "name": "writeInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5062,
                      "src": "10510:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint256,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 5080,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10510:40:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5072,
                  "id": 5081,
                  "nodeType": "Return",
                  "src": "10503:47:20"
                }
              ]
            },
            "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": 5083,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5069,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5064,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10416:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5063,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "10416:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5066,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10435:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5065,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10435:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5068,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10446:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5067,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10446:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10415:40:20"
            },
            "returnParameters": {
              "id": 5072,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5071,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10478:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5070,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "10478:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10477:15:20"
            },
            "scope": 5084,
            "src": "10397:160:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5085,
        "src": "403:10156:20"
      }
    ],
    "src": "0:10560:20"
  },
  "legacyAST": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        5084
      ]
    },
    "id": 5085,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4615,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:20"
      },
      {
        "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": 5084,
        "linearizedBaseContracts": [
          5084
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 4620,
            "members": [
              {
                "constant": false,
                "id": 4617,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 4620,
                "src": "702:9:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 4616,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 4619,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 4620,
                "src": "721:13:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 4618,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 5084,
            "src": "678:63:20",
            "visibility": "public"
          },
          {
            "body": {
              "id": 4654,
              "nodeType": "Block",
              "src": "1063:370:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4633,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4631,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4629,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4624,
                        "src": "1077:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 4630,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4632,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4644,
                  "nodeType": "IfStatement",
                  "src": "1073:81:20",
                  "trueBody": {
                    "id": 4643,
                    "nodeType": "Block",
                    "src": "1097:57:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4641,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4634,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4624,
                            "src": "1111:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 4640,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 4635,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:20",
                              "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": 4638,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 4636,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4624,
                                    "src": "1129:8:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 4637,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:20",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 4639,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4642,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4649,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4645,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4622,
                        "src": "1209:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4647,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "1209:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 4648,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4624,
                      "src": "1224:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4650,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4622,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 4624,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1386:8:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4651,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4652,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4622,
                    "src": "1423:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4628,
                  "id": 4653,
                  "nodeType": "Return",
                  "src": "1416:10:20"
                }
              ]
            },
            "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": 4655,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4625,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4622,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "992:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4621,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "992:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4624,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "1011:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4623,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:20"
            },
            "returnParameters": {
              "id": 4628,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4627,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4655,
                  "src": "1048:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4626,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1048:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:20"
            },
            "scope": 5084,
            "src": "978:455:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4680,
              "nodeType": "Block",
              "src": "1748:108:20",
              "statements": [
                {
                  "assignments": [
                    4663
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4663,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 4680,
                      "src": "1758:17:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 4662,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 4620,
                        "src": "1758:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4664,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4669,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4665,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4663,
                        "src": "1785:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4667,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4617,
                      "src": "1785:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 4668,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4657,
                      "src": "1795:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 4670,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4676,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4671,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4663,
                        "src": "1806:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4673,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "1806:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4674,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4657,
                        "src": "1821:1:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 4675,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1821:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 4677,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4678,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4663,
                    "src": "1846:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4661,
                  "id": 4679,
                  "nodeType": "Return",
                  "src": "1839:10:20"
                }
              ]
            },
            "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": 4681,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4658,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4657,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4681,
                  "src": "1695:14:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4656,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:20"
            },
            "returnParameters": {
              "id": 4661,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4660,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4681,
                  "src": "1733:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4659,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1733:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:20"
            },
            "scope": 5084,
            "src": "1676:180:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4703,
              "nodeType": "Block",
              "src": "1925:104:20",
              "statements": [
                {
                  "assignments": [
                    4689
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4689,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 4703,
                      "src": "1935:19:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 4688,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4692,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 4690,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4683,
                      "src": "1957:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 4691,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 4617,
                    "src": "1957:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4694,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4683,
                        "src": "1979:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4695,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4685,
                        "src": "1984:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4693,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4655,
                      "src": "1974:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4696,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 4697,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4699,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4683,
                        "src": "2010:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4700,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4689,
                        "src": "2015:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 4698,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4836,
                        4856
                      ],
                      "referencedDeclaration": 4856,
                      "src": "2003:6:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4701,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 4702,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:20"
                }
              ]
            },
            "documentation": null,
            "id": 4704,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4686,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4683,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4704,
                  "src": "1878:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4682,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "1878:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4685,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 4704,
                  "src": "1897:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4684,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:20"
            },
            "returnParameters": {
              "id": 4687,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:20"
            },
            "scope": 5084,
            "src": "1862:167:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4722,
              "nodeType": "Block",
              "src": "2091:78:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4715,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4713,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4706,
                      "src": "2105:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4714,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4708,
                      "src": "2109:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4719,
                  "nodeType": "IfStatement",
                  "src": "2101:44:20",
                  "trueBody": {
                    "id": 4718,
                    "nodeType": "Block",
                    "src": "2112:33:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4716,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4706,
                          "src": "2133:1:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 4712,
                        "id": 4717,
                        "nodeType": "Return",
                        "src": "2126:8:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4720,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4708,
                    "src": "2161:1:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 4712,
                  "id": 4721,
                  "nodeType": "Return",
                  "src": "2154:8:20"
                }
              ]
            },
            "documentation": null,
            "id": 4723,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4709,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4706,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2048:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4705,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4708,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2056:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4707,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:20"
            },
            "returnParameters": {
              "id": 4712,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4711,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4723,
                  "src": "2085:4:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4710,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:20"
            },
            "scope": 5084,
            "src": "2035:134:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4733,
              "nodeType": "Block",
              "src": "2392:123:20",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4725,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2445:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4730,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2402:87:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4731,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4725,
                    "src": "2505:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4729,
                  "id": 4732,
                  "nodeType": "Return",
                  "src": "2498:10:20"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 4734,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4726,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4725,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4734,
                  "src": "2335:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4724,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2335:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:20"
            },
            "returnParameters": {
              "id": 4729,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4728,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4734,
                  "src": "2377:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4727,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2377:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:20"
            },
            "scope": 5084,
            "src": "2317:198:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4814,
              "nodeType": "Block",
              "src": "2985:1216:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4751,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4748,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4742,
                          "src": "3003:3:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4749,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4740,
                            "src": "3010:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 4750,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3010:11:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 4747,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        13013,
                        13014
                      ],
                      "referencedDeclaration": 13013,
                      "src": "2995:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 4752,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 4753,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:20"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4759,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4756,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4754,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4738,
                        "src": "3037:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4755,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4742,
                        "src": "3043:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4757,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4736,
                        "src": "3049:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4758,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "3049:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4774,
                  "nodeType": "IfStatement",
                  "src": "3033:100:20",
                  "trueBody": {
                    "id": 4773,
                    "nodeType": "Block",
                    "src": "3063:70:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4761,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4736,
                              "src": "3084:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4770,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 4763,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4736,
                                      "src": "3093:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 4764,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 4619,
                                    "src": "3093:12:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 4767,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 4765,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4742,
                                      "src": "3107:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 4766,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4738,
                                      "src": "3113:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 4762,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4723,
                                  "src": "3089:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 4768,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4769,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4760,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "3077:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4771,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4772,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4776
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4776,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3143:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4775,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4777,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:20"
                },
                {
                  "assignments": [
                    4779
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4779,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3162:8:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4778,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4780,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4736,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3272:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3454:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3483:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4742,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3568:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3573:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 4779,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3661:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4742,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3624:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4738,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3629:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4740,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3672:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4781,
                  "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) { mstore(bufptr, add(len, off)) }\n    src := add(data, 32)\n}",
                  "src": "3180:511:20"
                },
                {
                  "body": {
                    "id": 4798,
                    "nodeType": "Block",
                    "src": "3780:136:20",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "src": {
                              "declaration": 4779,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3840:3:20",
                              "valueSize": 1
                            }
                          },
                          {
                            "dest": {
                              "declaration": 4776,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3828:4:20",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 4789,
                        "nodeType": "InlineAssembly",
                        "operations": "{ mstore(dest, mload(src)) }",
                        "src": "3794:65:20"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4792,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4790,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4776,
                            "src": "3872:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 4791,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4793,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:20"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4796,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4794,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4779,
                            "src": "3896:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 4795,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4797,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:20"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4784,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4782,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4742,
                      "src": "3758:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 4783,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 4799,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 4787,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 4785,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4742,
                        "src": "3769:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 4786,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 4788,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:20"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:20"
                },
                {
                  "assignments": [
                    4801
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4801,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 4814,
                      "src": "3958:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4800,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4810,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4809,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4807,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 4802,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:20",
                        "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": 4805,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 4803,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:20",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 4804,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4742,
                              "src": "3983:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 4806,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 4808,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:20"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 4779,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4049:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4801,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4059:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4104:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4801,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4111:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 4776,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4136:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4811,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4812,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4736,
                    "src": "4191:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4746,
                  "id": 4813,
                  "nodeType": "Return",
                  "src": "4184:10:20"
                }
              ]
            },
            "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": 4815,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4743,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4736,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2890:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4735,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2890:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4738,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2909:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4737,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4740,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2919:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4739,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4742,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2938:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4741,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:20"
            },
            "returnParameters": {
              "id": 4746,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4745,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4815,
                  "src": "2970:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4744,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "2970:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:20"
            },
            "scope": 5084,
            "src": "2875:1326:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4835,
              "nodeType": "Block",
              "src": "4617:61:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4827,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4817,
                        "src": "4640:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4828,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4817,
                            "src": "4645:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4829,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "4645:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4830,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4645:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4831,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4819,
                        "src": "4661:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4832,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4821,
                        "src": "4667:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4826,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4815,
                      "src": "4634:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4833,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4825,
                  "id": 4834,
                  "nodeType": "Return",
                  "src": "4627:44:20"
                }
              ]
            },
            "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": 4836,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4822,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4817,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4531:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4816,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4531:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4819,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4550:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4818,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4821,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4569:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4820,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:20"
            },
            "returnParameters": {
              "id": 4825,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4824,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4836,
                  "src": "4602:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4823,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4602:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:20"
            },
            "scope": 5084,
            "src": "4515:163:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4855,
              "nodeType": "Block",
              "src": "5038:69:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4846,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4838,
                        "src": "5061:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4847,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4838,
                            "src": "5066:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4848,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "5066:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4849,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5066:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4850,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4840,
                        "src": "5082:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4851,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4840,
                          "src": "5088:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4852,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5088:11:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4845,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4815,
                      "src": "5055:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4853,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4844,
                  "id": 4854,
                  "nodeType": "Return",
                  "src": "5048:52:20"
                }
              ]
            },
            "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": 4856,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4841,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4838,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "4962:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4837,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "4962:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4840,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "4981:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 4839,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:20"
            },
            "returnParameters": {
              "id": 4844,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4843,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4856,
                  "src": "5023:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4842,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5023:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:20"
            },
            "scope": 5084,
            "src": "4946:161:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4884,
              "nodeType": "Block",
              "src": "5517:617:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4870,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4867,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4860,
                      "src": "5531:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4868,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4858,
                        "src": "5538:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4869,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "5538:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4880,
                  "nodeType": "IfStatement",
                  "src": "5527:79:20",
                  "trueBody": {
                    "id": 4879,
                    "nodeType": "Block",
                    "src": "5552:54:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4872,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4858,
                              "src": "5573:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4876,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4873,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4858,
                                  "src": "5578:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 4874,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 4619,
                                "src": "5578:12:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4875,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4871,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "5566:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4877,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4878,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:20"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4858,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5708:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4860,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6023:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4860,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5909:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4862,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5945:4:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4881,
                  "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:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4882,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4858,
                    "src": "6124:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4866,
                  "id": 4883,
                  "nodeType": "Return",
                  "src": "6117:10:20"
                }
              ]
            },
            "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": 4885,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4863,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4858,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5439:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4857,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5439:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4860,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5458:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4859,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4862,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5468:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4861,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:20"
            },
            "returnParameters": {
              "id": 4866,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4865,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4885,
                  "src": "5502:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4864,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "5502:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:20"
            },
            "scope": 5084,
            "src": "5419:715:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4902,
              "nodeType": "Block",
              "src": "6486:61:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4895,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4887,
                        "src": "6514:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4896,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4887,
                            "src": "6519:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4897,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "6519:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4898,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6519:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4899,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4889,
                        "src": "6535:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 4894,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4885,
                      "src": "6503:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4900,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4893,
                  "id": 4901,
                  "nodeType": "Return",
                  "src": "6496:44:20"
                }
              ]
            },
            "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": 4903,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4890,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4887,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6418:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4886,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6418:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4889,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6437:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 4888,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:20"
            },
            "returnParameters": {
              "id": 4893,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4892,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4903,
                  "src": "6471:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4891,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6471:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:20"
            },
            "scope": 5084,
            "src": "6397:150:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4957,
              "nodeType": "Block",
              "src": "7024:695:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4918,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4916,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4911,
                        "src": "7038:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4917,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4907,
                        "src": "7044:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4919,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4905,
                        "src": "7050:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 4920,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "7050:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4933,
                  "nodeType": "IfStatement",
                  "src": "7034:83:20",
                  "trueBody": {
                    "id": 4932,
                    "nodeType": "Block",
                    "src": "7064:53:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 4923,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4905,
                              "src": "7085:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4929,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 4926,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 4924,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4911,
                                      "src": "7091:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 4925,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 4907,
                                      "src": "7097:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 4927,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 4928,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 4922,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "7078:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 4930,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 4931,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4935
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4935,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 4957,
                      "src": "7127:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4934,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4941,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4940,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4938,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 4936,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4937,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4911,
                        "src": "7146:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 4939,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4952,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 4942,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4909,
                      "src": "7191:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 4951,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4943,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4909,
                        "src": "7198:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 4949,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 4944,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:20",
                              "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": 4947,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 4945,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:20",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 4946,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 4911,
                                    "src": "7217:3:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 4948,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 4950,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 4953,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 4905,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7324:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 4935,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7505:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7445:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7451:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7596:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7601:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 4909,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7513:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 4907,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7659:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 4911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7664:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 4954,
                  "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)) { mstore(bufptr, add(off, len)) }\n}",
                  "src": "7232:461:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 4955,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 4905,
                    "src": "7709:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4915,
                  "id": 4956,
                  "nodeType": "Return",
                  "src": "7702:10:20"
                }
              ]
            },
            "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": 4958,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4912,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4905,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6935:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4904,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "6935:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4907,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6954:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4906,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4909,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6964:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 4908,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4911,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "6978:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4910,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:20"
            },
            "returnParameters": {
              "id": 4915,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4914,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4958,
                  "src": "7009:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4913,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "7009:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:20"
            },
            "scope": 5084,
            "src": "6920:799:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 4978,
              "nodeType": "Block",
              "src": "8128:58:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4960,
                        "src": "8151:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4971,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4962,
                        "src": "8156:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4973,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4964,
                            "src": "8169:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 4972,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 4974,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 4975,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4969,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8145:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4976,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4968,
                  "id": 4977,
                  "nodeType": "Return",
                  "src": "8138:41:20"
                }
              ]
            },
            "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": 4979,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4965,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4960,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8047:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4959,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8047:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4962,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8066:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4961,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4964,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8076:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 4963,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:20"
            },
            "returnParameters": {
              "id": 4968,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4967,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4979,
                  "src": "8113:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4966,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8113:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:20"
            },
            "scope": 5084,
            "src": "8025:161:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4999,
              "nodeType": "Block",
              "src": "8547:69:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4989,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4981,
                        "src": "8570:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 4990,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4981,
                            "src": "8575:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 4991,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "8575:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 4992,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8575:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4994,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4983,
                            "src": "8599:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 4993,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 4995,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 4996,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 4988,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8564:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 4997,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 4987,
                  "id": 4998,
                  "nodeType": "Return",
                  "src": "8557:52:20"
                }
              ]
            },
            "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": 5000,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4984,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4981,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8476:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4980,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8476:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4983,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8495:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 4982,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:20"
            },
            "returnParameters": {
              "id": 4987,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4986,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5000,
                  "src": "8532:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4985,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8532:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:20"
            },
            "scope": 5084,
            "src": "8453:163:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5018,
              "nodeType": "Block",
              "src": "8976:60:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5010,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5002,
                        "src": "8999:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5011,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5002,
                            "src": "9004:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 5012,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "9004:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 5013,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9004:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5014,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5004,
                        "src": "9020:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 5015,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_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": 5009,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4815,
                        4958
                      ],
                      "referencedDeclaration": 4958,
                      "src": "8993:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 5016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5008,
                  "id": 5017,
                  "nodeType": "Return",
                  "src": "8986:43:20"
                }
              ]
            },
            "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": 5019,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5005,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5002,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8905:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5001,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8905:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5004,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8924:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 5003,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:20"
            },
            "returnParameters": {
              "id": 5008,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5007,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5019,
                  "src": "8961:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5006,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "8961:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:20"
            },
            "scope": 5084,
            "src": "8882:154:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 5061,
              "nodeType": "Block",
              "src": "9510:626:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5037,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5034,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 5032,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5027,
                        "src": "9524:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 5033,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5023,
                        "src": "9530:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 5035,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5021,
                        "src": "9536:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 5036,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 4619,
                      "src": "9536:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 5049,
                  "nodeType": "IfStatement",
                  "src": "9520:83:20",
                  "trueBody": {
                    "id": 5048,
                    "nodeType": "Block",
                    "src": "9550:53:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 5039,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 5021,
                              "src": "9571:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 5045,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "components": [
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 5042,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 5040,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5027,
                                      "src": "9577:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 5041,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 5023,
                                      "src": "9583:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 5043,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 5044,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:20",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 5038,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 4704,
                            "src": "9564:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 5046,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 5047,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    5051
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 5051,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 5061,
                      "src": "9613:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 5050,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 5057,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5056,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5054,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 5052,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 5053,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5027,
                        "src": "9632:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 5055,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:20",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:20"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 5021,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9741:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 5051,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9922:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9862:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9868:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10013:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10018:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 5025,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9930:4:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 5023,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10076:3:20",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 5027,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10081:3:20",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 5058,
                  "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)) { mstore(bufptr, add(off, len)) }\n}",
                  "src": "9649:461:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 5059,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5021,
                    "src": "10126:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5031,
                  "id": 5060,
                  "nodeType": "Return",
                  "src": "10119:10:20"
                }
              ]
            },
            "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": 5062,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5028,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5021,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9424:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5020,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "9424:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5023,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9443:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5022,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5025,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9453:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5024,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5027,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9464:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5026,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:20"
            },
            "returnParameters": {
              "id": 5031,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5030,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5062,
                  "src": "9495:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5029,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "9495:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:20"
            },
            "scope": 5084,
            "src": "9406:730:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 5082,
              "nodeType": "Block",
              "src": "10493:64:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 5074,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5064,
                        "src": "10519:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 5075,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5064,
                            "src": "10524:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 5076,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 4617,
                          "src": "10524:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 5077,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "10524:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5078,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5066,
                        "src": "10540:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 5079,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5068,
                        "src": "10546:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 5073,
                      "name": "writeInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5062,
                      "src": "10510:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$4620_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_buffer_$4620_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint256,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 5080,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "10510:40:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5072,
                  "id": 5081,
                  "nodeType": "Return",
                  "src": "10503:47:20"
                }
              ]
            },
            "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": 5083,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5069,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5064,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10416:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5063,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "10416:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5066,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10435:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5065,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10435:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5068,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10446:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5067,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "10446:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10415:40:20"
            },
            "returnParameters": {
              "id": 5072,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5071,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 5083,
                  "src": "10478:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$4620_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 5070,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4620,
                    "src": "10478:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$4620_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10477:15:20"
            },
            "scope": 5084,
            "src": "10397:160:20",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 5085,
        "src": "403:10156:20"
      }
    ],
    "src": "0:10560:20"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.0",
  "updatedAt": "2020-06-17T12:57:44.954Z",
  "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": {}
  }
}