{
  "contractName": "Buffer",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.7.4+commit.3f05b770\"},\"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.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@ensdomains/buffer/contracts/Buffer.sol\":\"Buffer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"keccak256\":\"0xa9ac824902ab6aaf6883432cd6f2a853186fcce568d63d04fa8143df6c5d6ebd\",\"urls\":[\"bzz-raw://99a06f0895b90759b92067c86b0eba1823bb6180ef4f3e3ed18abef2ec43eab9\",\"dweb:/ipfs/QmQVmiDPkuXZq94G6Mc3TChVrYzvEk3gbGLVoJrVKKf4uz\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220294f0bf6e53b75354b6d974b38b9a995111d86869380db056c63fa0c62bd2d1b64736f6c63430007040033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220294f0bf6e53b75354b6d974b38b9a995111d86869380db056c63fa0c62bd2d1b64736f6c63430007040033",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "403:9770:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "403:9770:6:-:0;;;;;;;;",
  "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(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.buf.length > 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, max(buf.capacity, len) * 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, max(buf.capacity, 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",
  "sourcePath": "@ensdomains/buffer/contracts/Buffer.sol",
  "ast": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        1452
      ]
    },
    "id": 1453,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 980,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:6"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 981,
          "nodeType": "StructuredDocumentation",
          "src": "26:376:6",
          "text": " @dev A library for working with mutable byte buffers in Solidity.\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."
        },
        "fullyImplemented": true,
        "id": 1452,
        "linearizedBaseContracts": [
          1452
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 986,
            "members": [
              {
                "constant": false,
                "id": 983,
                "mutability": "mutable",
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 986,
                "src": "702:9:6",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 982,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:6",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 985,
                "mutability": "mutable",
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 986,
                "src": "721:13:6",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 984,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:6",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 1452,
            "src": "678:63:6",
            "visibility": "public"
          },
          {
            "body": {
              "id": 1021,
              "nodeType": "Block",
              "src": "1063:361:6",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1000,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 998,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 996,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 991,
                        "src": "1077:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "hexValue": "3332",
                        "id": 997,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 999,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1011,
                  "nodeType": "IfStatement",
                  "src": "1073:81:6",
                  "trueBody": {
                    "id": 1010,
                    "nodeType": "Block",
                    "src": "1097:57:6",
                    "statements": [
                      {
                        "expression": {
                          "id": 1008,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1001,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 991,
                            "src": "1111:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1007,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 1002,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1005,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 1003,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 991,
                                    "src": "1129:8:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "hexValue": "3332",
                                    "id": 1004,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1006,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1009,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:6"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 1016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 1012,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 989,
                        "src": "1209:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1014,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "1209:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1015,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 991,
                      "src": "1224:8:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1017,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:6"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "1251:147:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "1265:22:6",
                        "value": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1282:4:6",
                              "type": "",
                              "value": "0x40"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "1276:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1276:11:6"
                        },
                        "variables": [
                          {
                            "name": "ptr",
                            "nodeType": "YulTypedName",
                            "src": "1269:3:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "1307:3:6"
                            },
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1312:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1300:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1300:16:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1300:16:6"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1336:3:6"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1341:1:6",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1329:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1329:14:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1329:14:6"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1363:4:6",
                              "type": "",
                              "value": "0x40"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "ptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "1373:3:6"
                                },
                                {
                                  "name": "capacity",
                                  "nodeType": "YulIdentifier",
                                  "src": "1378:8:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "1369:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "1369:18:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1356:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1356:32:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1356:32:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 989,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1307:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 991,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1378:8:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1018,
                  "nodeType": "InlineAssembly",
                  "src": "1242:156:6"
                },
                {
                  "expression": {
                    "id": 1019,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 989,
                    "src": "1414:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 995,
                  "id": 1020,
                  "nodeType": "Return",
                  "src": "1407:10:6"
                }
              ]
            },
            "documentation": {
              "id": 987,
              "nodeType": "StructuredDocumentation",
              "src": "747:226:6",
              "text": " @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": 1022,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 992,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 989,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1022,
                  "src": "992:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 988,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "992:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 991,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1022,
                  "src": "1011:13:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 990,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "991:34:6"
            },
            "returnParameters": {
              "id": 995,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 994,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1022,
                  "src": "1048:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 993,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "1048:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:6"
            },
            "scope": 1452,
            "src": "978:446:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1048,
              "nodeType": "Block",
              "src": "1739:108:6",
              "statements": [
                {
                  "assignments": [
                    1031
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1031,
                      "mutability": "mutable",
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1048,
                      "src": "1749:17:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "id": 1030,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 986,
                        "src": "1749:6:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1032,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1749:17:6"
                },
                {
                  "expression": {
                    "id": 1037,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 1033,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1031,
                        "src": "1776:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1035,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 983,
                      "src": "1776:7:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 1036,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1025,
                      "src": "1786:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1776:11:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 1038,
                  "nodeType": "ExpressionStatement",
                  "src": "1776:11:6"
                },
                {
                  "expression": {
                    "id": 1044,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 1039,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1031,
                        "src": "1797:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1041,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "1797:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "expression": {
                        "id": 1042,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1025,
                        "src": "1812:1:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 1043,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "src": "1812:8:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1797:23:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 1045,
                  "nodeType": "ExpressionStatement",
                  "src": "1797:23:6"
                },
                {
                  "expression": {
                    "id": 1046,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1031,
                    "src": "1837:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1029,
                  "id": 1047,
                  "nodeType": "Return",
                  "src": "1830:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1023,
              "nodeType": "StructuredDocumentation",
              "src": "1430:232:6",
              "text": " @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": 1049,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1026,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1025,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1049,
                  "src": "1686:14:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1024,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1686:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1685:16:6"
            },
            "returnParameters": {
              "id": 1029,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1028,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1049,
                  "src": "1724:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1027,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "1724:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1723:15:6"
            },
            "scope": 1452,
            "src": "1667:180:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1071,
              "nodeType": "Block",
              "src": "1916:104:6",
              "statements": [
                {
                  "assignments": [
                    1057
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1057,
                      "mutability": "mutable",
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 1071,
                      "src": "1926:19:6",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 1056,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1926:5:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1060,
                  "initialValue": {
                    "expression": {
                      "id": 1058,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1051,
                      "src": "1948:3:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 1059,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 983,
                    "src": "1948:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1926:29:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1062,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1051,
                        "src": "1970:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 1063,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1053,
                        "src": "1975:8:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 1061,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1022,
                      "src": "1965:4:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1064,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1965:19:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1065,
                  "nodeType": "ExpressionStatement",
                  "src": "1965:19:6"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1067,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1051,
                        "src": "2001:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 1068,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1057,
                        "src": "2006:6:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 1066,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1211,
                        1232
                      ],
                      "referencedDeclaration": 1232,
                      "src": "1994:6:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1069,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1994:19:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 1070,
                  "nodeType": "ExpressionStatement",
                  "src": "1994:19:6"
                }
              ]
            },
            "id": 1072,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1054,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1051,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1072,
                  "src": "1869:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1050,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "1869:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1053,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 1072,
                  "src": "1888:13:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1052,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1888:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1868:34:6"
            },
            "returnParameters": {
              "id": 1055,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1916:0:6"
            },
            "scope": 1452,
            "src": "1853:167:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1090,
              "nodeType": "Block",
              "src": "2082:78:6",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1083,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1081,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1074,
                      "src": "2096:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 1082,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1076,
                      "src": "2100:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2096:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1087,
                  "nodeType": "IfStatement",
                  "src": "2092:44:6",
                  "trueBody": {
                    "id": 1086,
                    "nodeType": "Block",
                    "src": "2103:33:6",
                    "statements": [
                      {
                        "expression": {
                          "id": 1084,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1074,
                          "src": "2124:1:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 1080,
                        "id": 1085,
                        "nodeType": "Return",
                        "src": "2117:8:6"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 1088,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1076,
                    "src": "2152:1:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 1080,
                  "id": 1089,
                  "nodeType": "Return",
                  "src": "2145:8:6"
                }
              ]
            },
            "id": 1091,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1077,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1074,
                  "mutability": "mutable",
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 1091,
                  "src": "2039:6:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1073,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2039:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1076,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 1091,
                  "src": "2047:6:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1075,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2047:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2038:16:6"
            },
            "returnParameters": {
              "id": 1080,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1079,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1091,
                  "src": "2076:4:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1078,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2076:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2075:6:6"
            },
            "scope": 1452,
            "src": "2026:134:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1102,
              "nodeType": "Block",
              "src": "2383:123:6",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "2402:78:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "2416:24:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "2436:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "2430:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2430:10:6"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "2420:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "2460:6:6"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "2468:1:6",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "2453:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2453:17:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "2453:17:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1094,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "2436:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1099,
                  "nodeType": "InlineAssembly",
                  "src": "2393:87:6"
                },
                {
                  "expression": {
                    "id": 1100,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1094,
                    "src": "2496:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1098,
                  "id": 1101,
                  "nodeType": "Return",
                  "src": "2489:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1092,
              "nodeType": "StructuredDocumentation",
              "src": "2166:137:6",
              "text": " @dev Sets buffer length to 0.\n @param buf The buffer to truncate.\n @return The original buffer, for chaining.."
            },
            "id": 1103,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1095,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1094,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1103,
                  "src": "2326:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1093,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "2326:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2325:19:6"
            },
            "returnParameters": {
              "id": 1098,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1097,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1103,
                  "src": "2368:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1096,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "2368:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2367:15:6"
            },
            "scope": 1452,
            "src": "2308:198:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1188,
              "nodeType": "Block",
              "src": "2976:1233:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1121,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1118,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1112,
                          "src": "2994:3:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "id": 1119,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1110,
                            "src": "3001:4:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 1120,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "3001:11:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2994:18:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 1117,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2986:7:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 1122,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2986:27:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 1123,
                  "nodeType": "ExpressionStatement",
                  "src": "2986:27:6"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1133,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1130,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 1126,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 1124,
                          "name": "off",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1108,
                          "src": "3028:3:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "+",
                        "rightExpression": {
                          "id": 1125,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1112,
                          "src": "3034:3:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3028:9:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "expression": {
                          "expression": {
                            "id": 1127,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1106,
                            "src": "3040:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1128,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "3040:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1129,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "3040:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3028:26:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 1131,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1106,
                        "src": "3057:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1132,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "3057:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3028:41:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1148,
                  "nodeType": "IfStatement",
                  "src": "3024:117:6",
                  "trueBody": {
                    "id": 1147,
                    "nodeType": "Block",
                    "src": "3071:70:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1135,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1106,
                              "src": "3092:3:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1144,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 1137,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1106,
                                      "src": "3101:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 1138,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 985,
                                    "src": "3101:12:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1141,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 1139,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1112,
                                      "src": "3115:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 1140,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1108,
                                      "src": "3121:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3115:9:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1136,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1091,
                                  "src": "3097:3:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1142,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3097:28:6",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 1143,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3128:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3097:32:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1134,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1072,
                            "src": "3085:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1145,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3085:45:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1146,
                        "nodeType": "ExpressionStatement",
                        "src": "3085:45:6"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1150
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1150,
                      "mutability": "mutable",
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 1188,
                      "src": "3151:9:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1149,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3151:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1151,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3151:9:6"
                },
                {
                  "assignments": [
                    1153
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1153,
                      "mutability": "mutable",
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 1188,
                      "src": "3170:8:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1152,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3170:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1154,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3170:8:6"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3197:502:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3260:24:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "3280:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3274:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3274:10:6"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "3264:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3343:27:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "3363:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3357:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3357:13:6"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "3347:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3462:33:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "3478:6:6"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "3486:2:6",
                                  "type": "",
                                  "value": "32"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3474:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3474:15:6"
                            },
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "3491:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3470:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3470:25:6"
                        },
                        "variableNames": [
                          {
                            "name": "dest",
                            "nodeType": "YulIdentifier",
                            "src": "3462:4:6"
                          }
                        ]
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "3595:61:6",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "3620:6:6"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "3632:3:6"
                                      },
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "3637:3:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "3628:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3628:13:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3613:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3613:29:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3613:29:6"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "3576:3:6"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "3581:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3572:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3572:13:6"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "3587:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "3569:2:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3569:25:6"
                        },
                        "nodeType": "YulIf",
                        "src": "3566:2:6"
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3669:20:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "3680:4:6"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "3686:2:6",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3676:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3676:13:6"
                        },
                        "variableNames": [
                          {
                            "name": "src",
                            "nodeType": "YulIdentifier",
                            "src": "3669:3:6"
                          }
                        ]
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1106,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3280:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1110,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3680:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1150,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3462:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1112,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3576:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1112,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3632:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1108,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3491:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1108,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3581:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1108,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3637:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1153,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3669:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1155,
                  "nodeType": "InlineAssembly",
                  "src": "3188:511:6"
                },
                {
                  "body": {
                    "id": 1172,
                    "nodeType": "Block",
                    "src": "3788:136:6",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3811:56:6",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "dest",
                                    "nodeType": "YulIdentifier",
                                    "src": "3836:4:6"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "src",
                                        "nodeType": "YulIdentifier",
                                        "src": "3848:3:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "mload",
                                      "nodeType": "YulIdentifier",
                                      "src": "3842:5:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3842:10:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3829:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3829:24:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3829:24:6"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 1150,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3836:4:6",
                            "valueSize": 1
                          },
                          {
                            "declaration": 1153,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3848:3:6",
                            "valueSize": 1
                          }
                        ],
                        "id": 1163,
                        "nodeType": "InlineAssembly",
                        "src": "3802:65:6"
                      },
                      {
                        "expression": {
                          "id": 1166,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1164,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1150,
                            "src": "3880:4:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 1165,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3888:2:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3880:10:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1167,
                        "nodeType": "ExpressionStatement",
                        "src": "3880:10:6"
                      },
                      {
                        "expression": {
                          "id": 1170,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 1168,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1153,
                            "src": "3904:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 1169,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3911:2:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3904:9:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 1171,
                        "nodeType": "ExpressionStatement",
                        "src": "3904:9:6"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1158,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1156,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1112,
                      "src": "3766:3:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "hexValue": "3332",
                      "id": 1157,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3773:2:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3766:9:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1173,
                  "loopExpression": {
                    "expression": {
                      "id": 1161,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "id": 1159,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1112,
                        "src": "3777:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "hexValue": "3332",
                        "id": 1160,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3784:2:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3777:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 1162,
                    "nodeType": "ExpressionStatement",
                    "src": "3777:9:6"
                  },
                  "nodeType": "ForStatement",
                  "src": "3759:165:6"
                },
                {
                  "assignments": [
                    1175
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1175,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1188,
                      "src": "3966:9:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1174,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3966:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1184,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1183,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1181,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 1176,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3978:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "components": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1179,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 1177,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3986:2:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 1178,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1112,
                              "src": "3991:3:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3986:8:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 1180,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3985:10:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3978:17:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 1182,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3998:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3978:21:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3966:33:6"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "4018:164:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4032:41:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "src",
                                  "nodeType": "YulIdentifier",
                                  "src": "4057:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4051:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4051:10:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "mask",
                                  "nodeType": "YulIdentifier",
                                  "src": "4067:4:6"
                                }
                              ],
                              "functionName": {
                                "name": "not",
                                "nodeType": "YulIdentifier",
                                "src": "4063:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4063:9:6"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4047:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4047:26:6"
                        },
                        "variables": [
                          {
                            "name": "srcpart",
                            "nodeType": "YulTypedName",
                            "src": "4036:7:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4086:38:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "dest",
                                  "nodeType": "YulIdentifier",
                                  "src": "4112:4:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4106:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4106:11:6"
                            },
                            {
                              "name": "mask",
                              "nodeType": "YulIdentifier",
                              "src": "4119:4:6"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4102:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4102:22:6"
                        },
                        "variables": [
                          {
                            "name": "destpart",
                            "nodeType": "YulTypedName",
                            "src": "4090:8:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "4144:4:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "destpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4153:8:6"
                                },
                                {
                                  "name": "srcpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4163:7:6"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "4150:2:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4150:21:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "4137:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4137:35:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "4137:35:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1150,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4112:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1150,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4144:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1175,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4067:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1175,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4119:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1153,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4057:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1185,
                  "nodeType": "InlineAssembly",
                  "src": "4009:173:6"
                },
                {
                  "expression": {
                    "id": 1186,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1106,
                    "src": "4199:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1116,
                  "id": 1187,
                  "nodeType": "Return",
                  "src": "4192:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1104,
              "nodeType": "StructuredDocumentation",
              "src": "2512:349:6",
              "text": " @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": 1189,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1113,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1106,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1189,
                  "src": "2881:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1105,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "2881:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1108,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1189,
                  "src": "2900:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1107,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2900:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1110,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1189,
                  "src": "2910:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1109,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2910:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1112,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1189,
                  "src": "2929:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1111,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2929:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2880:58:6"
            },
            "returnParameters": {
              "id": 1116,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1115,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1189,
                  "src": "2961:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1114,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "2961:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2960:15:6"
            },
            "scope": 1452,
            "src": "2866:1343:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1210,
              "nodeType": "Block",
              "src": "4625:61:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1202,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1192,
                        "src": "4648:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 1203,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1192,
                            "src": "4653:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1204,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "4653:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1205,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "4653:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1206,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1194,
                        "src": "4669:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "id": 1207,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1196,
                        "src": "4675:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_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": 1201,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1189,
                        1338
                      ],
                      "referencedDeclaration": 1189,
                      "src": "4642:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1208,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4642:37:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1200,
                  "id": 1209,
                  "nodeType": "Return",
                  "src": "4635:44:6"
                }
              ]
            },
            "documentation": {
              "id": 1190,
              "nodeType": "StructuredDocumentation",
              "src": "4215:303:6",
              "text": " @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": 1211,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1197,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1192,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1211,
                  "src": "4539:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1191,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "4539:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1194,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1211,
                  "src": "4558:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1193,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4558:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1196,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1211,
                  "src": "4577:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1195,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4577:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4538:48:6"
            },
            "returnParameters": {
              "id": 1200,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1199,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1211,
                  "src": "4610:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1198,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "4610:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4609:15:6"
            },
            "scope": 1452,
            "src": "4523:163:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1231,
              "nodeType": "Block",
              "src": "5046:69:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1222,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1214,
                        "src": "5069:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 1223,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1214,
                            "src": "5074:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1224,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "5074:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1225,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5074:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1226,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1216,
                        "src": "5090:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "expression": {
                          "id": 1227,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 1216,
                          "src": "5096:4:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1228,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5096:11:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_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": 1221,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1189,
                        1338
                      ],
                      "referencedDeclaration": 1189,
                      "src": "5063:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1229,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5063:45:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1220,
                  "id": 1230,
                  "nodeType": "Return",
                  "src": "5056:52:6"
                }
              ]
            },
            "documentation": {
              "id": 1212,
              "nodeType": "StructuredDocumentation",
              "src": "4692:257:6",
              "text": " @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": 1232,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1217,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1214,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1232,
                  "src": "4970:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1213,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "4970:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1216,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1232,
                  "src": "4989:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 1215,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4989:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4969:38:6"
            },
            "returnParameters": {
              "id": 1220,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1219,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1232,
                  "src": "5031:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1218,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "5031:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5030:15:6"
            },
            "scope": 1452,
            "src": "4954:161:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1261,
              "nodeType": "Block",
              "src": "5525:616:6",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1247,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 1244,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1237,
                      "src": "5539:3:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 1245,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1235,
                        "src": "5545:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1246,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "5545:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5539:18:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1257,
                  "nodeType": "IfStatement",
                  "src": "5535:78:6",
                  "trueBody": {
                    "id": 1256,
                    "nodeType": "Block",
                    "src": "5559:54:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1249,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1235,
                              "src": "5580:3:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1253,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 1250,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1235,
                                  "src": "5585:3:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 1251,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 985,
                                "src": "5585:12:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 1252,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5600:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5585:16:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1248,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1072,
                            "src": "5573:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1254,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5573:29:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1255,
                        "nodeType": "ExpressionStatement",
                        "src": "5573:29:6"
                      }
                    ]
                  }
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "5632:483:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5695:24:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "5715:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5709:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5709:10:6"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "5699:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5778:27:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "5798:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5792:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5792:13:6"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "5782:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5888:37:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "5908:6:6"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "5916:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "5904:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "5904:16:6"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "5922:2:6",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "5900:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5900:25:6"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "5892:4:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "5946:4:6"
                            },
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "5952:4:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore8",
                            "nodeType": "YulIdentifier",
                            "src": "5938:7:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5938:19:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "5938:19:6"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "6043:62:6",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "6068:6:6"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "buflen",
                                        "nodeType": "YulIdentifier",
                                        "src": "6080:6:6"
                                      },
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "6088:1:6",
                                        "type": "",
                                        "value": "1"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "6076:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "6076:14:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "6061:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "6061:30:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "6061:30:6"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "6030:3:6"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "6035:6:6"
                            }
                          ],
                          "functionName": {
                            "name": "eq",
                            "nodeType": "YulIdentifier",
                            "src": "6027:2:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "6027:15:6"
                        },
                        "nodeType": "YulIf",
                        "src": "6024:2:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1235,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5715:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1239,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5952:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1237,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5916:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1237,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "6030:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1258,
                  "nodeType": "InlineAssembly",
                  "src": "5623:492:6"
                },
                {
                  "expression": {
                    "id": 1259,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1235,
                    "src": "6131:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1243,
                  "id": 1260,
                  "nodeType": "Return",
                  "src": "6124:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1233,
              "nodeType": "StructuredDocumentation",
              "src": "5121:301:6",
              "text": " @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": 1262,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1240,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1235,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1262,
                  "src": "5447:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1234,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "5447:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1237,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1262,
                  "src": "5466:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1236,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5466:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1239,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1262,
                  "src": "5476:10:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 1238,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5476:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5446:41:6"
            },
            "returnParameters": {
              "id": 1243,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1242,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1262,
                  "src": "5510:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1241,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "5510:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5509:15:6"
            },
            "scope": 1452,
            "src": "5427:714:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1280,
              "nodeType": "Block",
              "src": "6493:61:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1273,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1265,
                        "src": "6521:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 1274,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1265,
                            "src": "6526:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1275,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "6526:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1276,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "6526:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1277,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1267,
                        "src": "6542:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 1272,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1262,
                      "src": "6510:10:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1278,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6510:37:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1271,
                  "id": 1279,
                  "nodeType": "Return",
                  "src": "6503:44:6"
                }
              ]
            },
            "documentation": {
              "id": 1263,
              "nodeType": "StructuredDocumentation",
              "src": "6147:252:6",
              "text": " @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": 1281,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1268,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1265,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1281,
                  "src": "6425:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1264,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "6425:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1267,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1281,
                  "src": "6444:10:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 1266,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6444:5:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6424:31:6"
            },
            "returnParameters": {
              "id": 1271,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1270,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1281,
                  "src": "6478:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1269,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "6478:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6477:15:6"
            },
            "scope": 1452,
            "src": "6404:150:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1337,
              "nodeType": "Block",
              "src": "7031:706:6",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1300,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1297,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1295,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1290,
                        "src": "7045:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 1296,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1286,
                        "src": "7051:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7045:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 1298,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1284,
                        "src": "7057:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1299,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "7057:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7045:24:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1313,
                  "nodeType": "IfStatement",
                  "src": "7041:94:6",
                  "trueBody": {
                    "id": 1312,
                    "nodeType": "Block",
                    "src": "7071:64:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1302,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1284,
                              "src": "7092:3:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1309,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 1304,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1284,
                                      "src": "7101:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 1305,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 985,
                                    "src": "7101:12:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "id": 1306,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1290,
                                    "src": "7115:3:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1303,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1091,
                                  "src": "7097:3:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1307,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7097:22:6",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 1308,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7122:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7097:26:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1301,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1072,
                            "src": "7085:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1310,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7085:39:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1311,
                        "nodeType": "ExpressionStatement",
                        "src": "7085:39:6"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1315
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1315,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1337,
                      "src": "7145:9:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1314,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7145:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1321,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1320,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1318,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 1316,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7157:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 1317,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1290,
                        "src": "7164:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7157:10:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 1319,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7170:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7157:14:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7145:26:6"
                },
                {
                  "expression": {
                    "id": 1332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 1322,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1288,
                      "src": "7209:4:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 1331,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1323,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1288,
                        "src": "7216:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "components": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1329,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "38",
                              "id": 1324,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7225:1:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "components": [
                                {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 1327,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "3332",
                                    "id": 1325,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7230:2:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "id": 1326,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1290,
                                    "src": "7235:3:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7230:8:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1328,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7229:10:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7225:14:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 1330,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7224:16:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7216:24:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7209:31:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 1333,
                  "nodeType": "ExpressionStatement",
                  "src": "7209:31:6"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "7259:452:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7322:24:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "7342:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "7336:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7336:10:6"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "7326:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7435:38:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7455:6:6"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7463:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7451:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7451:16:6"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "7469:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "7447:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7447:26:6"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "7439:4:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "7493:4:6"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "7512:4:6"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "7506:5:6"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7506:11:6"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "7523:4:6"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "7519:3:6"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7519:9:6"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "7502:3:6"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "7502:27:6"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "7531:4:6"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "7499:2:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7499:37:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "7486:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7486:51:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "7486:51:6"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "7640:61:6",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "7665:6:6"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "7677:3:6"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "7682:3:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "7673:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "7673:13:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "7658:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "7658:29:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "7658:29:6"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7614:3:6"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "7619:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7610:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7610:13:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7631:6:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "7625:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7625:13:6"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "7607:2:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7607:32:6"
                        },
                        "nodeType": "YulIf",
                        "src": "7604:2:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1284,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7342:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1288,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7531:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1290,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7469:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1290,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7619:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1290,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7682:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1315,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7523:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1286,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7463:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1286,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7614:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1286,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7677:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1334,
                  "nodeType": "InlineAssembly",
                  "src": "7250:461:6"
                },
                {
                  "expression": {
                    "id": 1335,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1284,
                    "src": "7727:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1294,
                  "id": 1336,
                  "nodeType": "Return",
                  "src": "7720:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1282,
              "nodeType": "StructuredDocumentation",
              "src": "6560:362:6",
              "text": " @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": 1338,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1291,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1284,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1338,
                  "src": "6942:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1283,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "6942:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1286,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1338,
                  "src": "6961:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1285,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6961:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1288,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1338,
                  "src": "6971:12:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1287,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6971:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1290,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1338,
                  "src": "6985:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1289,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6985:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6941:53:6"
            },
            "returnParameters": {
              "id": 1294,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1293,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1338,
                  "src": "7016:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1292,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "7016:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7015:15:6"
            },
            "scope": 1452,
            "src": "6927:810:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1360,
              "nodeType": "Block",
              "src": "8146:58:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1351,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1341,
                        "src": "8169:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 1352,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1343,
                        "src": "8174:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 1355,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1345,
                            "src": "8187:4:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1354,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8179:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 1353,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8179:7:6",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1356,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8179:13:6",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 1357,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8194:2:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_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": 1350,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1189,
                        1338
                      ],
                      "referencedDeclaration": 1338,
                      "src": "8163:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1358,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8163:34:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1349,
                  "id": 1359,
                  "nodeType": "Return",
                  "src": "8156:41:6"
                }
              ]
            },
            "documentation": {
              "id": 1339,
              "nodeType": "StructuredDocumentation",
              "src": "7743:295:6",
              "text": " @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": 1361,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1346,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1341,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1361,
                  "src": "8065:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1340,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8065:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1343,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1361,
                  "src": "8084:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1342,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8084:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1345,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1361,
                  "src": "8094:12:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1344,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8094:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8064:43:6"
            },
            "returnParameters": {
              "id": 1349,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1348,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1361,
                  "src": "8131:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1347,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8131:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8130:15:6"
            },
            "scope": 1452,
            "src": "8043:161:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1383,
              "nodeType": "Block",
              "src": "8565:69:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1372,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1364,
                        "src": "8588:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 1373,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1364,
                            "src": "8593:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1374,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "8593:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1375,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "8593:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 1378,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1366,
                            "src": "8617:4:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1377,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8609:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 1376,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8609:7:6",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 1379,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8609:13:6",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 1380,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8624:2:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_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": 1371,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1189,
                        1338
                      ],
                      "referencedDeclaration": 1338,
                      "src": "8582:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1381,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8582:45:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1370,
                  "id": 1382,
                  "nodeType": "Return",
                  "src": "8575:52:6"
                }
              ]
            },
            "documentation": {
              "id": 1362,
              "nodeType": "StructuredDocumentation",
              "src": "8210:256:6",
              "text": " @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": 1384,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1367,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1364,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1384,
                  "src": "8494:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1363,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8494:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1366,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1384,
                  "src": "8513:12:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1365,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8513:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8493:33:6"
            },
            "returnParameters": {
              "id": 1370,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1369,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1384,
                  "src": "8550:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1368,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8550:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8549:15:6"
            },
            "scope": 1452,
            "src": "8471:163:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1403,
              "nodeType": "Block",
              "src": "8994:60:6",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 1395,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1387,
                        "src": "9017:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 1396,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1387,
                            "src": "9022:3:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1397,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 983,
                          "src": "9022:7:6",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1398,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "9022:14:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 1399,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1389,
                        "src": "9038:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3332",
                        "id": 1400,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9044:2:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$986_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": 1394,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        1189,
                        1338
                      ],
                      "referencedDeclaration": 1338,
                      "src": "9011:5:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$986_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1401,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9011:36:6",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1393,
                  "id": 1402,
                  "nodeType": "Return",
                  "src": "9004:43:6"
                }
              ]
            },
            "documentation": {
              "id": 1385,
              "nodeType": "StructuredDocumentation",
              "src": "8640:255:6",
              "text": " @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": 1404,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1390,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1387,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1404,
                  "src": "8923:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1386,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8923:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1389,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1404,
                  "src": "8942:12:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1388,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8942:7:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8922:33:6"
            },
            "returnParameters": {
              "id": 1393,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1392,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1404,
                  "src": "8979:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1391,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "8979:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8978:15:6"
            },
            "scope": 1452,
            "src": "8900:154:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1450,
              "nodeType": "Block",
              "src": "9528:643:6",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1423,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1420,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 1418,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1413,
                        "src": "9542:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 1419,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1409,
                        "src": "9548:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9542:9:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 1421,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1407,
                        "src": "9554:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1422,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 985,
                      "src": "9554:12:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9542:24:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 1438,
                  "nodeType": "IfStatement",
                  "src": "9538:100:6",
                  "trueBody": {
                    "id": 1437,
                    "nodeType": "Block",
                    "src": "9568:70:6",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 1425,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1407,
                              "src": "9589:3:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1434,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 1427,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1407,
                                      "src": "9598:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 1428,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 985,
                                    "src": "9598:12:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1431,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 1429,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1413,
                                      "src": "9612:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 1430,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1409,
                                      "src": "9618:3:6",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9612:9:6",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1426,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 1091,
                                  "src": "9594:3:6",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1432,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9594:28:6",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 1433,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9625:1:6",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9594:32:6",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1424,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1072,
                            "src": "9582:6:6",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$986_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1435,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9582:45:6",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1436,
                        "nodeType": "ExpressionStatement",
                        "src": "9582:45:6"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1440
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1440,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1450,
                      "src": "9648:9:6",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1439,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9648:4:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 1446,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1445,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1443,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 1441,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9660:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 1442,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1413,
                        "src": "9667:3:6",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9660:10:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 1444,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9673:1:6",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9660:14:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9648:26:6"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "9693:452:6",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9756:24:6",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "9776:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "9770:5:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9770:10:6"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "9760:6:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9869:38:6",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "9889:6:6"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "9897:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "9885:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9885:16:6"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "9903:3:6"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "9881:3:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9881:26:6"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "9873:4:6",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "9927:4:6"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "9946:4:6"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "9940:5:6"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9940:11:6"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "9957:4:6"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "9953:3:6"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9953:9:6"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "9936:3:6"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "9936:27:6"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "9965:4:6"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "9933:2:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9933:37:6"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "9920:6:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9920:51:6"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "9920:51:6"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "10074:61:6",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "10099:6:6"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "10111:3:6"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "10116:3:6"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "10107:3:6"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "10107:13:6"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "10092:6:6"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "10092:29:6"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "10092:29:6"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "10048:3:6"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "10053:3:6"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "10044:3:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10044:13:6"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "10065:6:6"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "10059:5:6"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10059:13:6"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "10041:2:6"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "10041:32:6"
                        },
                        "nodeType": "YulIf",
                        "src": "10038:2:6"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 1407,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9776:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1411,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9965:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1413,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10053:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1413,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10116:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1413,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9903:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1440,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9957:4:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1409,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10048:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1409,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10111:3:6",
                      "valueSize": 1
                    },
                    {
                      "declaration": 1409,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9897:3:6",
                      "valueSize": 1
                    }
                  ],
                  "id": 1447,
                  "nodeType": "InlineAssembly",
                  "src": "9684:461:6"
                },
                {
                  "expression": {
                    "id": 1448,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1407,
                    "src": "10161:3:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1417,
                  "id": 1449,
                  "nodeType": "Return",
                  "src": "10154:10:6"
                }
              ]
            },
            "documentation": {
              "id": 1405,
              "nodeType": "StructuredDocumentation",
              "src": "9060:359:6",
              "text": " @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": 1451,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1414,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1407,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1451,
                  "src": "9442:17:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1406,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "9442:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1409,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1451,
                  "src": "9461:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1408,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9461:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1411,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1451,
                  "src": "9471:9:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1410,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9471:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1413,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1451,
                  "src": "9482:8:6",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1412,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9482:4:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9441:50:6"
            },
            "returnParameters": {
              "id": 1417,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1416,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1451,
                  "src": "9513:13:6",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 1415,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 986,
                    "src": "9513:6:6",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$986_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9512:15:6"
            },
            "scope": 1452,
            "src": "9424:747:6",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "scope": 1453,
        "src": "403:9770:6"
      }
    ],
    "src": "0:10174:6"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
      "exportedSymbols": {
        "Buffer": [
          1452
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            ">",
            "0.4",
            ".18"
          ]
        },
        "id": 980,
        "name": "PragmaDirective",
        "src": "0:24:6"
      },
      {
        "attributes": {
          "abstract": false,
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            1452
          ],
          "name": "Buffer",
          "scope": 1453
        },
        "children": [
          {
            "attributes": {
              "text": " @dev A library for working with mutable byte buffers in Solidity.\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."
            },
            "id": 981,
            "name": "StructuredDocumentation",
            "src": "26:376:6"
          },
          {
            "attributes": {
              "canonicalName": "Buffer.buffer",
              "name": "buffer",
              "scope": 1452,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "buf",
                  "scope": 986,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "bytes",
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "bytes",
                      "type": "bytes"
                    },
                    "id": 982,
                    "name": "ElementaryTypeName",
                    "src": "702:5:6"
                  }
                ],
                "id": 983,
                "name": "VariableDeclaration",
                "src": "702:9:6"
              },
              {
                "attributes": {
                  "constant": false,
                  "mutability": "mutable",
                  "name": "capacity",
                  "scope": 986,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint",
                      "type": "uint256"
                    },
                    "id": 984,
                    "name": "ElementaryTypeName",
                    "src": "721:4:6"
                  }
                ],
                "id": 985,
                "name": "VariableDeclaration",
                "src": "721:13:6"
              }
            ],
            "id": 986,
            "name": "StructDefinition",
            "src": "678:63:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "init",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 987,
                "name": "StructuredDocumentation",
                "src": "747:226:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1022,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 988,
                        "name": "UserDefinedTypeName",
                        "src": "992:6:6"
                      }
                    ],
                    "id": 989,
                    "name": "VariableDeclaration",
                    "src": "992:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "capacity",
                      "scope": 1022,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 990,
                        "name": "ElementaryTypeName",
                        "src": "1011:4:6"
                      }
                    ],
                    "id": 991,
                    "name": "VariableDeclaration",
                    "src": "1011:13:6"
                  }
                ],
                "id": 992,
                "name": "ParameterList",
                "src": "991:34:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1022,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 993,
                        "name": "UserDefinedTypeName",
                        "src": "1048:6:6"
                      }
                    ],
                    "id": 994,
                    "name": "VariableDeclaration",
                    "src": "1048:13:6"
                  }
                ],
                "id": 995,
                "name": "ParameterList",
                "src": "1047:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "%",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 991,
                                  "type": "uint256",
                                  "value": "capacity"
                                },
                                "id": 996,
                                "name": "Identifier",
                                "src": "1077:8:6"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "3332",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 32",
                                  "value": "32"
                                },
                                "id": 997,
                                "name": "Literal",
                                "src": "1088:2:6"
                              }
                            ],
                            "id": 998,
                            "name": "BinaryOperation",
                            "src": "1077:13:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 999,
                            "name": "Literal",
                            "src": "1094:1:6"
                          }
                        ],
                        "id": 1000,
                        "name": "BinaryOperation",
                        "src": "1077:18:6"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "+=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 991,
                                      "type": "uint256",
                                      "value": "capacity"
                                    },
                                    "id": 1001,
                                    "name": "Identifier",
                                    "src": "1111:8:6"
                                  },
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "-",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "hexvalue": "3332",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 32",
                                          "value": "32"
                                        },
                                        "id": 1002,
                                        "name": "Literal",
                                        "src": "1123:2:6"
                                      },
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "%",
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 991,
                                                  "type": "uint256",
                                                  "value": "capacity"
                                                },
                                                "id": 1003,
                                                "name": "Identifier",
                                                "src": "1129:8:6"
                                              },
                                              {
                                                "attributes": {
                                                  "hexvalue": "3332",
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "lValueRequested": false,
                                                  "token": "number",
                                                  "type": "int_const 32",
                                                  "value": "32"
                                                },
                                                "id": 1004,
                                                "name": "Literal",
                                                "src": "1140:2:6"
                                              }
                                            ],
                                            "id": 1005,
                                            "name": "BinaryOperation",
                                            "src": "1129:13:6"
                                          }
                                        ],
                                        "id": 1006,
                                        "name": "TupleExpression",
                                        "src": "1128:15:6"
                                      }
                                    ],
                                    "id": 1007,
                                    "name": "BinaryOperation",
                                    "src": "1123:20:6"
                                  }
                                ],
                                "id": 1008,
                                "name": "Assignment",
                                "src": "1111:32:6"
                              }
                            ],
                            "id": 1009,
                            "name": "ExpressionStatement",
                            "src": "1111:32:6"
                          }
                        ],
                        "id": 1010,
                        "name": "Block",
                        "src": "1097:57:6"
                      }
                    ],
                    "id": 1011,
                    "name": "IfStatement",
                    "src": "1073:81:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 989,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1012,
                                "name": "Identifier",
                                "src": "1209:3:6"
                              }
                            ],
                            "id": 1014,
                            "name": "MemberAccess",
                            "src": "1209:12:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 991,
                              "type": "uint256",
                              "value": "capacity"
                            },
                            "id": 1015,
                            "name": "Identifier",
                            "src": "1224:8:6"
                          }
                        ],
                        "id": 1016,
                        "name": "Assignment",
                        "src": "1209:23:6"
                      }
                    ],
                    "id": 1017,
                    "name": "ExpressionStatement",
                    "src": "1209:23:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 989,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "1307:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 991,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "1378:8:6",
                          "valueSize": 1
                        }
                      ],
                      "operations": "{\n    let ptr := mload(0x40)\n    mstore(buf, ptr)\n    mstore(ptr, 0)\n    mstore(0x40, add(ptr, capacity))\n}"
                    },
                    "children": [],
                    "id": 1018,
                    "name": "InlineAssembly",
                    "src": "1242:156:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 995
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 989,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1019,
                        "name": "Identifier",
                        "src": "1414:3:6"
                      }
                    ],
                    "id": 1020,
                    "name": "Return",
                    "src": "1407:10:6"
                  }
                ],
                "id": 1021,
                "name": "Block",
                "src": "1063:361:6"
              }
            ],
            "id": 1022,
            "name": "FunctionDefinition",
            "src": "978:446:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "fromBytes",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1023,
                "name": "StructuredDocumentation",
                "src": "1430:232:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "b",
                      "scope": 1049,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 1024,
                        "name": "ElementaryTypeName",
                        "src": "1686:5:6"
                      }
                    ],
                    "id": 1025,
                    "name": "VariableDeclaration",
                    "src": "1686:14:6"
                  }
                ],
                "id": 1026,
                "name": "ParameterList",
                "src": "1685:16:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1049,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1027,
                        "name": "UserDefinedTypeName",
                        "src": "1724:6:6"
                      }
                    ],
                    "id": 1028,
                    "name": "VariableDeclaration",
                    "src": "1724:13:6"
                  }
                ],
                "id": 1029,
                "name": "ParameterList",
                "src": "1723:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        1031
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "buf",
                          "scope": 1048,
                          "stateVariable": false,
                          "storageLocation": "memory",
                          "type": "struct Buffer.buffer",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "buffer",
                              "referencedDeclaration": 986,
                              "type": "struct Buffer.buffer"
                            },
                            "id": 1030,
                            "name": "UserDefinedTypeName",
                            "src": "1749:6:6"
                          }
                        ],
                        "id": 1031,
                        "name": "VariableDeclaration",
                        "src": "1749:17:6"
                      }
                    ],
                    "id": 1032,
                    "name": "VariableDeclarationStatement",
                    "src": "1749:17:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes memory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "buf",
                              "referencedDeclaration": 983,
                              "type": "bytes memory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1031,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1033,
                                "name": "Identifier",
                                "src": "1776:3:6"
                              }
                            ],
                            "id": 1035,
                            "name": "MemberAccess",
                            "src": "1776:7:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1025,
                              "type": "bytes memory",
                              "value": "b"
                            },
                            "id": 1036,
                            "name": "Identifier",
                            "src": "1786:1:6"
                          }
                        ],
                        "id": 1037,
                        "name": "Assignment",
                        "src": "1776:11:6"
                      }
                    ],
                    "id": 1038,
                    "name": "ExpressionStatement",
                    "src": "1776:11:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1031,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1039,
                                "name": "Identifier",
                                "src": "1797:3:6"
                              }
                            ],
                            "id": 1041,
                            "name": "MemberAccess",
                            "src": "1797:12:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1025,
                                  "type": "bytes memory",
                                  "value": "b"
                                },
                                "id": 1042,
                                "name": "Identifier",
                                "src": "1812:1:6"
                              }
                            ],
                            "id": 1043,
                            "name": "MemberAccess",
                            "src": "1812:8:6"
                          }
                        ],
                        "id": 1044,
                        "name": "Assignment",
                        "src": "1797:23:6"
                      }
                    ],
                    "id": 1045,
                    "name": "ExpressionStatement",
                    "src": "1797:23:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1029
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1031,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1046,
                        "name": "Identifier",
                        "src": "1837:3:6"
                      }
                    ],
                    "id": 1047,
                    "name": "Return",
                    "src": "1830:10:6"
                  }
                ],
                "id": 1048,
                "name": "Block",
                "src": "1739:108:6"
              }
            ],
            "id": 1049,
            "name": "FunctionDefinition",
            "src": "1667:180:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "resize",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "private"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1072,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1050,
                        "name": "UserDefinedTypeName",
                        "src": "1869:6:6"
                      }
                    ],
                    "id": 1051,
                    "name": "VariableDeclaration",
                    "src": "1869:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "capacity",
                      "scope": 1072,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1052,
                        "name": "ElementaryTypeName",
                        "src": "1888:4:6"
                      }
                    ],
                    "id": 1053,
                    "name": "VariableDeclaration",
                    "src": "1888:13:6"
                  }
                ],
                "id": 1054,
                "name": "ParameterList",
                "src": "1868:34:6"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 1055,
                "name": "ParameterList",
                "src": "1916:0:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        1057
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "oldbuf",
                          "scope": 1071,
                          "stateVariable": false,
                          "storageLocation": "memory",
                          "type": "bytes",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bytes",
                              "type": "bytes"
                            },
                            "id": 1056,
                            "name": "ElementaryTypeName",
                            "src": "1926:5:6"
                          }
                        ],
                        "id": 1057,
                        "name": "VariableDeclaration",
                        "src": "1926:19:6"
                      },
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "member_name": "buf",
                          "referencedDeclaration": 983,
                          "type": "bytes memory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1051,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1058,
                            "name": "Identifier",
                            "src": "1948:3:6"
                          }
                        ],
                        "id": 1059,
                        "name": "MemberAccess",
                        "src": "1948:7:6"
                      }
                    ],
                    "id": 1060,
                    "name": "VariableDeclarationStatement",
                    "src": "1926:29:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                  "typeString": "struct Buffer.buffer memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1022,
                              "type": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "init"
                            },
                            "id": 1061,
                            "name": "Identifier",
                            "src": "1965:4:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1051,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1062,
                            "name": "Identifier",
                            "src": "1970:3:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1053,
                              "type": "uint256",
                              "value": "capacity"
                            },
                            "id": 1063,
                            "name": "Identifier",
                            "src": "1975:8:6"
                          }
                        ],
                        "id": 1064,
                        "name": "FunctionCall",
                        "src": "1965:19:6"
                      }
                    ],
                    "id": 1065,
                    "name": "ExpressionStatement",
                    "src": "1965:19:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                  "typeString": "struct Buffer.buffer memory"
                                },
                                {
                                  "typeIdentifier": "t_bytes_memory_ptr",
                                  "typeString": "bytes memory"
                                }
                              ],
                              "overloadedDeclarations": [
                                1211,
                                1232
                              ],
                              "referencedDeclaration": 1232,
                              "type": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)",
                              "value": "append"
                            },
                            "id": 1066,
                            "name": "Identifier",
                            "src": "1994:6:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1051,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1067,
                            "name": "Identifier",
                            "src": "2001:3:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1057,
                              "type": "bytes memory",
                              "value": "oldbuf"
                            },
                            "id": 1068,
                            "name": "Identifier",
                            "src": "2006:6:6"
                          }
                        ],
                        "id": 1069,
                        "name": "FunctionCall",
                        "src": "1994:19:6"
                      }
                    ],
                    "id": 1070,
                    "name": "ExpressionStatement",
                    "src": "1994:19:6"
                  }
                ],
                "id": 1071,
                "name": "Block",
                "src": "1916:104:6"
              }
            ],
            "id": 1072,
            "name": "FunctionDefinition",
            "src": "1853:167:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "max",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "private"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "a",
                      "scope": 1091,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1073,
                        "name": "ElementaryTypeName",
                        "src": "2039:4:6"
                      }
                    ],
                    "id": 1074,
                    "name": "VariableDeclaration",
                    "src": "2039:6:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "b",
                      "scope": 1091,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1075,
                        "name": "ElementaryTypeName",
                        "src": "2047:4:6"
                      }
                    ],
                    "id": 1076,
                    "name": "VariableDeclaration",
                    "src": "2047:6:6"
                  }
                ],
                "id": 1077,
                "name": "ParameterList",
                "src": "2038:16:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1091,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1078,
                        "name": "ElementaryTypeName",
                        "src": "2076:4:6"
                      }
                    ],
                    "id": 1079,
                    "name": "VariableDeclaration",
                    "src": "2076:4:6"
                  }
                ],
                "id": 1080,
                "name": "ParameterList",
                "src": "2075:6:6"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1074,
                              "type": "uint256",
                              "value": "a"
                            },
                            "id": 1081,
                            "name": "Identifier",
                            "src": "2096:1:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1076,
                              "type": "uint256",
                              "value": "b"
                            },
                            "id": 1082,
                            "name": "Identifier",
                            "src": "2100:1:6"
                          }
                        ],
                        "id": 1083,
                        "name": "BinaryOperation",
                        "src": "2096:5:6"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "functionReturnParameters": 1080
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1074,
                                  "type": "uint256",
                                  "value": "a"
                                },
                                "id": 1084,
                                "name": "Identifier",
                                "src": "2124:1:6"
                              }
                            ],
                            "id": 1085,
                            "name": "Return",
                            "src": "2117:8:6"
                          }
                        ],
                        "id": 1086,
                        "name": "Block",
                        "src": "2103:33:6"
                      }
                    ],
                    "id": 1087,
                    "name": "IfStatement",
                    "src": "2092:44:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1080
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1076,
                          "type": "uint256",
                          "value": "b"
                        },
                        "id": 1088,
                        "name": "Identifier",
                        "src": "2152:1:6"
                      }
                    ],
                    "id": 1089,
                    "name": "Return",
                    "src": "2145:8:6"
                  }
                ],
                "id": 1090,
                "name": "Block",
                "src": "2082:78:6"
              }
            ],
            "id": 1091,
            "name": "FunctionDefinition",
            "src": "2026:134:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "truncate",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @dev Sets buffer length to 0.\n @param buf The buffer to truncate.\n @return The original buffer, for chaining.."
                },
                "id": 1092,
                "name": "StructuredDocumentation",
                "src": "2166:137:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1103,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1093,
                        "name": "UserDefinedTypeName",
                        "src": "2326:6:6"
                      }
                    ],
                    "id": 1094,
                    "name": "VariableDeclaration",
                    "src": "2326:17:6"
                  }
                ],
                "id": 1095,
                "name": "ParameterList",
                "src": "2325:19:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1103,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1096,
                        "name": "UserDefinedTypeName",
                        "src": "2368:6:6"
                      }
                    ],
                    "id": 1097,
                    "name": "VariableDeclaration",
                    "src": "2368:13:6"
                  }
                ],
                "id": 1098,
                "name": "ParameterList",
                "src": "2367:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1094,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "2436:3:6",
                          "valueSize": 1
                        }
                      ],
                      "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}"
                    },
                    "children": [],
                    "id": 1099,
                    "name": "InlineAssembly",
                    "src": "2393:87:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1098
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1094,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1100,
                        "name": "Identifier",
                        "src": "2496:3:6"
                      }
                    ],
                    "id": 1101,
                    "name": "Return",
                    "src": "2489:10:6"
                  }
                ],
                "id": 1102,
                "name": "Block",
                "src": "2383:123:6"
              }
            ],
            "id": 1103,
            "name": "FunctionDefinition",
            "src": "2308:198:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "write",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1104,
                "name": "StructuredDocumentation",
                "src": "2512:349:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1189,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1105,
                        "name": "UserDefinedTypeName",
                        "src": "2881:6:6"
                      }
                    ],
                    "id": 1106,
                    "name": "VariableDeclaration",
                    "src": "2881:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "off",
                      "scope": 1189,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1107,
                        "name": "ElementaryTypeName",
                        "src": "2900:4:6"
                      }
                    ],
                    "id": 1108,
                    "name": "VariableDeclaration",
                    "src": "2900:8:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1189,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 1109,
                        "name": "ElementaryTypeName",
                        "src": "2910:5:6"
                      }
                    ],
                    "id": 1110,
                    "name": "VariableDeclaration",
                    "src": "2910:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "len",
                      "scope": 1189,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1111,
                        "name": "ElementaryTypeName",
                        "src": "2929:4:6"
                      }
                    ],
                    "id": 1112,
                    "name": "VariableDeclaration",
                    "src": "2929:8:6"
                  }
                ],
                "id": 1113,
                "name": "ParameterList",
                "src": "2880:58:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1189,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1114,
                        "name": "UserDefinedTypeName",
                        "src": "2961:6:6"
                      }
                    ],
                    "id": 1115,
                    "name": "VariableDeclaration",
                    "src": "2961:13:6"
                  }
                ],
                "id": 1116,
                "name": "ParameterList",
                "src": "2960:15:6"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool) pure",
                              "value": "require"
                            },
                            "id": 1117,
                            "name": "Identifier",
                            "src": "2986:7:6"
                          },
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1112,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1118,
                                "name": "Identifier",
                                "src": "2994:3:6"
                              },
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1110,
                                      "type": "bytes memory",
                                      "value": "data"
                                    },
                                    "id": 1119,
                                    "name": "Identifier",
                                    "src": "3001:4:6"
                                  }
                                ],
                                "id": 1120,
                                "name": "MemberAccess",
                                "src": "3001:11:6"
                              }
                            ],
                            "id": 1121,
                            "name": "BinaryOperation",
                            "src": "2994:18:6"
                          }
                        ],
                        "id": 1122,
                        "name": "FunctionCall",
                        "src": "2986:27:6"
                      }
                    ],
                    "id": 1123,
                    "name": "ExpressionStatement",
                    "src": "2986:27:6"
                  },
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "+",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "+",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1108,
                                      "type": "uint256",
                                      "value": "off"
                                    },
                                    "id": 1124,
                                    "name": "Identifier",
                                    "src": "3028:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1112,
                                      "type": "uint256",
                                      "value": "len"
                                    },
                                    "id": 1125,
                                    "name": "Identifier",
                                    "src": "3034:3:6"
                                  }
                                ],
                                "id": 1126,
                                "name": "BinaryOperation",
                                "src": "3028:9:6"
                              },
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "length",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "buf",
                                      "referencedDeclaration": 983,
                                      "type": "bytes memory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 1106,
                                          "type": "struct Buffer.buffer memory",
                                          "value": "buf"
                                        },
                                        "id": 1127,
                                        "name": "Identifier",
                                        "src": "3040:3:6"
                                      }
                                    ],
                                    "id": 1128,
                                    "name": "MemberAccess",
                                    "src": "3040:7:6"
                                  }
                                ],
                                "id": 1129,
                                "name": "MemberAccess",
                                "src": "3040:14:6"
                              }
                            ],
                            "id": 1130,
                            "name": "BinaryOperation",
                            "src": "3028:26:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1106,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1131,
                                "name": "Identifier",
                                "src": "3057:3:6"
                              }
                            ],
                            "id": 1132,
                            "name": "MemberAccess",
                            "src": "3057:12:6"
                          }
                        ],
                        "id": 1133,
                        "name": "BinaryOperation",
                        "src": "3028:41:6"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                          "typeString": "struct Buffer.buffer memory"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1072,
                                      "type": "function (struct Buffer.buffer memory,uint256) pure",
                                      "value": "resize"
                                    },
                                    "id": 1134,
                                    "name": "Identifier",
                                    "src": "3085:6:6"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1106,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1135,
                                    "name": "Identifier",
                                    "src": "3092:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "*",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 1091,
                                              "type": "function (uint256,uint256) pure returns (uint256)",
                                              "value": "max"
                                            },
                                            "id": 1136,
                                            "name": "Identifier",
                                            "src": "3097:3:6"
                                          },
                                          {
                                            "attributes": {
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "capacity",
                                              "referencedDeclaration": 985,
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1106,
                                                  "type": "struct Buffer.buffer memory",
                                                  "value": "buf"
                                                },
                                                "id": 1137,
                                                "name": "Identifier",
                                                "src": "3101:3:6"
                                              }
                                            ],
                                            "id": 1138,
                                            "name": "MemberAccess",
                                            "src": "3101:12:6"
                                          },
                                          {
                                            "attributes": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "+",
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1112,
                                                  "type": "uint256",
                                                  "value": "len"
                                                },
                                                "id": 1139,
                                                "name": "Identifier",
                                                "src": "3115:3:6"
                                              },
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1108,
                                                  "type": "uint256",
                                                  "value": "off"
                                                },
                                                "id": 1140,
                                                "name": "Identifier",
                                                "src": "3121:3:6"
                                              }
                                            ],
                                            "id": 1141,
                                            "name": "BinaryOperation",
                                            "src": "3115:9:6"
                                          }
                                        ],
                                        "id": 1142,
                                        "name": "FunctionCall",
                                        "src": "3097:28:6"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "32",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 2",
                                          "value": "2"
                                        },
                                        "id": 1143,
                                        "name": "Literal",
                                        "src": "3128:1:6"
                                      }
                                    ],
                                    "id": 1144,
                                    "name": "BinaryOperation",
                                    "src": "3097:32:6"
                                  }
                                ],
                                "id": 1145,
                                "name": "FunctionCall",
                                "src": "3085:45:6"
                              }
                            ],
                            "id": 1146,
                            "name": "ExpressionStatement",
                            "src": "3085:45:6"
                          }
                        ],
                        "id": 1147,
                        "name": "Block",
                        "src": "3071:70:6"
                      }
                    ],
                    "id": 1148,
                    "name": "IfStatement",
                    "src": "3024:117:6"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        1150
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "dest",
                          "scope": 1188,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 1149,
                            "name": "ElementaryTypeName",
                            "src": "3151:4:6"
                          }
                        ],
                        "id": 1150,
                        "name": "VariableDeclaration",
                        "src": "3151:9:6"
                      }
                    ],
                    "id": 1151,
                    "name": "VariableDeclarationStatement",
                    "src": "3151:9:6"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        1153
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "src",
                          "scope": 1188,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 1152,
                            "name": "ElementaryTypeName",
                            "src": "3170:4:6"
                          }
                        ],
                        "id": 1153,
                        "name": "VariableDeclaration",
                        "src": "3170:8:6"
                      }
                    ],
                    "id": 1154,
                    "name": "VariableDeclarationStatement",
                    "src": "3170:8:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1106,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3280:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1110,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3680:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1150,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3462:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1112,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3576:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1112,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3632:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1108,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3491:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1108,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3581:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1108,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3637:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1153,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "3669:3:6",
                          "valueSize": 1
                        }
                      ],
                      "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}"
                    },
                    "children": [],
                    "id": 1155,
                    "name": "InlineAssembly",
                    "src": "3188:511:6"
                  },
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1112,
                              "type": "uint256",
                              "value": "len"
                            },
                            "id": 1156,
                            "name": "Identifier",
                            "src": "3766:3:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "3332",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 32",
                              "value": "32"
                            },
                            "id": 1157,
                            "name": "Literal",
                            "src": "3773:2:6"
                          }
                        ],
                        "id": 1158,
                        "name": "BinaryOperation",
                        "src": "3766:9:6"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "-=",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1112,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1159,
                                "name": "Identifier",
                                "src": "3777:3:6"
                              },
                              {
                                "attributes": {
                                  "hexvalue": "3332",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 32",
                                  "value": "32"
                                },
                                "id": 1160,
                                "name": "Literal",
                                "src": "3784:2:6"
                              }
                            ],
                            "id": 1161,
                            "name": "Assignment",
                            "src": "3777:9:6"
                          }
                        ],
                        "id": 1162,
                        "name": "ExpressionStatement",
                        "src": "3777:9:6"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "evmVersion": "istanbul",
                              "externalReferences": [
                                {
                                  "declaration": 1150,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "3836:4:6",
                                  "valueSize": 1
                                },
                                {
                                  "declaration": 1153,
                                  "isOffset": false,
                                  "isSlot": false,
                                  "src": "3848:3:6",
                                  "valueSize": 1
                                }
                              ],
                              "operations": "{ mstore(dest, mload(src)) }"
                            },
                            "children": [],
                            "id": 1163,
                            "name": "InlineAssembly",
                            "src": "3802:65:6"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "+=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1150,
                                      "type": "uint256",
                                      "value": "dest"
                                    },
                                    "id": 1164,
                                    "name": "Identifier",
                                    "src": "3880:4:6"
                                  },
                                  {
                                    "attributes": {
                                      "hexvalue": "3332",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "token": "number",
                                      "type": "int_const 32",
                                      "value": "32"
                                    },
                                    "id": 1165,
                                    "name": "Literal",
                                    "src": "3888:2:6"
                                  }
                                ],
                                "id": 1166,
                                "name": "Assignment",
                                "src": "3880:10:6"
                              }
                            ],
                            "id": 1167,
                            "name": "ExpressionStatement",
                            "src": "3880:10:6"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "+=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1153,
                                      "type": "uint256",
                                      "value": "src"
                                    },
                                    "id": 1168,
                                    "name": "Identifier",
                                    "src": "3904:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "hexvalue": "3332",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "token": "number",
                                      "type": "int_const 32",
                                      "value": "32"
                                    },
                                    "id": 1169,
                                    "name": "Literal",
                                    "src": "3911:2:6"
                                  }
                                ],
                                "id": 1170,
                                "name": "Assignment",
                                "src": "3904:9:6"
                              }
                            ],
                            "id": 1171,
                            "name": "ExpressionStatement",
                            "src": "3904:9:6"
                          }
                        ],
                        "id": 1172,
                        "name": "Block",
                        "src": "3788:136:6"
                      }
                    ],
                    "id": 1173,
                    "name": "ForStatement",
                    "src": "3759:165:6"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        1175
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "mask",
                          "scope": 1188,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 1174,
                            "name": "ElementaryTypeName",
                            "src": "3966:4:6"
                          }
                        ],
                        "id": 1175,
                        "name": "VariableDeclaration",
                        "src": "3966:9:6"
                      },
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "-",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "**",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "hexvalue": "323536",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 256",
                                  "value": "256"
                                },
                                "id": 1176,
                                "name": "Literal",
                                "src": "3978:3:6"
                              },
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "-",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "hexvalue": "3332",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 32",
                                          "value": "32"
                                        },
                                        "id": 1177,
                                        "name": "Literal",
                                        "src": "3986:2:6"
                                      },
                                      {
                                        "attributes": {
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 1112,
                                          "type": "uint256",
                                          "value": "len"
                                        },
                                        "id": 1178,
                                        "name": "Identifier",
                                        "src": "3991:3:6"
                                      }
                                    ],
                                    "id": 1179,
                                    "name": "BinaryOperation",
                                    "src": "3986:8:6"
                                  }
                                ],
                                "id": 1180,
                                "name": "TupleExpression",
                                "src": "3985:10:6"
                              }
                            ],
                            "id": 1181,
                            "name": "BinaryOperation",
                            "src": "3978:17:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "31",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 1",
                              "value": "1"
                            },
                            "id": 1182,
                            "name": "Literal",
                            "src": "3998:1:6"
                          }
                        ],
                        "id": 1183,
                        "name": "BinaryOperation",
                        "src": "3978:21:6"
                      }
                    ],
                    "id": 1184,
                    "name": "VariableDeclarationStatement",
                    "src": "3966:33:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1150,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "4112:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1150,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "4144:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1175,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "4067:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1175,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "4119:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1153,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "4057:3:6",
                          "valueSize": 1
                        }
                      ],
                      "operations": "{\n    let srcpart := and(mload(src), not(mask))\n    let destpart := and(mload(dest), mask)\n    mstore(dest, or(destpart, srcpart))\n}"
                    },
                    "children": [],
                    "id": 1185,
                    "name": "InlineAssembly",
                    "src": "4009:173:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1116
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1106,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1186,
                        "name": "Identifier",
                        "src": "4199:3:6"
                      }
                    ],
                    "id": 1187,
                    "name": "Return",
                    "src": "4192:10:6"
                  }
                ],
                "id": 1188,
                "name": "Block",
                "src": "2976:1233:6"
              }
            ],
            "id": 1189,
            "name": "FunctionDefinition",
            "src": "2866:1343:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "append",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1190,
                "name": "StructuredDocumentation",
                "src": "4215:303:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1211,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1191,
                        "name": "UserDefinedTypeName",
                        "src": "4539:6:6"
                      }
                    ],
                    "id": 1192,
                    "name": "VariableDeclaration",
                    "src": "4539:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1211,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 1193,
                        "name": "ElementaryTypeName",
                        "src": "4558:5:6"
                      }
                    ],
                    "id": 1194,
                    "name": "VariableDeclaration",
                    "src": "4558:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "len",
                      "scope": 1211,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1195,
                        "name": "ElementaryTypeName",
                        "src": "4577:4:6"
                      }
                    ],
                    "id": 1196,
                    "name": "VariableDeclaration",
                    "src": "4577:8:6"
                  }
                ],
                "id": 1197,
                "name": "ParameterList",
                "src": "4538:48:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1211,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1198,
                        "name": "UserDefinedTypeName",
                        "src": "4610:6:6"
                      }
                    ],
                    "id": 1199,
                    "name": "VariableDeclaration",
                    "src": "4610:13:6"
                  }
                ],
                "id": 1200,
                "name": "ParameterList",
                "src": "4609:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1200
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_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"
                                }
                              ],
                              "overloadedDeclarations": [
                                1189,
                                1338
                              ],
                              "referencedDeclaration": 1189,
                              "type": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "write"
                            },
                            "id": 1201,
                            "name": "Identifier",
                            "src": "4642:5:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1192,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1202,
                            "name": "Identifier",
                            "src": "4648:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "buf",
                                  "referencedDeclaration": 983,
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1192,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1203,
                                    "name": "Identifier",
                                    "src": "4653:3:6"
                                  }
                                ],
                                "id": 1204,
                                "name": "MemberAccess",
                                "src": "4653:7:6"
                              }
                            ],
                            "id": 1205,
                            "name": "MemberAccess",
                            "src": "4653:14:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1194,
                              "type": "bytes memory",
                              "value": "data"
                            },
                            "id": 1206,
                            "name": "Identifier",
                            "src": "4669:4:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1196,
                              "type": "uint256",
                              "value": "len"
                            },
                            "id": 1207,
                            "name": "Identifier",
                            "src": "4675:3:6"
                          }
                        ],
                        "id": 1208,
                        "name": "FunctionCall",
                        "src": "4642:37:6"
                      }
                    ],
                    "id": 1209,
                    "name": "Return",
                    "src": "4635:44:6"
                  }
                ],
                "id": 1210,
                "name": "Block",
                "src": "4625:61:6"
              }
            ],
            "id": 1211,
            "name": "FunctionDefinition",
            "src": "4523:163:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "append",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1212,
                "name": "StructuredDocumentation",
                "src": "4692:257:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1232,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1213,
                        "name": "UserDefinedTypeName",
                        "src": "4970:6:6"
                      }
                    ],
                    "id": 1214,
                    "name": "VariableDeclaration",
                    "src": "4970:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1232,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "bytes",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes",
                          "type": "bytes"
                        },
                        "id": 1215,
                        "name": "ElementaryTypeName",
                        "src": "4989:5:6"
                      }
                    ],
                    "id": 1216,
                    "name": "VariableDeclaration",
                    "src": "4989:17:6"
                  }
                ],
                "id": 1217,
                "name": "ParameterList",
                "src": "4969:38:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1232,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1218,
                        "name": "UserDefinedTypeName",
                        "src": "5031:6:6"
                      }
                    ],
                    "id": 1219,
                    "name": "VariableDeclaration",
                    "src": "5031:13:6"
                  }
                ],
                "id": 1220,
                "name": "ParameterList",
                "src": "5030:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1220
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_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"
                                }
                              ],
                              "overloadedDeclarations": [
                                1189,
                                1338
                              ],
                              "referencedDeclaration": 1189,
                              "type": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "write"
                            },
                            "id": 1221,
                            "name": "Identifier",
                            "src": "5063:5:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1214,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1222,
                            "name": "Identifier",
                            "src": "5069:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "buf",
                                  "referencedDeclaration": 983,
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1214,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1223,
                                    "name": "Identifier",
                                    "src": "5074:3:6"
                                  }
                                ],
                                "id": 1224,
                                "name": "MemberAccess",
                                "src": "5074:7:6"
                              }
                            ],
                            "id": 1225,
                            "name": "MemberAccess",
                            "src": "5074:14:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1216,
                              "type": "bytes memory",
                              "value": "data"
                            },
                            "id": 1226,
                            "name": "Identifier",
                            "src": "5090:4:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1216,
                                  "type": "bytes memory",
                                  "value": "data"
                                },
                                "id": 1227,
                                "name": "Identifier",
                                "src": "5096:4:6"
                              }
                            ],
                            "id": 1228,
                            "name": "MemberAccess",
                            "src": "5096:11:6"
                          }
                        ],
                        "id": 1229,
                        "name": "FunctionCall",
                        "src": "5063:45:6"
                      }
                    ],
                    "id": 1230,
                    "name": "Return",
                    "src": "5056:52:6"
                  }
                ],
                "id": 1231,
                "name": "Block",
                "src": "5046:69:6"
              }
            ],
            "id": 1232,
            "name": "FunctionDefinition",
            "src": "4954:161:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "writeUint8",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1233,
                "name": "StructuredDocumentation",
                "src": "5121:301:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1262,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1234,
                        "name": "UserDefinedTypeName",
                        "src": "5447:6:6"
                      }
                    ],
                    "id": 1235,
                    "name": "VariableDeclaration",
                    "src": "5447:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "off",
                      "scope": 1262,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1236,
                        "name": "ElementaryTypeName",
                        "src": "5466:4:6"
                      }
                    ],
                    "id": 1237,
                    "name": "VariableDeclaration",
                    "src": "5466:8:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1262,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 1238,
                        "name": "ElementaryTypeName",
                        "src": "5476:5:6"
                      }
                    ],
                    "id": 1239,
                    "name": "VariableDeclaration",
                    "src": "5476:10:6"
                  }
                ],
                "id": 1240,
                "name": "ParameterList",
                "src": "5446:41:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1262,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1241,
                        "name": "UserDefinedTypeName",
                        "src": "5510:6:6"
                      }
                    ],
                    "id": 1242,
                    "name": "VariableDeclaration",
                    "src": "5510:13:6"
                  }
                ],
                "id": 1243,
                "name": "ParameterList",
                "src": "5509:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1237,
                              "type": "uint256",
                              "value": "off"
                            },
                            "id": 1244,
                            "name": "Identifier",
                            "src": "5539:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1235,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1245,
                                "name": "Identifier",
                                "src": "5545:3:6"
                              }
                            ],
                            "id": 1246,
                            "name": "MemberAccess",
                            "src": "5545:12:6"
                          }
                        ],
                        "id": 1247,
                        "name": "BinaryOperation",
                        "src": "5539:18:6"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                          "typeString": "struct Buffer.buffer memory"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1072,
                                      "type": "function (struct Buffer.buffer memory,uint256) pure",
                                      "value": "resize"
                                    },
                                    "id": 1248,
                                    "name": "Identifier",
                                    "src": "5573:6:6"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1235,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1249,
                                    "name": "Identifier",
                                    "src": "5580:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "*",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "capacity",
                                          "referencedDeclaration": 985,
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 1235,
                                              "type": "struct Buffer.buffer memory",
                                              "value": "buf"
                                            },
                                            "id": 1250,
                                            "name": "Identifier",
                                            "src": "5585:3:6"
                                          }
                                        ],
                                        "id": 1251,
                                        "name": "MemberAccess",
                                        "src": "5585:12:6"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "32",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 2",
                                          "value": "2"
                                        },
                                        "id": 1252,
                                        "name": "Literal",
                                        "src": "5600:1:6"
                                      }
                                    ],
                                    "id": 1253,
                                    "name": "BinaryOperation",
                                    "src": "5585:16:6"
                                  }
                                ],
                                "id": 1254,
                                "name": "FunctionCall",
                                "src": "5573:29:6"
                              }
                            ],
                            "id": 1255,
                            "name": "ExpressionStatement",
                            "src": "5573:29:6"
                          }
                        ],
                        "id": 1256,
                        "name": "Block",
                        "src": "5559:54:6"
                      }
                    ],
                    "id": 1257,
                    "name": "IfStatement",
                    "src": "5535:78:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1235,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "5715:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1239,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "5952:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1237,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "5916:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1237,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "6030:3:6",
                          "valueSize": 1
                        }
                      ],
                      "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}"
                    },
                    "children": [],
                    "id": 1258,
                    "name": "InlineAssembly",
                    "src": "5623:492:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1243
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1235,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1259,
                        "name": "Identifier",
                        "src": "6131:3:6"
                      }
                    ],
                    "id": 1260,
                    "name": "Return",
                    "src": "6124:10:6"
                  }
                ],
                "id": 1261,
                "name": "Block",
                "src": "5525:616:6"
              }
            ],
            "id": 1262,
            "name": "FunctionDefinition",
            "src": "5427:714:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "appendUint8",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1263,
                "name": "StructuredDocumentation",
                "src": "6147:252:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1281,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1264,
                        "name": "UserDefinedTypeName",
                        "src": "6425:6:6"
                      }
                    ],
                    "id": 1265,
                    "name": "VariableDeclaration",
                    "src": "6425:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1281,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 1266,
                        "name": "ElementaryTypeName",
                        "src": "6444:5:6"
                      }
                    ],
                    "id": 1267,
                    "name": "VariableDeclaration",
                    "src": "6444:10:6"
                  }
                ],
                "id": 1268,
                "name": "ParameterList",
                "src": "6424:31:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1281,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1269,
                        "name": "UserDefinedTypeName",
                        "src": "6478:6:6"
                      }
                    ],
                    "id": 1270,
                    "name": "VariableDeclaration",
                    "src": "6478:13:6"
                  }
                ],
                "id": 1271,
                "name": "ParameterList",
                "src": "6477:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1271
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                  "typeString": "struct Buffer.buffer memory"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1262,
                              "type": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)",
                              "value": "writeUint8"
                            },
                            "id": 1272,
                            "name": "Identifier",
                            "src": "6510:10:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1265,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1273,
                            "name": "Identifier",
                            "src": "6521:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "buf",
                                  "referencedDeclaration": 983,
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1265,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1274,
                                    "name": "Identifier",
                                    "src": "6526:3:6"
                                  }
                                ],
                                "id": 1275,
                                "name": "MemberAccess",
                                "src": "6526:7:6"
                              }
                            ],
                            "id": 1276,
                            "name": "MemberAccess",
                            "src": "6526:14:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1267,
                              "type": "uint8",
                              "value": "data"
                            },
                            "id": 1277,
                            "name": "Identifier",
                            "src": "6542:4:6"
                          }
                        ],
                        "id": 1278,
                        "name": "FunctionCall",
                        "src": "6510:37:6"
                      }
                    ],
                    "id": 1279,
                    "name": "Return",
                    "src": "6503:44:6"
                  }
                ],
                "id": 1280,
                "name": "Block",
                "src": "6493:61:6"
              }
            ],
            "id": 1281,
            "name": "FunctionDefinition",
            "src": "6404:150:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "write",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "private"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1282,
                "name": "StructuredDocumentation",
                "src": "6560:362:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1338,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1283,
                        "name": "UserDefinedTypeName",
                        "src": "6942:6:6"
                      }
                    ],
                    "id": 1284,
                    "name": "VariableDeclaration",
                    "src": "6942:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "off",
                      "scope": 1338,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1285,
                        "name": "ElementaryTypeName",
                        "src": "6961:4:6"
                      }
                    ],
                    "id": 1286,
                    "name": "VariableDeclaration",
                    "src": "6961:8:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1338,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 1287,
                        "name": "ElementaryTypeName",
                        "src": "6971:7:6"
                      }
                    ],
                    "id": 1288,
                    "name": "VariableDeclaration",
                    "src": "6971:12:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "len",
                      "scope": 1338,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1289,
                        "name": "ElementaryTypeName",
                        "src": "6985:4:6"
                      }
                    ],
                    "id": 1290,
                    "name": "VariableDeclaration",
                    "src": "6985:8:6"
                  }
                ],
                "id": 1291,
                "name": "ParameterList",
                "src": "6941:53:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1338,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1292,
                        "name": "UserDefinedTypeName",
                        "src": "7016:6:6"
                      }
                    ],
                    "id": 1293,
                    "name": "VariableDeclaration",
                    "src": "7016:13:6"
                  }
                ],
                "id": 1294,
                "name": "ParameterList",
                "src": "7015:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "+",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1290,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1295,
                                "name": "Identifier",
                                "src": "7045:3:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1286,
                                  "type": "uint256",
                                  "value": "off"
                                },
                                "id": 1296,
                                "name": "Identifier",
                                "src": "7051:3:6"
                              }
                            ],
                            "id": 1297,
                            "name": "BinaryOperation",
                            "src": "7045:9:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1284,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1298,
                                "name": "Identifier",
                                "src": "7057:3:6"
                              }
                            ],
                            "id": 1299,
                            "name": "MemberAccess",
                            "src": "7057:12:6"
                          }
                        ],
                        "id": 1300,
                        "name": "BinaryOperation",
                        "src": "7045:24:6"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                          "typeString": "struct Buffer.buffer memory"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1072,
                                      "type": "function (struct Buffer.buffer memory,uint256) pure",
                                      "value": "resize"
                                    },
                                    "id": 1301,
                                    "name": "Identifier",
                                    "src": "7085:6:6"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1284,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1302,
                                    "name": "Identifier",
                                    "src": "7092:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "*",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 1091,
                                              "type": "function (uint256,uint256) pure returns (uint256)",
                                              "value": "max"
                                            },
                                            "id": 1303,
                                            "name": "Identifier",
                                            "src": "7097:3:6"
                                          },
                                          {
                                            "attributes": {
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "capacity",
                                              "referencedDeclaration": 985,
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1284,
                                                  "type": "struct Buffer.buffer memory",
                                                  "value": "buf"
                                                },
                                                "id": 1304,
                                                "name": "Identifier",
                                                "src": "7101:3:6"
                                              }
                                            ],
                                            "id": 1305,
                                            "name": "MemberAccess",
                                            "src": "7101:12:6"
                                          },
                                          {
                                            "attributes": {
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 1290,
                                              "type": "uint256",
                                              "value": "len"
                                            },
                                            "id": 1306,
                                            "name": "Identifier",
                                            "src": "7115:3:6"
                                          }
                                        ],
                                        "id": 1307,
                                        "name": "FunctionCall",
                                        "src": "7097:22:6"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "32",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 2",
                                          "value": "2"
                                        },
                                        "id": 1308,
                                        "name": "Literal",
                                        "src": "7122:1:6"
                                      }
                                    ],
                                    "id": 1309,
                                    "name": "BinaryOperation",
                                    "src": "7097:26:6"
                                  }
                                ],
                                "id": 1310,
                                "name": "FunctionCall",
                                "src": "7085:39:6"
                              }
                            ],
                            "id": 1311,
                            "name": "ExpressionStatement",
                            "src": "7085:39:6"
                          }
                        ],
                        "id": 1312,
                        "name": "Block",
                        "src": "7071:64:6"
                      }
                    ],
                    "id": 1313,
                    "name": "IfStatement",
                    "src": "7041:94:6"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        1315
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "mask",
                          "scope": 1337,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 1314,
                            "name": "ElementaryTypeName",
                            "src": "7145:4:6"
                          }
                        ],
                        "id": 1315,
                        "name": "VariableDeclaration",
                        "src": "7145:9:6"
                      },
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "-",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "**",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "hexvalue": "323536",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 256",
                                  "value": "256"
                                },
                                "id": 1316,
                                "name": "Literal",
                                "src": "7157:3:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1290,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1317,
                                "name": "Identifier",
                                "src": "7164:3:6"
                              }
                            ],
                            "id": 1318,
                            "name": "BinaryOperation",
                            "src": "7157:10:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "31",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 1",
                              "value": "1"
                            },
                            "id": 1319,
                            "name": "Literal",
                            "src": "7170:1:6"
                          }
                        ],
                        "id": 1320,
                        "name": "BinaryOperation",
                        "src": "7157:14:6"
                      }
                    ],
                    "id": 1321,
                    "name": "VariableDeclarationStatement",
                    "src": "7145:26:6"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "bytes32"
                        },
                        "children": [
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1288,
                              "type": "bytes32",
                              "value": "data"
                            },
                            "id": 1322,
                            "name": "Identifier",
                            "src": "7209:4:6"
                          },
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": ">>",
                              "type": "bytes32"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1288,
                                  "type": "bytes32",
                                  "value": "data"
                                },
                                "id": 1323,
                                "name": "Identifier",
                                "src": "7216:4:6"
                              },
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isInlineArray": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "*",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "hexvalue": "38",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 8",
                                          "value": "8"
                                        },
                                        "id": 1324,
                                        "name": "Literal",
                                        "src": "7225:1:6"
                                      },
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isInlineArray": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "type": "uint256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "-",
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "hexvalue": "3332",
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "lValueRequested": false,
                                                  "token": "number",
                                                  "type": "int_const 32",
                                                  "value": "32"
                                                },
                                                "id": 1325,
                                                "name": "Literal",
                                                "src": "7230:2:6"
                                              },
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1290,
                                                  "type": "uint256",
                                                  "value": "len"
                                                },
                                                "id": 1326,
                                                "name": "Identifier",
                                                "src": "7235:3:6"
                                              }
                                            ],
                                            "id": 1327,
                                            "name": "BinaryOperation",
                                            "src": "7230:8:6"
                                          }
                                        ],
                                        "id": 1328,
                                        "name": "TupleExpression",
                                        "src": "7229:10:6"
                                      }
                                    ],
                                    "id": 1329,
                                    "name": "BinaryOperation",
                                    "src": "7225:14:6"
                                  }
                                ],
                                "id": 1330,
                                "name": "TupleExpression",
                                "src": "7224:16:6"
                              }
                            ],
                            "id": 1331,
                            "name": "BinaryOperation",
                            "src": "7216:24:6"
                          }
                        ],
                        "id": 1332,
                        "name": "Assignment",
                        "src": "7209:31:6"
                      }
                    ],
                    "id": 1333,
                    "name": "ExpressionStatement",
                    "src": "7209:31:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1284,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7342:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1288,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7531:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1290,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7469:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1290,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7619:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1290,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7682:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1315,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7523:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1286,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7463:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1286,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7614:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1286,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "7677:3:6",
                          "valueSize": 1
                        }
                      ],
                      "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}"
                    },
                    "children": [],
                    "id": 1334,
                    "name": "InlineAssembly",
                    "src": "7250:461:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1294
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1284,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1335,
                        "name": "Identifier",
                        "src": "7727:3:6"
                      }
                    ],
                    "id": 1336,
                    "name": "Return",
                    "src": "7720:10:6"
                  }
                ],
                "id": 1337,
                "name": "Block",
                "src": "7031:706:6"
              }
            ],
            "id": 1338,
            "name": "FunctionDefinition",
            "src": "6927:810:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "writeBytes20",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1339,
                "name": "StructuredDocumentation",
                "src": "7743:295:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1361,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1340,
                        "name": "UserDefinedTypeName",
                        "src": "8065:6:6"
                      }
                    ],
                    "id": 1341,
                    "name": "VariableDeclaration",
                    "src": "8065:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "off",
                      "scope": 1361,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1342,
                        "name": "ElementaryTypeName",
                        "src": "8084:4:6"
                      }
                    ],
                    "id": 1343,
                    "name": "VariableDeclaration",
                    "src": "8084:8:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1361,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes20",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes20",
                          "type": "bytes20"
                        },
                        "id": 1344,
                        "name": "ElementaryTypeName",
                        "src": "8094:7:6"
                      }
                    ],
                    "id": 1345,
                    "name": "VariableDeclaration",
                    "src": "8094:12:6"
                  }
                ],
                "id": 1346,
                "name": "ParameterList",
                "src": "8064:43:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1361,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1347,
                        "name": "UserDefinedTypeName",
                        "src": "8131:6:6"
                      }
                    ],
                    "id": 1348,
                    "name": "VariableDeclaration",
                    "src": "8131:13:6"
                  }
                ],
                "id": 1349,
                "name": "ParameterList",
                "src": "8130:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1349
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_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"
                                }
                              ],
                              "overloadedDeclarations": [
                                1189,
                                1338
                              ],
                              "referencedDeclaration": 1338,
                              "type": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "write"
                            },
                            "id": 1350,
                            "name": "Identifier",
                            "src": "8163:5:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1341,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1351,
                            "name": "Identifier",
                            "src": "8169:3:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1343,
                              "type": "uint256",
                              "value": "off"
                            },
                            "id": 1352,
                            "name": "Identifier",
                            "src": "8174:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "bytes32",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes20",
                                      "typeString": "bytes20"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "bytes32"
                                    },
                                    "id": 1353,
                                    "name": "ElementaryTypeName",
                                    "src": "8179:7:6"
                                  }
                                ],
                                "id": 1354,
                                "name": "ElementaryTypeNameExpression",
                                "src": "8179:7:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1345,
                                  "type": "bytes20",
                                  "value": "data"
                                },
                                "id": 1355,
                                "name": "Identifier",
                                "src": "8187:4:6"
                              }
                            ],
                            "id": 1356,
                            "name": "FunctionCall",
                            "src": "8179:13:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "3230",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 20",
                              "value": "20"
                            },
                            "id": 1357,
                            "name": "Literal",
                            "src": "8194:2:6"
                          }
                        ],
                        "id": 1358,
                        "name": "FunctionCall",
                        "src": "8163:34:6"
                      }
                    ],
                    "id": 1359,
                    "name": "Return",
                    "src": "8156:41:6"
                  }
                ],
                "id": 1360,
                "name": "Block",
                "src": "8146:58:6"
              }
            ],
            "id": 1361,
            "name": "FunctionDefinition",
            "src": "8043:161:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "appendBytes20",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1362,
                "name": "StructuredDocumentation",
                "src": "8210:256:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1384,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1363,
                        "name": "UserDefinedTypeName",
                        "src": "8494:6:6"
                      }
                    ],
                    "id": 1364,
                    "name": "VariableDeclaration",
                    "src": "8494:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1384,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes20",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes20",
                          "type": "bytes20"
                        },
                        "id": 1365,
                        "name": "ElementaryTypeName",
                        "src": "8513:7:6"
                      }
                    ],
                    "id": 1366,
                    "name": "VariableDeclaration",
                    "src": "8513:12:6"
                  }
                ],
                "id": 1367,
                "name": "ParameterList",
                "src": "8493:33:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1384,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1368,
                        "name": "UserDefinedTypeName",
                        "src": "8550:6:6"
                      }
                    ],
                    "id": 1369,
                    "name": "VariableDeclaration",
                    "src": "8550:13:6"
                  }
                ],
                "id": 1370,
                "name": "ParameterList",
                "src": "8549:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1370
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_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"
                                }
                              ],
                              "overloadedDeclarations": [
                                1189,
                                1338
                              ],
                              "referencedDeclaration": 1338,
                              "type": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "write"
                            },
                            "id": 1371,
                            "name": "Identifier",
                            "src": "8582:5:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1364,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1372,
                            "name": "Identifier",
                            "src": "8588:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "buf",
                                  "referencedDeclaration": 983,
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1364,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1373,
                                    "name": "Identifier",
                                    "src": "8593:3:6"
                                  }
                                ],
                                "id": 1374,
                                "name": "MemberAccess",
                                "src": "8593:7:6"
                              }
                            ],
                            "id": 1375,
                            "name": "MemberAccess",
                            "src": "8593:14:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "tryCall": false,
                              "type": "bytes32",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes20",
                                      "typeString": "bytes20"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(bytes32)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "bytes32"
                                    },
                                    "id": 1376,
                                    "name": "ElementaryTypeName",
                                    "src": "8609:7:6"
                                  }
                                ],
                                "id": 1377,
                                "name": "ElementaryTypeNameExpression",
                                "src": "8609:7:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1366,
                                  "type": "bytes20",
                                  "value": "data"
                                },
                                "id": 1378,
                                "name": "Identifier",
                                "src": "8617:4:6"
                              }
                            ],
                            "id": 1379,
                            "name": "FunctionCall",
                            "src": "8609:13:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "3230",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 20",
                              "value": "20"
                            },
                            "id": 1380,
                            "name": "Literal",
                            "src": "8624:2:6"
                          }
                        ],
                        "id": 1381,
                        "name": "FunctionCall",
                        "src": "8582:45:6"
                      }
                    ],
                    "id": 1382,
                    "name": "Return",
                    "src": "8575:52:6"
                  }
                ],
                "id": 1383,
                "name": "Block",
                "src": "8565:69:6"
              }
            ],
            "id": 1384,
            "name": "FunctionDefinition",
            "src": "8471:163:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "appendBytes32",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1385,
                "name": "StructuredDocumentation",
                "src": "8640:255:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1404,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1386,
                        "name": "UserDefinedTypeName",
                        "src": "8923:6:6"
                      }
                    ],
                    "id": 1387,
                    "name": "VariableDeclaration",
                    "src": "8923:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1404,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "bytes32",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "bytes32",
                          "type": "bytes32"
                        },
                        "id": 1388,
                        "name": "ElementaryTypeName",
                        "src": "8942:7:6"
                      }
                    ],
                    "id": 1389,
                    "name": "VariableDeclaration",
                    "src": "8942:12:6"
                  }
                ],
                "id": 1390,
                "name": "ParameterList",
                "src": "8922:33:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1404,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1391,
                        "name": "UserDefinedTypeName",
                        "src": "8979:6:6"
                      }
                    ],
                    "id": 1392,
                    "name": "VariableDeclaration",
                    "src": "8979:13:6"
                  }
                ],
                "id": 1393,
                "name": "ParameterList",
                "src": "8978:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 1393
                    },
                    "children": [
                      {
                        "attributes": {
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "struct Buffer.buffer memory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_buffer_$986_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"
                                }
                              ],
                              "overloadedDeclarations": [
                                1189,
                                1338
                              ],
                              "referencedDeclaration": 1338,
                              "type": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)",
                              "value": "write"
                            },
                            "id": 1394,
                            "name": "Identifier",
                            "src": "9011:5:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1387,
                              "type": "struct Buffer.buffer memory",
                              "value": "buf"
                            },
                            "id": 1395,
                            "name": "Identifier",
                            "src": "9017:3:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "length",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "buf",
                                  "referencedDeclaration": 983,
                                  "type": "bytes memory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1387,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1396,
                                    "name": "Identifier",
                                    "src": "9022:3:6"
                                  }
                                ],
                                "id": 1397,
                                "name": "MemberAccess",
                                "src": "9022:7:6"
                              }
                            ],
                            "id": 1398,
                            "name": "MemberAccess",
                            "src": "9022:14:6"
                          },
                          {
                            "attributes": {
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 1389,
                              "type": "bytes32",
                              "value": "data"
                            },
                            "id": 1399,
                            "name": "Identifier",
                            "src": "9038:4:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "3332",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 32",
                              "value": "32"
                            },
                            "id": 1400,
                            "name": "Literal",
                            "src": "9044:2:6"
                          }
                        ],
                        "id": 1401,
                        "name": "FunctionCall",
                        "src": "9011:36:6"
                      }
                    ],
                    "id": 1402,
                    "name": "Return",
                    "src": "9004:43:6"
                  }
                ],
                "id": 1403,
                "name": "Block",
                "src": "8994:60:6"
              }
            ],
            "id": 1404,
            "name": "FunctionDefinition",
            "src": "8900:154:6"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "writeInt",
              "scope": 1452,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "private"
            },
            "children": [
              {
                "attributes": {
                  "text": " @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": 1405,
                "name": "StructuredDocumentation",
                "src": "9060:359:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "buf",
                      "scope": 1451,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1406,
                        "name": "UserDefinedTypeName",
                        "src": "9442:6:6"
                      }
                    ],
                    "id": 1407,
                    "name": "VariableDeclaration",
                    "src": "9442:17:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "off",
                      "scope": 1451,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1408,
                        "name": "ElementaryTypeName",
                        "src": "9461:4:6"
                      }
                    ],
                    "id": 1409,
                    "name": "VariableDeclaration",
                    "src": "9461:8:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "data",
                      "scope": 1451,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1410,
                        "name": "ElementaryTypeName",
                        "src": "9471:4:6"
                      }
                    ],
                    "id": 1411,
                    "name": "VariableDeclaration",
                    "src": "9471:9:6"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "len",
                      "scope": 1451,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint",
                          "type": "uint256"
                        },
                        "id": 1412,
                        "name": "ElementaryTypeName",
                        "src": "9482:4:6"
                      }
                    ],
                    "id": 1413,
                    "name": "VariableDeclaration",
                    "src": "9482:8:6"
                  }
                ],
                "id": 1414,
                "name": "ParameterList",
                "src": "9441:50:6"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "scope": 1451,
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "type": "struct Buffer.buffer",
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "buffer",
                          "referencedDeclaration": 986,
                          "type": "struct Buffer.buffer"
                        },
                        "id": 1415,
                        "name": "UserDefinedTypeName",
                        "src": "9513:6:6"
                      }
                    ],
                    "id": 1416,
                    "name": "VariableDeclaration",
                    "src": "9513:13:6"
                  }
                ],
                "id": 1417,
                "name": "ParameterList",
                "src": "9512:15:6"
              },
              {
                "children": [
                  {
                    "attributes": {},
                    "children": [
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "+",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1413,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1418,
                                "name": "Identifier",
                                "src": "9542:3:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1409,
                                  "type": "uint256",
                                  "value": "off"
                                },
                                "id": 1419,
                                "name": "Identifier",
                                "src": "9548:3:6"
                              }
                            ],
                            "id": 1420,
                            "name": "BinaryOperation",
                            "src": "9542:9:6"
                          },
                          {
                            "attributes": {
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "capacity",
                              "referencedDeclaration": 985,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1407,
                                  "type": "struct Buffer.buffer memory",
                                  "value": "buf"
                                },
                                "id": 1421,
                                "name": "Identifier",
                                "src": "9554:3:6"
                              }
                            ],
                            "id": 1422,
                            "name": "MemberAccess",
                            "src": "9554:12:6"
                          }
                        ],
                        "id": 1423,
                        "name": "BinaryOperation",
                        "src": "9542:24:6"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_struct$_buffer_$986_memory_ptr",
                                          "typeString": "struct Buffer.buffer memory"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1072,
                                      "type": "function (struct Buffer.buffer memory,uint256) pure",
                                      "value": "resize"
                                    },
                                    "id": 1424,
                                    "name": "Identifier",
                                    "src": "9582:6:6"
                                  },
                                  {
                                    "attributes": {
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 1407,
                                      "type": "struct Buffer.buffer memory",
                                      "value": "buf"
                                    },
                                    "id": 1425,
                                    "name": "Identifier",
                                    "src": "9589:3:6"
                                  },
                                  {
                                    "attributes": {
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "*",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                }
                                              ],
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 1091,
                                              "type": "function (uint256,uint256) pure returns (uint256)",
                                              "value": "max"
                                            },
                                            "id": 1426,
                                            "name": "Identifier",
                                            "src": "9594:3:6"
                                          },
                                          {
                                            "attributes": {
                                              "isConstant": false,
                                              "isLValue": true,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "capacity",
                                              "referencedDeclaration": 985,
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1407,
                                                  "type": "struct Buffer.buffer memory",
                                                  "value": "buf"
                                                },
                                                "id": 1427,
                                                "name": "Identifier",
                                                "src": "9598:3:6"
                                              }
                                            ],
                                            "id": 1428,
                                            "name": "MemberAccess",
                                            "src": "9598:12:6"
                                          },
                                          {
                                            "attributes": {
                                              "commonType": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                              },
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "+",
                                              "type": "uint256"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1413,
                                                  "type": "uint256",
                                                  "value": "len"
                                                },
                                                "id": 1429,
                                                "name": "Identifier",
                                                "src": "9612:3:6"
                                              },
                                              {
                                                "attributes": {
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 1409,
                                                  "type": "uint256",
                                                  "value": "off"
                                                },
                                                "id": 1430,
                                                "name": "Identifier",
                                                "src": "9618:3:6"
                                              }
                                            ],
                                            "id": 1431,
                                            "name": "BinaryOperation",
                                            "src": "9612:9:6"
                                          }
                                        ],
                                        "id": 1432,
                                        "name": "FunctionCall",
                                        "src": "9594:28:6"
                                      },
                                      {
                                        "attributes": {
                                          "hexvalue": "32",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "token": "number",
                                          "type": "int_const 2",
                                          "value": "2"
                                        },
                                        "id": 1433,
                                        "name": "Literal",
                                        "src": "9625:1:6"
                                      }
                                    ],
                                    "id": 1434,
                                    "name": "BinaryOperation",
                                    "src": "9594:32:6"
                                  }
                                ],
                                "id": 1435,
                                "name": "FunctionCall",
                                "src": "9582:45:6"
                              }
                            ],
                            "id": 1436,
                            "name": "ExpressionStatement",
                            "src": "9582:45:6"
                          }
                        ],
                        "id": 1437,
                        "name": "Block",
                        "src": "9568:70:6"
                      }
                    ],
                    "id": 1438,
                    "name": "IfStatement",
                    "src": "9538:100:6"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        1440
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "mask",
                          "scope": 1450,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint",
                              "type": "uint256"
                            },
                            "id": 1439,
                            "name": "ElementaryTypeName",
                            "src": "9648:4:6"
                          }
                        ],
                        "id": 1440,
                        "name": "VariableDeclaration",
                        "src": "9648:9:6"
                      },
                      {
                        "attributes": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "-",
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "**",
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "hexvalue": "323536",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "token": "number",
                                  "type": "int_const 256",
                                  "value": "256"
                                },
                                "id": 1441,
                                "name": "Literal",
                                "src": "9660:3:6"
                              },
                              {
                                "attributes": {
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 1413,
                                  "type": "uint256",
                                  "value": "len"
                                },
                                "id": 1442,
                                "name": "Identifier",
                                "src": "9667:3:6"
                              }
                            ],
                            "id": 1443,
                            "name": "BinaryOperation",
                            "src": "9660:10:6"
                          },
                          {
                            "attributes": {
                              "hexvalue": "31",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "token": "number",
                              "type": "int_const 1",
                              "value": "1"
                            },
                            "id": 1444,
                            "name": "Literal",
                            "src": "9673:1:6"
                          }
                        ],
                        "id": 1445,
                        "name": "BinaryOperation",
                        "src": "9660:14:6"
                      }
                    ],
                    "id": 1446,
                    "name": "VariableDeclarationStatement",
                    "src": "9648:26:6"
                  },
                  {
                    "attributes": {
                      "evmVersion": "istanbul",
                      "externalReferences": [
                        {
                          "declaration": 1407,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "9776:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1411,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "9965:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1413,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "10053:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1413,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "10116:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1413,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "9903:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1440,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "9957:4:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1409,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "10048:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1409,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "10111:3:6",
                          "valueSize": 1
                        },
                        {
                          "declaration": 1409,
                          "isOffset": false,
                          "isSlot": false,
                          "src": "9897:3:6",
                          "valueSize": 1
                        }
                      ],
                      "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}"
                    },
                    "children": [],
                    "id": 1447,
                    "name": "InlineAssembly",
                    "src": "9684:461:6"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 1417
                    },
                    "children": [
                      {
                        "attributes": {
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 1407,
                          "type": "struct Buffer.buffer memory",
                          "value": "buf"
                        },
                        "id": 1448,
                        "name": "Identifier",
                        "src": "10161:3:6"
                      }
                    ],
                    "id": 1449,
                    "name": "Return",
                    "src": "10154:10:6"
                  }
                ],
                "id": 1450,
                "name": "Block",
                "src": "9528:643:6"
              }
            ],
            "id": 1451,
            "name": "FunctionDefinition",
            "src": "9424:747:6"
          }
        ],
        "id": 1452,
        "name": "ContractDefinition",
        "src": "403:9770:6"
      }
    ],
    "id": 1453,
    "name": "SourceUnit",
    "src": "0:10174:6"
  },
  "compiler": {
    "name": "solc",
    "version": "0.7.4+commit.3f05b770.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.3",
  "updatedAt": "2021-01-21T03:26:26.146Z",
  "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.",
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}