{
  "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\":\"0x3dc6d79ec7994ddf8ce80248f2d53635254b8e5b19617ee257ae5857e9da1bd1\",\"urls\":[\"bzz-raw://f72312eafad4c9d6f9917a5f4bd0555011a26bfbf86313f9d8de374097e7b61c\",\"dweb:/ipfs/QmcCBXetT1ie4GtA1N6HckQeucq7er4jc1yUbypYvMBjZv\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220358a7e59b9d8a475188afe974097bdd3e3fe62be3398a3ab00221e8be5bf518d64736f6c63430007040033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220358a7e59b9d8a475188afe974097bdd3e3fe62be3398a3ab00221e8be5bf518d64736f6c63430007040033",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "403:9735:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "403:9735:20:-: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(32, add(ptr, capacity)))\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Initializes a new buffer from an existing bytes object.\n    *      Changes to the buffer may mutate the original value.\n    * @param b The bytes object to initialize the buffer with.\n    * @return A new buffer.\n    */\n    function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n        buffer memory buf;\n        buf.buf = b;\n        buf.capacity = b.length;\n        return buf;\n    }\n\n    function resize(buffer memory buf, uint capacity) private pure {\n        bytes memory oldbuf = buf.buf;\n        init(buf, capacity);\n        append(buf, oldbuf);\n    }\n\n    function max(uint a, uint b) private pure returns(uint) {\n        if (a > b) {\n            return a;\n        }\n        return b;\n    }\n\n    /**\n    * @dev Sets buffer length to 0.\n    * @param buf The buffer to truncate.\n    * @return The original buffer, for chaining..\n    */\n    function truncate(buffer memory buf) internal pure returns (buffer memory) {\n        assembly {\n            let bufptr := mload(buf)\n            mstore(bufptr, 0)\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The start offset to write to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) {\n        require(len <= data.length);\n\n        if (off + len > buf.capacity) {\n            resize(buf, max(buf.capacity, len + off) * 2);\n        }\n\n        uint dest;\n        uint src;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Start address = buffer address + offset + sizeof(buffer length)\n            dest := add(add(bufptr, 32), off)\n            // Update buffer length if we're extending it\n            if gt(add(len, off), buflen) {\n                mstore(bufptr, add(len, off))\n            }\n            src := add(data, 32)\n        }\n\n        // Copy word-length chunks while possible\n        for (; len >= 32; len -= 32) {\n            assembly {\n                mstore(dest, mload(src))\n            }\n            dest += 32;\n            src += 32;\n        }\n\n        // Copy remaining bytes\n        uint mask = 256 ** (32 - len) - 1;\n        assembly {\n            let srcpart := and(mload(src), not(mask))\n            let destpart := and(mload(dest), mask)\n            mstore(dest, or(destpart, srcpart))\n        }\n\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, len);\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, data.length);\n    }\n\n    /**\n    * @dev Writes a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write the byte at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) {\n        if (off >= buf.capacity) {\n            resize(buf, buf.capacity * 2);\n        }\n\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Address = buffer address + sizeof(buffer length) + off\n            let dest := add(add(bufptr, off), 32)\n            mstore8(dest, data)\n            // Update buffer length if we extended it\n            if eq(off, buflen) {\n                mstore(bufptr, add(buflen, 1))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n        return writeUint8(buf, buf.buf.length, data);\n    }\n\n    /**\n    * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n    *      exceed the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (left-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, (len + off) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        // Right-align data\n        data = data >> (8 * (32 - len));\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + sizeof(buffer length) + off + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, off, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chhaining.\n    */\n    function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, 32);\n    }\n\n    /**\n    * @dev Writes an integer to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (right-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, (len + off) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + off + sizeof(buffer length) + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n}\n",
  "sourcePath": "@ensdomains/buffer/contracts/Buffer.sol",
  "ast": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        6432
      ]
    },
    "id": 6433,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5968,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:20"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 5969,
          "nodeType": "StructuredDocumentation",
          "src": "26:376:20",
          "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": 6432,
        "linearizedBaseContracts": [
          6432
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 5974,
            "members": [
              {
                "constant": false,
                "id": 5971,
                "mutability": "mutable",
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 5974,
                "src": "702:9:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 5970,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5973,
                "mutability": "mutable",
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 5974,
                "src": "721:13:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5972,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 6432,
            "src": "678:63:20",
            "visibility": "public"
          },
          {
            "body": {
              "id": 6009,
              "nodeType": "Block",
              "src": "1063:370:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5988,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5986,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 5984,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5979,
                        "src": "1077:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "hexValue": "3332",
                        "id": 5985,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 5987,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5999,
                  "nodeType": "IfStatement",
                  "src": "1073:81:20",
                  "trueBody": {
                    "id": 5998,
                    "nodeType": "Block",
                    "src": "1097:57:20",
                    "statements": [
                      {
                        "expression": {
                          "id": 5996,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5989,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5979,
                            "src": "1111:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5995,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 5990,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:20",
                              "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": 5993,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 5991,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5979,
                                    "src": "1129:8:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "hexValue": "3332",
                                    "id": 5992,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 5994,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5997,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 6004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6000,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5977,
                        "src": "1209:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6002,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "1209:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 6003,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5979,
                      "src": "1224:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6005,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "1251:156:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "1265:22:20",
                        "value": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1282:4:20",
                              "type": "",
                              "value": "0x40"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "1276:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1276:11:20"
                        },
                        "variables": [
                          {
                            "name": "ptr",
                            "nodeType": "YulTypedName",
                            "src": "1269:3:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "1307:3:20"
                            },
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1312:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1300:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1300:16:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1300:16:20"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1336:3:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1341:1:20",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1329:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1329:14:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1329:14:20"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1363:4:20",
                              "type": "",
                              "value": "0x40"
                            },
                            {
                              "arguments": [
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "1373:2:20",
                                  "type": "",
                                  "value": "32"
                                },
                                {
                                  "arguments": [
                                    {
                                      "name": "ptr",
                                      "nodeType": "YulIdentifier",
                                      "src": "1381:3:20"
                                    },
                                    {
                                      "name": "capacity",
                                      "nodeType": "YulIdentifier",
                                      "src": "1386:8:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "add",
                                    "nodeType": "YulIdentifier",
                                    "src": "1377:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "1377:18:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "1369:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "1369:27:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1356:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1356:41:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1356:41:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 5977,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1307:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5979,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1386:8:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6006,
                  "nodeType": "InlineAssembly",
                  "src": "1242:165:20"
                },
                {
                  "expression": {
                    "id": 6007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5977,
                    "src": "1423:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5983,
                  "id": 6008,
                  "nodeType": "Return",
                  "src": "1416:10:20"
                }
              ]
            },
            "documentation": {
              "id": 5975,
              "nodeType": "StructuredDocumentation",
              "src": "747:226:20",
              "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": 6010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5980,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5977,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "992:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 5976,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "992:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5979,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "1011:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5978,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "991:34:20"
            },
            "returnParameters": {
              "id": 5983,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5982,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "1048:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 5981,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1048:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:20"
            },
            "scope": 6432,
            "src": "978:455:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6036,
              "nodeType": "Block",
              "src": "1748:108:20",
              "statements": [
                {
                  "assignments": [
                    6019
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6019,
                      "mutability": "mutable",
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 6036,
                      "src": "1758:17:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "id": 6018,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5974,
                        "src": "1758:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6020,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:20"
                },
                {
                  "expression": {
                    "id": 6025,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6021,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6019,
                        "src": "1785:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6023,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5971,
                      "src": "1785:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 6024,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6013,
                      "src": "1795:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 6026,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:20"
                },
                {
                  "expression": {
                    "id": 6032,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6027,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6019,
                        "src": "1806:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6029,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "1806:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "expression": {
                        "id": 6030,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6013,
                        "src": "1821:1:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 6031,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "src": "1821:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6033,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:20"
                },
                {
                  "expression": {
                    "id": 6034,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6019,
                    "src": "1846:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6017,
                  "id": 6035,
                  "nodeType": "Return",
                  "src": "1839:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6011,
              "nodeType": "StructuredDocumentation",
              "src": "1439:232:20",
              "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": 6037,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6014,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6013,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 6037,
                  "src": "1695:14:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6012,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:20"
            },
            "returnParameters": {
              "id": 6017,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6016,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6037,
                  "src": "1733:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6015,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1733:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:20"
            },
            "scope": 6432,
            "src": "1676:180:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6059,
              "nodeType": "Block",
              "src": "1925:104:20",
              "statements": [
                {
                  "assignments": [
                    6045
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6045,
                      "mutability": "mutable",
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 6059,
                      "src": "1935:19:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 6044,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6048,
                  "initialValue": {
                    "expression": {
                      "id": 6046,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6039,
                      "src": "1957:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 6047,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 5971,
                    "src": "1957:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:20"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6050,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6039,
                        "src": "1979:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6051,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6041,
                        "src": "1984:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6049,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6010,
                      "src": "1974:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6052,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 6053,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:20"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6055,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6039,
                        "src": "2010:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6056,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6045,
                        "src": "2015:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 6054,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6195,
                        6216
                      ],
                      "referencedDeclaration": 6216,
                      "src": "2003:6:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6057,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 6058,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:20"
                }
              ]
            },
            "id": 6060,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6042,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6039,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6060,
                  "src": "1878:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6038,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1878:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6041,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 6060,
                  "src": "1897:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6040,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:20"
            },
            "returnParameters": {
              "id": 6043,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:20"
            },
            "scope": 6432,
            "src": "1862:167:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6078,
              "nodeType": "Block",
              "src": "2091:78:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6071,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6069,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6062,
                      "src": "2105:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 6070,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6064,
                      "src": "2109:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6075,
                  "nodeType": "IfStatement",
                  "src": "2101:44:20",
                  "trueBody": {
                    "id": 6074,
                    "nodeType": "Block",
                    "src": "2112:33:20",
                    "statements": [
                      {
                        "expression": {
                          "id": 6072,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6062,
                          "src": "2133:1:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6068,
                        "id": 6073,
                        "nodeType": "Return",
                        "src": "2126:8:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 6076,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6064,
                    "src": "2161:1:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 6068,
                  "id": 6077,
                  "nodeType": "Return",
                  "src": "2154:8:20"
                }
              ]
            },
            "id": 6079,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6065,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6062,
                  "mutability": "mutable",
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2048:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6061,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6064,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2056:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6063,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:20"
            },
            "returnParameters": {
              "id": 6068,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6067,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2085:4:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6066,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:20"
            },
            "scope": 6432,
            "src": "2035:134:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6090,
              "nodeType": "Block",
              "src": "2392:123:20",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "2411:78:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "2425:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "2445:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "2439:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2439:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "2429:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "2469:6:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "2477:1:20",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "2462:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2462:17:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "2462:17:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6082,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "2445:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6087,
                  "nodeType": "InlineAssembly",
                  "src": "2402:87:20"
                },
                {
                  "expression": {
                    "id": 6088,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6082,
                    "src": "2505:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6086,
                  "id": 6089,
                  "nodeType": "Return",
                  "src": "2498:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6080,
              "nodeType": "StructuredDocumentation",
              "src": "2175:137:20",
              "text": " @dev Sets buffer length to 0.\n @param buf The buffer to truncate.\n @return The original buffer, for chaining.."
            },
            "id": 6091,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6083,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6082,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6091,
                  "src": "2335:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6081,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2335:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:20"
            },
            "returnParameters": {
              "id": 6086,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6085,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6091,
                  "src": "2377:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6084,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2377:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:20"
            },
            "scope": 6432,
            "src": "2317:198:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6172,
              "nodeType": "Block",
              "src": "2985:1216:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6109,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6106,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6100,
                          "src": "3003:3:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "id": 6107,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6098,
                            "src": "3010:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 6108,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "3010:11:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 6105,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2995:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 6110,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6111,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:20"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6117,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6114,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6112,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6096,
                        "src": "3037:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6113,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6100,
                        "src": "3043:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6115,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6094,
                        "src": "3049:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6116,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "3049:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6132,
                  "nodeType": "IfStatement",
                  "src": "3033:100:20",
                  "trueBody": {
                    "id": 6131,
                    "nodeType": "Block",
                    "src": "3063:70:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6119,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6094,
                              "src": "3084:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6128,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 6121,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6094,
                                      "src": "3093:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 6122,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5973,
                                    "src": "3093:12:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6125,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6123,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6100,
                                      "src": "3107:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6124,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6096,
                                      "src": "3113:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6120,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6079,
                                  "src": "3089:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 6126,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:20",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6127,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6118,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "3077:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6129,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6130,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6134
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6134,
                      "mutability": "mutable",
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3143:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6133,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6135,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:20"
                },
                {
                  "assignments": [
                    6137
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6137,
                      "mutability": "mutable",
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3162:8:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6136,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6138,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3189:502:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3252:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "3272:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3266:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3266:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "3256:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3335:27:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "3355:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3349:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3349:13:20"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "3339:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3454:33:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "3470:6:20"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "3478:2:20",
                                  "type": "",
                                  "value": "32"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3466:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3466:15:20"
                            },
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "3483:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3462:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3462:25:20"
                        },
                        "variableNames": [
                          {
                            "name": "dest",
                            "nodeType": "YulIdentifier",
                            "src": "3454:4:20"
                          }
                        ]
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "3587:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "3612:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "3624:3:20"
                                      },
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "3629:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "3620:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3620:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3605:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3605:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3605:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "3568:3:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "3573:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3564:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3564:13:20"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "3579:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "3561:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3561:25:20"
                        },
                        "nodeType": "YulIf",
                        "src": "3558:2:20"
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3661:20:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "3672:4:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "3678:2:20",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3668:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3668:13:20"
                        },
                        "variableNames": [
                          {
                            "name": "src",
                            "nodeType": "YulIdentifier",
                            "src": "3661:3:20"
                          }
                        ]
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6094,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3272:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6098,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3672:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3454:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6100,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3568:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6100,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3624:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3483:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3573:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3629:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6137,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3661:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6139,
                  "nodeType": "InlineAssembly",
                  "src": "3180:511:20"
                },
                {
                  "body": {
                    "id": 6156,
                    "nodeType": "Block",
                    "src": "3780:136:20",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3803:56:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "dest",
                                    "nodeType": "YulIdentifier",
                                    "src": "3828:4:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "src",
                                        "nodeType": "YulIdentifier",
                                        "src": "3840:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "mload",
                                      "nodeType": "YulIdentifier",
                                      "src": "3834:5:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3834:10:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3821:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3821:24:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3821:24:20"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 6134,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3828:4:20",
                            "valueSize": 1
                          },
                          {
                            "declaration": 6137,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3840:3:20",
                            "valueSize": 1
                          }
                        ],
                        "id": 6147,
                        "nodeType": "InlineAssembly",
                        "src": "3794:65:20"
                      },
                      {
                        "expression": {
                          "id": 6150,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6148,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6134,
                            "src": "3872:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 6149,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6151,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:20"
                      },
                      {
                        "expression": {
                          "id": 6154,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6152,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6137,
                            "src": "3896:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 6153,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6155,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:20"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6142,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6140,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6100,
                      "src": "3758:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "hexValue": "3332",
                      "id": 6141,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6157,
                  "loopExpression": {
                    "expression": {
                      "id": 6145,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "id": 6143,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6100,
                        "src": "3769:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "hexValue": "3332",
                        "id": 6144,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 6146,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:20"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:20"
                },
                {
                  "assignments": [
                    6159
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6159,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3958:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6158,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6168,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6167,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6165,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6160,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:20",
                        "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": 6163,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 6161,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 6162,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6100,
                              "src": "3983:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 6164,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6166,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "4010:164:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4024:41:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "src",
                                  "nodeType": "YulIdentifier",
                                  "src": "4049:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4043:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4043:10:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "mask",
                                  "nodeType": "YulIdentifier",
                                  "src": "4059:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "not",
                                "nodeType": "YulIdentifier",
                                "src": "4055:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4055:9:20"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4039:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4039:26:20"
                        },
                        "variables": [
                          {
                            "name": "srcpart",
                            "nodeType": "YulTypedName",
                            "src": "4028:7:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4078:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "dest",
                                  "nodeType": "YulIdentifier",
                                  "src": "4104:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4098:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4098:11:20"
                            },
                            {
                              "name": "mask",
                              "nodeType": "YulIdentifier",
                              "src": "4111:4:20"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4094:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4094:22:20"
                        },
                        "variables": [
                          {
                            "name": "destpart",
                            "nodeType": "YulTypedName",
                            "src": "4082:8:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "4136:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "destpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4145:8:20"
                                },
                                {
                                  "name": "srcpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4155:7:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "4142:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4142:21:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "4129:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4129:35:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "4129:35:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4104:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4136:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6159,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4059:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6159,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4111:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6137,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4049:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6169,
                  "nodeType": "InlineAssembly",
                  "src": "4001:173:20"
                },
                {
                  "expression": {
                    "id": 6170,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6094,
                    "src": "4191:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6104,
                  "id": 6171,
                  "nodeType": "Return",
                  "src": "4184:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6092,
              "nodeType": "StructuredDocumentation",
              "src": "2521:349:20",
              "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": 6173,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6094,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2890:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6093,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2890:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6096,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2909:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6095,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6098,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2919:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6097,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6100,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2938:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6099,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:20"
            },
            "returnParameters": {
              "id": 6104,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6103,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2970:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6102,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2970:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:20"
            },
            "scope": 6432,
            "src": "2875:1326:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6194,
              "nodeType": "Block",
              "src": "4617:61:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6186,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6176,
                        "src": "4640:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6187,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6176,
                            "src": "4645:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6188,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "4645:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6189,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "4645:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6190,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6178,
                        "src": "4661:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "id": 6191,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6180,
                        "src": "4667:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6185,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6173,
                      "src": "4634:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6192,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6184,
                  "id": 6193,
                  "nodeType": "Return",
                  "src": "4627:44:20"
                }
              ]
            },
            "documentation": {
              "id": 6174,
              "nodeType": "StructuredDocumentation",
              "src": "4207:303:20",
              "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": 6195,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6181,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6176,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4531:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6175,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4531:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6178,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4550:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6177,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6180,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4569:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6179,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:20"
            },
            "returnParameters": {
              "id": 6184,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6183,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4602:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6182,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4602:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:20"
            },
            "scope": 6432,
            "src": "4515:163:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6215,
              "nodeType": "Block",
              "src": "5038:69:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6206,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6198,
                        "src": "5061:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6207,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6198,
                            "src": "5066:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6208,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "5066:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6209,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5066:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6210,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6200,
                        "src": "5082:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "expression": {
                          "id": 6211,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6200,
                          "src": "5088:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6212,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5088:11:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6205,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6173,
                      "src": "5055:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6213,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6204,
                  "id": 6214,
                  "nodeType": "Return",
                  "src": "5048:52:20"
                }
              ]
            },
            "documentation": {
              "id": 6196,
              "nodeType": "StructuredDocumentation",
              "src": "4684:257:20",
              "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": 6216,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6198,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "4962:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6197,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4962:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6200,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "4981:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6199,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:20"
            },
            "returnParameters": {
              "id": 6204,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6203,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "5023:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6202,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5023:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:20"
            },
            "scope": 6432,
            "src": "4946:161:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6245,
              "nodeType": "Block",
              "src": "5517:617:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6231,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6228,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6221,
                      "src": "5531:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "expression": {
                        "id": 6229,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6219,
                        "src": "5538:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6230,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "5538:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6241,
                  "nodeType": "IfStatement",
                  "src": "5527:79:20",
                  "trueBody": {
                    "id": 6240,
                    "nodeType": "Block",
                    "src": "5552:54:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6233,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6219,
                              "src": "5573:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6237,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6234,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6219,
                                  "src": "5578:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 6235,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5973,
                                "src": "5578:12:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6236,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6232,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "5566:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6238,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6239,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:20"
                      }
                    ]
                  }
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "5625:483:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5688:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "5708:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5702:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5702:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "5692:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5771:27:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "5791:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5785:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5785:13:20"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "5775:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5881:37:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "5901:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "5909:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "5897:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "5897:16:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "5915:2:20",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "5893:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5893:25:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "5885:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "5939:4:20"
                            },
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "5945:4:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore8",
                            "nodeType": "YulIdentifier",
                            "src": "5931:7:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5931:19:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "5931:19:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "6036:62:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "6061:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "buflen",
                                        "nodeType": "YulIdentifier",
                                        "src": "6073:6:20"
                                      },
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "6081:1:20",
                                        "type": "",
                                        "value": "1"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "6069:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "6069:14:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "6054:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "6054:30:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "6054:30:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "6023:3:20"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "6028:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "eq",
                            "nodeType": "YulIdentifier",
                            "src": "6020:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "6020:15:20"
                        },
                        "nodeType": "YulIf",
                        "src": "6017:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6219,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5708:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6223,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5945:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6221,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5909:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6221,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "6023:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6242,
                  "nodeType": "InlineAssembly",
                  "src": "5616:492:20"
                },
                {
                  "expression": {
                    "id": 6243,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6219,
                    "src": "6124:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6227,
                  "id": 6244,
                  "nodeType": "Return",
                  "src": "6117:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6217,
              "nodeType": "StructuredDocumentation",
              "src": "5113:301:20",
              "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": 6246,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6224,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6219,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5439:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6218,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5439:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6221,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5458:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6220,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6223,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5468:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6222,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:20"
            },
            "returnParameters": {
              "id": 6227,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6226,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5502:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6225,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5502:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:20"
            },
            "scope": 6432,
            "src": "5419:715:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6264,
              "nodeType": "Block",
              "src": "6486:61:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6257,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6249,
                        "src": "6514:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6258,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6249,
                            "src": "6519:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6259,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "6519:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6260,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "6519:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6261,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6251,
                        "src": "6535:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 6256,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6246,
                      "src": "6503:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6262,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6255,
                  "id": 6263,
                  "nodeType": "Return",
                  "src": "6496:44:20"
                }
              ]
            },
            "documentation": {
              "id": 6247,
              "nodeType": "StructuredDocumentation",
              "src": "6140:252:20",
              "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": 6265,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6252,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6249,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6418:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6248,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6418:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6251,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6437:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6250,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:20"
            },
            "returnParameters": {
              "id": 6255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6254,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6471:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6253,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6471:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:20"
            },
            "scope": 6432,
            "src": "6397:150:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6320,
              "nodeType": "Block",
              "src": "7024:695:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6284,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6281,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6279,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6274,
                        "src": "7038:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6280,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6270,
                        "src": "7044:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6282,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6268,
                        "src": "7050:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6283,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "7050:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6296,
                  "nodeType": "IfStatement",
                  "src": "7034:83:20",
                  "trueBody": {
                    "id": 6295,
                    "nodeType": "Block",
                    "src": "7064:53:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6286,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6268,
                              "src": "7085:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6292,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6289,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6287,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6274,
                                      "src": "7091:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6288,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6270,
                                      "src": "7097:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 6290,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6291,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6285,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "7078:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6293,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6294,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6298
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6298,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6320,
                      "src": "7127:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6297,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6304,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6303,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6301,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6299,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 6300,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6274,
                        "src": "7146:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6302,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:20"
                },
                {
                  "expression": {
                    "id": 6315,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 6305,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6272,
                      "src": "7191:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 6314,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6306,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6272,
                        "src": "7198:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "components": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 6312,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "38",
                              "id": 6307,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:20",
                              "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": 6310,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "3332",
                                    "id": 6308,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "id": 6309,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6274,
                                    "src": "7217:3:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 6311,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 6313,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 6316,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "7241:452:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7304:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "7324:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "7318:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7318:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "7308:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7417:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7437:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7445:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7433:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7433:16:20"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "7451:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "7429:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7429:26:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "7421:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "7475:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "7494:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "7488:5:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7488:11:20"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "7505:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "7501:3:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7501:9:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "7484:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "7484:27:20"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "7513:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "7481:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7481:37:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "7468:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7468:51:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "7468:51:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "7622:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "7647:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "7659:3:20"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "7664:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "7655:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "7655:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "7640:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "7640:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "7640:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7596:3:20"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "7601:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7592:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7592:13:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7613:6:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "7607:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7607:13:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "7589:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7589:32:20"
                        },
                        "nodeType": "YulIf",
                        "src": "7586:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6268,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7324:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6272,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7513:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7451:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7601:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7664:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6298,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7505:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7445:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7596:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7659:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6317,
                  "nodeType": "InlineAssembly",
                  "src": "7232:461:20"
                },
                {
                  "expression": {
                    "id": 6318,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6268,
                    "src": "7709:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6278,
                  "id": 6319,
                  "nodeType": "Return",
                  "src": "7702:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6266,
              "nodeType": "StructuredDocumentation",
              "src": "6553:362:20",
              "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": 6321,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6275,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6268,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6935:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6267,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6935:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6270,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6954:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6269,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6272,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6964:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6271,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6274,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6978:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6273,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:20"
            },
            "returnParameters": {
              "id": 6278,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6277,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "7009:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6276,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "7009:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:20"
            },
            "scope": 6432,
            "src": "6920:799:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6343,
              "nodeType": "Block",
              "src": "8128:58:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6334,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6324,
                        "src": "8151:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6335,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6326,
                        "src": "8156:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 6338,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6328,
                            "src": "8169:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 6337,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 6336,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8161:7:20",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 6339,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:20",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 6340,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6333,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8145:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6341,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6332,
                  "id": 6342,
                  "nodeType": "Return",
                  "src": "8138:41:20"
                }
              ]
            },
            "documentation": {
              "id": 6322,
              "nodeType": "StructuredDocumentation",
              "src": "7725:295:20",
              "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": 6344,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6329,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6324,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8047:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6323,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8047:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6326,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8066:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6325,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6328,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8076:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 6327,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:20"
            },
            "returnParameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6331,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8113:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6330,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8113:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:20"
            },
            "scope": 6432,
            "src": "8025:161:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6366,
              "nodeType": "Block",
              "src": "8547:69:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6355,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6347,
                        "src": "8570:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6356,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6347,
                            "src": "8575:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6357,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "8575:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6358,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "8575:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 6361,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6349,
                            "src": "8599:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 6360,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 6359,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8591:7:20",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 6362,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:20",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 6363,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6354,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8564:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6364,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6353,
                  "id": 6365,
                  "nodeType": "Return",
                  "src": "8557:52:20"
                }
              ]
            },
            "documentation": {
              "id": 6345,
              "nodeType": "StructuredDocumentation",
              "src": "8192:256:20",
              "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": 6367,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6350,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6347,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8476:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6346,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8476:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6349,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8495:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 6348,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:20"
            },
            "returnParameters": {
              "id": 6353,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6352,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8532:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6351,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8532:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:20"
            },
            "scope": 6432,
            "src": "8453:163:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6386,
              "nodeType": "Block",
              "src": "8976:60:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6378,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6370,
                        "src": "8999:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6379,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6370,
                            "src": "9004:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6380,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "9004:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6381,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "9004:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6382,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6372,
                        "src": "9020:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3332",
                        "id": 6383,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6377,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8993:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6384,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6376,
                  "id": 6385,
                  "nodeType": "Return",
                  "src": "8986:43:20"
                }
              ]
            },
            "documentation": {
              "id": 6368,
              "nodeType": "StructuredDocumentation",
              "src": "8622:255:20",
              "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": 6387,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6373,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6370,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8905:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6369,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8905:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6372,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8924:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6371,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:20"
            },
            "returnParameters": {
              "id": 6376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6375,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8961:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6374,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8961:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:20"
            },
            "scope": 6432,
            "src": "8882:154:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6430,
              "nodeType": "Block",
              "src": "9510:626:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6406,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6403,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6401,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6396,
                        "src": "9524:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6402,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6392,
                        "src": "9530:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6404,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6390,
                        "src": "9536:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6405,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "9536:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6418,
                  "nodeType": "IfStatement",
                  "src": "9520:83:20",
                  "trueBody": {
                    "id": 6417,
                    "nodeType": "Block",
                    "src": "9550:53:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6408,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6390,
                              "src": "9571:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6414,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6411,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6409,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6396,
                                      "src": "9577:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6410,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6392,
                                      "src": "9583:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 6412,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6413,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6407,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "9564:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6416,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6420
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6420,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6430,
                      "src": "9613:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6419,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6426,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6425,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6423,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6421,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 6422,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6396,
                        "src": "9632:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6424,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "9658:452:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9721:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "9741:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "9735:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9735:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "9725:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9834:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "9854:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "9862:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "9850:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9850:16:20"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "9868:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "9846:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9846:26:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "9838:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "9892:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "9911:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "9905:5:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9905:11:20"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "9922:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "9918:3:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9918:9:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "9901:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "9901:27:20"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "9930:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "9898:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9898:37:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "9885:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9885:51:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "9885:51:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "10039:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "10064:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "10076:3:20"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "10081:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "10072:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "10072:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "10057:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "10057:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "10057:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "10013:3:20"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "10018:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "10009:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10009:13:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "10030:6:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "10024:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10024:13:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "10006:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "10006:32:20"
                        },
                        "nodeType": "YulIf",
                        "src": "10003:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6390,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9741:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6394,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9930:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10018:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10081:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9868:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6420,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9922:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10013:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10076:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9862:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6427,
                  "nodeType": "InlineAssembly",
                  "src": "9649:461:20"
                },
                {
                  "expression": {
                    "id": 6428,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6390,
                    "src": "10126:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6400,
                  "id": 6429,
                  "nodeType": "Return",
                  "src": "10119:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6388,
              "nodeType": "StructuredDocumentation",
              "src": "9042:359:20",
              "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": 6431,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6397,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6390,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9424:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6389,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "9424:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6392,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9443:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6391,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6394,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9453:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6393,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6396,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9464:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6395,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:20"
            },
            "returnParameters": {
              "id": 6400,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6399,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9495:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6398,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "9495:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:20"
            },
            "scope": 6432,
            "src": "9406:730:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "scope": 6433,
        "src": "403:9735:20"
      }
    ],
    "src": "0:10139:20"
  },
  "legacyAST": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        6432
      ]
    },
    "id": 6433,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 5968,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:20"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 5969,
          "nodeType": "StructuredDocumentation",
          "src": "26:376:20",
          "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": 6432,
        "linearizedBaseContracts": [
          6432
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 5974,
            "members": [
              {
                "constant": false,
                "id": 5971,
                "mutability": "mutable",
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 5974,
                "src": "702:9:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 5970,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 5973,
                "mutability": "mutable",
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 5974,
                "src": "721:13:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 5972,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 6432,
            "src": "678:63:20",
            "visibility": "public"
          },
          {
            "body": {
              "id": 6009,
              "nodeType": "Block",
              "src": "1063:370:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 5988,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 5986,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 5984,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5979,
                        "src": "1077:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "hexValue": "3332",
                        "id": 5985,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 5987,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 5999,
                  "nodeType": "IfStatement",
                  "src": "1073:81:20",
                  "trueBody": {
                    "id": 5998,
                    "nodeType": "Block",
                    "src": "1097:57:20",
                    "statements": [
                      {
                        "expression": {
                          "id": 5996,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 5989,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5979,
                            "src": "1111:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 5995,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 5990,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:20",
                              "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": 5993,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "id": 5991,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 5979,
                                    "src": "1129:8:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "hexValue": "3332",
                                    "id": 5992,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 5994,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 5997,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 6004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6000,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5977,
                        "src": "1209:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6002,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "1209:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 6003,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 5979,
                      "src": "1224:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6005,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "1251:156:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "1265:22:20",
                        "value": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1282:4:20",
                              "type": "",
                              "value": "0x40"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "1276:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1276:11:20"
                        },
                        "variables": [
                          {
                            "name": "ptr",
                            "nodeType": "YulTypedName",
                            "src": "1269:3:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "1307:3:20"
                            },
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1312:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1300:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1300:16:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1300:16:20"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "ptr",
                              "nodeType": "YulIdentifier",
                              "src": "1336:3:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1341:1:20",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1329:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1329:14:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1329:14:20"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "1363:4:20",
                              "type": "",
                              "value": "0x40"
                            },
                            {
                              "arguments": [
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "1373:2:20",
                                  "type": "",
                                  "value": "32"
                                },
                                {
                                  "arguments": [
                                    {
                                      "name": "ptr",
                                      "nodeType": "YulIdentifier",
                                      "src": "1381:3:20"
                                    },
                                    {
                                      "name": "capacity",
                                      "nodeType": "YulIdentifier",
                                      "src": "1386:8:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "add",
                                    "nodeType": "YulIdentifier",
                                    "src": "1377:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "1377:18:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "1369:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "1369:27:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "1356:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "1356:41:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "1356:41:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 5977,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1307:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 5979,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "1386:8:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6006,
                  "nodeType": "InlineAssembly",
                  "src": "1242:165:20"
                },
                {
                  "expression": {
                    "id": 6007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 5977,
                    "src": "1423:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 5983,
                  "id": 6008,
                  "nodeType": "Return",
                  "src": "1416:10:20"
                }
              ]
            },
            "documentation": {
              "id": 5975,
              "nodeType": "StructuredDocumentation",
              "src": "747:226:20",
              "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": 6010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 5980,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5977,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "992:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 5976,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "992:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 5979,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "1011:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 5978,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "991:34:20"
            },
            "returnParameters": {
              "id": 5983,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 5982,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6010,
                  "src": "1048:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 5981,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1048:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:20"
            },
            "scope": 6432,
            "src": "978:455:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6036,
              "nodeType": "Block",
              "src": "1748:108:20",
              "statements": [
                {
                  "assignments": [
                    6019
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6019,
                      "mutability": "mutable",
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 6036,
                      "src": "1758:17:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "id": 6018,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 5974,
                        "src": "1758:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6020,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1758:17:20"
                },
                {
                  "expression": {
                    "id": 6025,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6021,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6019,
                        "src": "1785:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6023,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5971,
                      "src": "1785:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 6024,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6013,
                      "src": "1795:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1785:11:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 6026,
                  "nodeType": "ExpressionStatement",
                  "src": "1785:11:20"
                },
                {
                  "expression": {
                    "id": 6032,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "expression": {
                        "id": 6027,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6019,
                        "src": "1806:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6029,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "1806:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "expression": {
                        "id": 6030,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6013,
                        "src": "1821:1:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 6031,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "src": "1821:8:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1806:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6033,
                  "nodeType": "ExpressionStatement",
                  "src": "1806:23:20"
                },
                {
                  "expression": {
                    "id": 6034,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6019,
                    "src": "1846:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6017,
                  "id": 6035,
                  "nodeType": "Return",
                  "src": "1839:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6011,
              "nodeType": "StructuredDocumentation",
              "src": "1439:232:20",
              "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": 6037,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6014,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6013,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 6037,
                  "src": "1695:14:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6012,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1695:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1694:16:20"
            },
            "returnParameters": {
              "id": 6017,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6016,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6037,
                  "src": "1733:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6015,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1733:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1732:15:20"
            },
            "scope": 6432,
            "src": "1676:180:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6059,
              "nodeType": "Block",
              "src": "1925:104:20",
              "statements": [
                {
                  "assignments": [
                    6045
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6045,
                      "mutability": "mutable",
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 6059,
                      "src": "1935:19:20",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 6044,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1935:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6048,
                  "initialValue": {
                    "expression": {
                      "id": 6046,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6039,
                      "src": "1957:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 6047,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 5971,
                    "src": "1957:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory_ptr",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1935:29:20"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6050,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6039,
                        "src": "1979:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6051,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6041,
                        "src": "1984:8:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6049,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6010,
                      "src": "1974:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6052,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1974:19:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 6053,
                  "nodeType": "ExpressionStatement",
                  "src": "1974:19:20"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6055,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6039,
                        "src": "2010:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6056,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6045,
                        "src": "2015:6:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 6054,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6195,
                        6216
                      ],
                      "referencedDeclaration": 6216,
                      "src": "2003:6:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6057,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2003:19:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 6058,
                  "nodeType": "ExpressionStatement",
                  "src": "2003:19:20"
                }
              ]
            },
            "id": 6060,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6042,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6039,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6060,
                  "src": "1878:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6038,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "1878:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6041,
                  "mutability": "mutable",
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 6060,
                  "src": "1897:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6040,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1897:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1877:34:20"
            },
            "returnParameters": {
              "id": 6043,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1925:0:20"
            },
            "scope": 6432,
            "src": "1862:167:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6078,
              "nodeType": "Block",
              "src": "2091:78:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6071,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6069,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6062,
                      "src": "2105:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 6070,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6064,
                      "src": "2109:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2105:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6075,
                  "nodeType": "IfStatement",
                  "src": "2101:44:20",
                  "trueBody": {
                    "id": 6074,
                    "nodeType": "Block",
                    "src": "2112:33:20",
                    "statements": [
                      {
                        "expression": {
                          "id": 6072,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6062,
                          "src": "2133:1:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 6068,
                        "id": 6073,
                        "nodeType": "Return",
                        "src": "2126:8:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "id": 6076,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6064,
                    "src": "2161:1:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 6068,
                  "id": 6077,
                  "nodeType": "Return",
                  "src": "2154:8:20"
                }
              ]
            },
            "id": 6079,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6065,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6062,
                  "mutability": "mutable",
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2048:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6061,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2048:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6064,
                  "mutability": "mutable",
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2056:6:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6063,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2056:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2047:16:20"
            },
            "returnParameters": {
              "id": 6068,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6067,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6079,
                  "src": "2085:4:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6066,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2085:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2084:6:20"
            },
            "scope": 6432,
            "src": "2035:134:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6090,
              "nodeType": "Block",
              "src": "2392:123:20",
              "statements": [
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "2411:78:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "2425:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "2445:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "2439:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2439:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "2429:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "2469:6:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "2477:1:20",
                              "type": "",
                              "value": "0"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "2462:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "2462:17:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "2462:17:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6082,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "2445:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6087,
                  "nodeType": "InlineAssembly",
                  "src": "2402:87:20"
                },
                {
                  "expression": {
                    "id": 6088,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6082,
                    "src": "2505:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6086,
                  "id": 6089,
                  "nodeType": "Return",
                  "src": "2498:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6080,
              "nodeType": "StructuredDocumentation",
              "src": "2175:137:20",
              "text": " @dev Sets buffer length to 0.\n @param buf The buffer to truncate.\n @return The original buffer, for chaining.."
            },
            "id": 6091,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6083,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6082,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6091,
                  "src": "2335:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6081,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2335:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2334:19:20"
            },
            "returnParameters": {
              "id": 6086,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6085,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6091,
                  "src": "2377:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6084,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2377:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2376:15:20"
            },
            "scope": 6432,
            "src": "2317:198:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6172,
              "nodeType": "Block",
              "src": "2985:1216:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6109,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6106,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6100,
                          "src": "3003:3:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "id": 6107,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6098,
                            "src": "3010:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 6108,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "src": "3010:11:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3003:18:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 6105,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2995:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 6110,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2995:27:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6111,
                  "nodeType": "ExpressionStatement",
                  "src": "2995:27:20"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6117,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6114,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6112,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6096,
                        "src": "3037:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6113,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6100,
                        "src": "3043:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3037:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6115,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6094,
                        "src": "3049:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6116,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "3049:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3037:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6132,
                  "nodeType": "IfStatement",
                  "src": "3033:100:20",
                  "trueBody": {
                    "id": 6131,
                    "nodeType": "Block",
                    "src": "3063:70:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6119,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6094,
                              "src": "3084:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6128,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "expression": {
                                      "id": 6121,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6094,
                                      "src": "3093:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 6122,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 5973,
                                    "src": "3093:12:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6125,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6123,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6100,
                                      "src": "3107:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6124,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6096,
                                      "src": "3113:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3107:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 6120,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6079,
                                  "src": "3089:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 6126,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3089:28:20",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6127,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3120:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3089:32:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6118,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "3077:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6129,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3077:45:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6130,
                        "nodeType": "ExpressionStatement",
                        "src": "3077:45:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6134
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6134,
                      "mutability": "mutable",
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3143:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6133,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3143:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6135,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3143:9:20"
                },
                {
                  "assignments": [
                    6137
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6137,
                      "mutability": "mutable",
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3162:8:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6136,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3162:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6138,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3162:8:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "3189:502:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3252:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "3272:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3266:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3266:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "3256:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "3335:27:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "3355:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "3349:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3349:13:20"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "3339:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3454:33:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "3470:6:20"
                                },
                                {
                                  "kind": "number",
                                  "nodeType": "YulLiteral",
                                  "src": "3478:2:20",
                                  "type": "",
                                  "value": "32"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3466:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3466:15:20"
                            },
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "3483:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3462:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3462:25:20"
                        },
                        "variableNames": [
                          {
                            "name": "dest",
                            "nodeType": "YulIdentifier",
                            "src": "3454:4:20"
                          }
                        ]
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "3587:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "3612:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "3624:3:20"
                                      },
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "3629:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "3620:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3620:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3605:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3605:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3605:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "3568:3:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "3573:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "3564:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "3564:13:20"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "3579:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "3561:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3561:25:20"
                        },
                        "nodeType": "YulIf",
                        "src": "3558:2:20"
                      },
                      {
                        "nodeType": "YulAssignment",
                        "src": "3661:20:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "3672:4:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "3678:2:20",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "3668:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "3668:13:20"
                        },
                        "variableNames": [
                          {
                            "name": "src",
                            "nodeType": "YulIdentifier",
                            "src": "3661:3:20"
                          }
                        ]
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6094,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3272:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6098,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3672:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3454:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6100,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3568:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6100,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3624:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3483:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3573:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6096,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3629:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6137,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "3661:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6139,
                  "nodeType": "InlineAssembly",
                  "src": "3180:511:20"
                },
                {
                  "body": {
                    "id": 6156,
                    "nodeType": "Block",
                    "src": "3780:136:20",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "3803:56:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "dest",
                                    "nodeType": "YulIdentifier",
                                    "src": "3828:4:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "src",
                                        "nodeType": "YulIdentifier",
                                        "src": "3840:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "mload",
                                      "nodeType": "YulIdentifier",
                                      "src": "3834:5:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "3834:10:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "3821:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "3821:24:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "3821:24:20"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 6134,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3828:4:20",
                            "valueSize": 1
                          },
                          {
                            "declaration": 6137,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "3840:3:20",
                            "valueSize": 1
                          }
                        ],
                        "id": 6147,
                        "nodeType": "InlineAssembly",
                        "src": "3794:65:20"
                      },
                      {
                        "expression": {
                          "id": 6150,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6148,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6134,
                            "src": "3872:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 6149,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3880:2:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3872:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6151,
                        "nodeType": "ExpressionStatement",
                        "src": "3872:10:20"
                      },
                      {
                        "expression": {
                          "id": 6154,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 6152,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6137,
                            "src": "3896:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "hexValue": "3332",
                            "id": 6153,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3903:2:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3896:9:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 6155,
                        "nodeType": "ExpressionStatement",
                        "src": "3896:9:20"
                      }
                    ]
                  },
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6142,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6140,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6100,
                      "src": "3758:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "hexValue": "3332",
                      "id": 6141,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3765:2:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3758:9:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6157,
                  "loopExpression": {
                    "expression": {
                      "id": 6145,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "id": 6143,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6100,
                        "src": "3769:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "hexValue": "3332",
                        "id": 6144,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3776:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3769:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 6146,
                    "nodeType": "ExpressionStatement",
                    "src": "3769:9:20"
                  },
                  "nodeType": "ForStatement",
                  "src": "3751:165:20"
                },
                {
                  "assignments": [
                    6159
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6159,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6172,
                      "src": "3958:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6158,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3958:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6168,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6167,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6165,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6160,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3970:3:20",
                        "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": 6163,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "3332",
                              "id": 6161,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3978:2:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "id": 6162,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6100,
                              "src": "3983:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3978:8:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 6164,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3977:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3970:17:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6166,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3990:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3970:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3958:33:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "4010:164:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4024:41:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "src",
                                  "nodeType": "YulIdentifier",
                                  "src": "4049:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4043:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4043:10:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "mask",
                                  "nodeType": "YulIdentifier",
                                  "src": "4059:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "not",
                                "nodeType": "YulIdentifier",
                                "src": "4055:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4055:9:20"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4039:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4039:26:20"
                        },
                        "variables": [
                          {
                            "name": "srcpart",
                            "nodeType": "YulTypedName",
                            "src": "4028:7:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "4078:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "dest",
                                  "nodeType": "YulIdentifier",
                                  "src": "4104:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "4098:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4098:11:20"
                            },
                            {
                              "name": "mask",
                              "nodeType": "YulIdentifier",
                              "src": "4111:4:20"
                            }
                          ],
                          "functionName": {
                            "name": "and",
                            "nodeType": "YulIdentifier",
                            "src": "4094:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4094:22:20"
                        },
                        "variables": [
                          {
                            "name": "destpart",
                            "nodeType": "YulTypedName",
                            "src": "4082:8:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "4136:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "destpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4145:8:20"
                                },
                                {
                                  "name": "srcpart",
                                  "nodeType": "YulIdentifier",
                                  "src": "4155:7:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "4142:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "4142:21:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "4129:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "4129:35:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "4129:35:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4104:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6134,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4136:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6159,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4059:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6159,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4111:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6137,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "4049:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6169,
                  "nodeType": "InlineAssembly",
                  "src": "4001:173:20"
                },
                {
                  "expression": {
                    "id": 6170,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6094,
                    "src": "4191:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6104,
                  "id": 6171,
                  "nodeType": "Return",
                  "src": "4184:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6092,
              "nodeType": "StructuredDocumentation",
              "src": "2521:349:20",
              "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": 6173,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6094,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2890:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6093,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2890:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6096,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2909:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6095,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2909:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6098,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2919:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6097,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2919:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6100,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2938:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6099,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2938:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2889:58:20"
            },
            "returnParameters": {
              "id": 6104,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6103,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2970:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6102,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "2970:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2969:15:20"
            },
            "scope": 6432,
            "src": "2875:1326:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6194,
              "nodeType": "Block",
              "src": "4617:61:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6186,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6176,
                        "src": "4640:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6187,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6176,
                            "src": "4645:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6188,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "4645:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6189,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "4645:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6190,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6178,
                        "src": "4661:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "id": 6191,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6180,
                        "src": "4667:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6185,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6173,
                      "src": "4634:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6192,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4634:37:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6184,
                  "id": 6193,
                  "nodeType": "Return",
                  "src": "4627:44:20"
                }
              ]
            },
            "documentation": {
              "id": 6174,
              "nodeType": "StructuredDocumentation",
              "src": "4207:303:20",
              "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": 6195,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6181,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6176,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4531:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6175,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4531:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6178,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4550:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6177,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4550:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6180,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4569:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6179,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4569:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4530:48:20"
            },
            "returnParameters": {
              "id": 6184,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6183,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "4602:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6182,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4602:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4601:15:20"
            },
            "scope": 6432,
            "src": "4515:163:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6215,
              "nodeType": "Block",
              "src": "5038:69:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6206,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6198,
                        "src": "5061:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6207,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6198,
                            "src": "5066:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6208,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "5066:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6209,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5066:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6210,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6200,
                        "src": "5082:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "expression": {
                          "id": 6211,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6200,
                          "src": "5088:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6212,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "5088:11:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6205,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6173,
                      "src": "5055:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6213,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5055:45:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6204,
                  "id": 6214,
                  "nodeType": "Return",
                  "src": "5048:52:20"
                }
              ]
            },
            "documentation": {
              "id": 6196,
              "nodeType": "StructuredDocumentation",
              "src": "4684:257:20",
              "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": 6216,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6198,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "4962:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6197,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "4962:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6200,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "4981:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 6199,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4981:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4961:38:20"
            },
            "returnParameters": {
              "id": 6204,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6203,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6216,
                  "src": "5023:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6202,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5023:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5022:15:20"
            },
            "scope": 6432,
            "src": "4946:161:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6245,
              "nodeType": "Block",
              "src": "5517:617:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6231,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 6228,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6221,
                      "src": "5531:3:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "expression": {
                        "id": 6229,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6219,
                        "src": "5538:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6230,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "5538:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5531:19:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6241,
                  "nodeType": "IfStatement",
                  "src": "5527:79:20",
                  "trueBody": {
                    "id": 6240,
                    "nodeType": "Block",
                    "src": "5552:54:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6233,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6219,
                              "src": "5573:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6237,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "expression": {
                                  "id": 6234,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6219,
                                  "src": "5578:3:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 6235,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5973,
                                "src": "5578:12:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6236,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5593:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5578:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6232,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "5566:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6238,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5566:29:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6239,
                        "nodeType": "ExpressionStatement",
                        "src": "5566:29:20"
                      }
                    ]
                  }
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "5625:483:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5688:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "5708:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5702:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5702:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "5692:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5771:27:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "bufptr",
                              "nodeType": "YulIdentifier",
                              "src": "5791:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "5785:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5785:13:20"
                        },
                        "variables": [
                          {
                            "name": "buflen",
                            "nodeType": "YulTypedName",
                            "src": "5775:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "5881:37:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "5901:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "5909:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "5897:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "5897:16:20"
                            },
                            {
                              "kind": "number",
                              "nodeType": "YulLiteral",
                              "src": "5915:2:20",
                              "type": "",
                              "value": "32"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "5893:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5893:25:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "5885:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "5939:4:20"
                            },
                            {
                              "name": "data",
                              "nodeType": "YulIdentifier",
                              "src": "5945:4:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore8",
                            "nodeType": "YulIdentifier",
                            "src": "5931:7:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "5931:19:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "5931:19:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "6036:62:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "6061:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "buflen",
                                        "nodeType": "YulIdentifier",
                                        "src": "6073:6:20"
                                      },
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "6081:1:20",
                                        "type": "",
                                        "value": "1"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "6069:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "6069:14:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "6054:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "6054:30:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "6054:30:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "name": "off",
                              "nodeType": "YulIdentifier",
                              "src": "6023:3:20"
                            },
                            {
                              "name": "buflen",
                              "nodeType": "YulIdentifier",
                              "src": "6028:6:20"
                            }
                          ],
                          "functionName": {
                            "name": "eq",
                            "nodeType": "YulIdentifier",
                            "src": "6020:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "6020:15:20"
                        },
                        "nodeType": "YulIf",
                        "src": "6017:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6219,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5708:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6223,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5945:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6221,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "5909:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6221,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "6023:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6242,
                  "nodeType": "InlineAssembly",
                  "src": "5616:492:20"
                },
                {
                  "expression": {
                    "id": 6243,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6219,
                    "src": "6124:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6227,
                  "id": 6244,
                  "nodeType": "Return",
                  "src": "6117:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6217,
              "nodeType": "StructuredDocumentation",
              "src": "5113:301:20",
              "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": 6246,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6224,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6219,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5439:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6218,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5439:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6221,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5458:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6220,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5458:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6223,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5468:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6222,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5468:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5438:41:20"
            },
            "returnParameters": {
              "id": 6227,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6226,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6246,
                  "src": "5502:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6225,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "5502:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5501:15:20"
            },
            "scope": 6432,
            "src": "5419:715:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6264,
              "nodeType": "Block",
              "src": "6486:61:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6257,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6249,
                        "src": "6514:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6258,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6249,
                            "src": "6519:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6259,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "6519:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6260,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "6519:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6261,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6251,
                        "src": "6535:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 6256,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6246,
                      "src": "6503:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6262,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6503:37:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6255,
                  "id": 6263,
                  "nodeType": "Return",
                  "src": "6496:44:20"
                }
              ]
            },
            "documentation": {
              "id": 6247,
              "nodeType": "StructuredDocumentation",
              "src": "6140:252:20",
              "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": 6265,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6252,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6249,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6418:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6248,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6418:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6251,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6437:10:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6250,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6437:5:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6417:31:20"
            },
            "returnParameters": {
              "id": 6255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6254,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6265,
                  "src": "6471:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6253,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6471:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6470:15:20"
            },
            "scope": 6432,
            "src": "6397:150:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6320,
              "nodeType": "Block",
              "src": "7024:695:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6284,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6281,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6279,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6274,
                        "src": "7038:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6280,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6270,
                        "src": "7044:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7038:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6282,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6268,
                        "src": "7050:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6283,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "7050:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7038:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6296,
                  "nodeType": "IfStatement",
                  "src": "7034:83:20",
                  "trueBody": {
                    "id": 6295,
                    "nodeType": "Block",
                    "src": "7064:53:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6286,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6268,
                              "src": "7085:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6292,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6289,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6287,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6274,
                                      "src": "7091:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6288,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6270,
                                      "src": "7097:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "7091:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 6290,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "7090:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6291,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7104:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7090:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6285,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "7078:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6293,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7078:28:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6294,
                        "nodeType": "ExpressionStatement",
                        "src": "7078:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6298
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6298,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6320,
                      "src": "7127:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6297,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7127:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6304,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6303,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6301,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6299,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7139:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 6300,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6274,
                        "src": "7146:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7139:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6302,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7152:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7139:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7127:26:20"
                },
                {
                  "expression": {
                    "id": 6315,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 6305,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6272,
                      "src": "7191:4:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 6314,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6306,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6272,
                        "src": "7198:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "components": [
                          {
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 6312,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "hexValue": "38",
                              "id": 6307,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7207:1:20",
                              "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": 6310,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "hexValue": "3332",
                                    "id": 6308,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7212:2:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "id": 6309,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 6274,
                                    "src": "7217:3:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7212:8:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 6311,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7211:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7207:14:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 6313,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7206:16:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7198:24:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7191:31:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 6316,
                  "nodeType": "ExpressionStatement",
                  "src": "7191:31:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "7241:452:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7304:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "7324:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "7318:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7318:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "7308:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "7417:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7437:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7445:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7433:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7433:16:20"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "7451:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "7429:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7429:26:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "7421:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "7475:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "7494:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "7488:5:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7488:11:20"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "7505:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "7501:3:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "7501:9:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "7484:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "7484:27:20"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "7513:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "7481:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7481:37:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "7468:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7468:51:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "7468:51:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "7622:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "7647:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "7659:3:20"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "7664:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "7655:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "7655:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "7640:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "7640:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "7640:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "7596:3:20"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "7601:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "7592:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7592:13:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "7613:6:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "7607:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "7607:13:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "7589:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "7589:32:20"
                        },
                        "nodeType": "YulIf",
                        "src": "7586:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6268,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7324:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6272,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7513:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7451:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7601:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6274,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7664:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6298,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7505:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7445:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7596:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6270,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "7659:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6317,
                  "nodeType": "InlineAssembly",
                  "src": "7232:461:20"
                },
                {
                  "expression": {
                    "id": 6318,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6268,
                    "src": "7709:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6278,
                  "id": 6319,
                  "nodeType": "Return",
                  "src": "7702:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6266,
              "nodeType": "StructuredDocumentation",
              "src": "6553:362:20",
              "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": 6321,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6275,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6268,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6935:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6267,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "6935:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6270,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6954:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6269,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6954:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6272,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6964:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6271,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6964:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6274,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "6978:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6273,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6978:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6934:53:20"
            },
            "returnParameters": {
              "id": 6278,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6277,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "7009:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6276,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "7009:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7008:15:20"
            },
            "scope": 6432,
            "src": "6920:799:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          },
          {
            "body": {
              "id": 6343,
              "nodeType": "Block",
              "src": "8128:58:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6334,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6324,
                        "src": "8151:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "id": 6335,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6326,
                        "src": "8156:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 6338,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6328,
                            "src": "8169:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 6337,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8161:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 6336,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8161:7:20",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 6339,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8161:13:20",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 6340,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8176:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6333,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8145:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6341,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8145:34:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6332,
                  "id": 6342,
                  "nodeType": "Return",
                  "src": "8138:41:20"
                }
              ]
            },
            "documentation": {
              "id": 6322,
              "nodeType": "StructuredDocumentation",
              "src": "7725:295:20",
              "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": 6344,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6329,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6324,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8047:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6323,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8047:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6326,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8066:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6325,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8066:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6328,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8076:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 6327,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8076:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8046:43:20"
            },
            "returnParameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6331,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6344,
                  "src": "8113:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6330,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8113:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8112:15:20"
            },
            "scope": 6432,
            "src": "8025:161:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6366,
              "nodeType": "Block",
              "src": "8547:69:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6355,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6347,
                        "src": "8570:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6356,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6347,
                            "src": "8575:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6357,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "8575:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6358,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "8575:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "arguments": [
                          {
                            "id": 6361,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6349,
                            "src": "8599:4:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 6360,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8591:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": {
                            "id": 6359,
                            "name": "bytes32",
                            "nodeType": "ElementaryTypeName",
                            "src": "8591:7:20",
                            "typeDescriptions": {}
                          }
                        },
                        "id": 6362,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8591:13:20",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3230",
                        "id": 6363,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8606:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6354,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8564:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6364,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8564:45:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6353,
                  "id": 6365,
                  "nodeType": "Return",
                  "src": "8557:52:20"
                }
              ]
            },
            "documentation": {
              "id": 6345,
              "nodeType": "StructuredDocumentation",
              "src": "8192:256:20",
              "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": 6367,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6350,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6347,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8476:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6346,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8476:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6349,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8495:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 6348,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8495:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8475:33:20"
            },
            "returnParameters": {
              "id": 6353,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6352,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6367,
                  "src": "8532:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6351,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8532:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8531:15:20"
            },
            "scope": 6432,
            "src": "8453:163:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6386,
              "nodeType": "Block",
              "src": "8976:60:20",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6378,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6370,
                        "src": "8999:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "expression": {
                          "expression": {
                            "id": 6379,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6370,
                            "src": "9004:3:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 6380,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5971,
                          "src": "9004:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 6381,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "src": "9004:14:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "id": 6382,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6372,
                        "src": "9020:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "hexValue": "3332",
                        "id": 6383,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9026:2:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$5974_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": 6377,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        6173,
                        6321
                      ],
                      "referencedDeclaration": 6321,
                      "src": "8993:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$5974_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 6384,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8993:36:20",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6376,
                  "id": 6385,
                  "nodeType": "Return",
                  "src": "8986:43:20"
                }
              ]
            },
            "documentation": {
              "id": 6368,
              "nodeType": "StructuredDocumentation",
              "src": "8622:255:20",
              "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": 6387,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6373,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6370,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8905:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6369,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8905:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6372,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8924:12:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 6371,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8924:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8904:33:20"
            },
            "returnParameters": {
              "id": 6376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6375,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6387,
                  "src": "8961:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6374,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "8961:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "8960:15:20"
            },
            "scope": 6432,
            "src": "8882:154:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6430,
              "nodeType": "Block",
              "src": "9510:626:20",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6406,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6403,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 6401,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6396,
                        "src": "9524:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "id": 6402,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6392,
                        "src": "9530:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9524:9:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "expression": {
                        "id": 6404,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6390,
                        "src": "9536:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 6405,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5973,
                      "src": "9536:12:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9524:24:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 6418,
                  "nodeType": "IfStatement",
                  "src": "9520:83:20",
                  "trueBody": {
                    "id": 6417,
                    "nodeType": "Block",
                    "src": "9550:53:20",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 6408,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6390,
                              "src": "9571:3:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 6414,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "components": [
                                  {
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 6411,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "id": 6409,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6396,
                                      "src": "9577:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "id": 6410,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 6392,
                                      "src": "9583:3:20",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9577:9:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "id": 6412,
                                "isConstant": false,
                                "isInlineArray": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "TupleExpression",
                                "src": "9576:11:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "hexValue": "32",
                                "id": 6413,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9590:1:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9576:15:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 6407,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6060,
                            "src": "9564:6:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$5974_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 6415,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9564:28:20",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6416,
                        "nodeType": "ExpressionStatement",
                        "src": "9564:28:20"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    6420
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6420,
                      "mutability": "mutable",
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 6430,
                      "src": "9613:9:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6419,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9613:4:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 6426,
                  "initialValue": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 6425,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 6423,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "hexValue": "323536",
                        "id": 6421,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9625:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "id": 6422,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6396,
                        "src": "9632:3:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9625:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "hexValue": "31",
                      "id": 6424,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9638:1:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9625:14:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9613:26:20"
                },
                {
                  "AST": {
                    "nodeType": "YulBlock",
                    "src": "9658:452:20",
                    "statements": [
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9721:24:20",
                        "value": {
                          "arguments": [
                            {
                              "name": "buf",
                              "nodeType": "YulIdentifier",
                              "src": "9741:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "mload",
                            "nodeType": "YulIdentifier",
                            "src": "9735:5:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9735:10:20"
                        },
                        "variables": [
                          {
                            "name": "bufptr",
                            "nodeType": "YulTypedName",
                            "src": "9725:6:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "nodeType": "YulVariableDeclaration",
                        "src": "9834:38:20",
                        "value": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "9854:6:20"
                                },
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "9862:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "9850:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9850:16:20"
                            },
                            {
                              "name": "len",
                              "nodeType": "YulIdentifier",
                              "src": "9868:3:20"
                            }
                          ],
                          "functionName": {
                            "name": "add",
                            "nodeType": "YulIdentifier",
                            "src": "9846:3:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9846:26:20"
                        },
                        "variables": [
                          {
                            "name": "dest",
                            "nodeType": "YulTypedName",
                            "src": "9838:4:20",
                            "type": ""
                          }
                        ]
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "name": "dest",
                              "nodeType": "YulIdentifier",
                              "src": "9892:4:20"
                            },
                            {
                              "arguments": [
                                {
                                  "arguments": [
                                    {
                                      "arguments": [
                                        {
                                          "name": "dest",
                                          "nodeType": "YulIdentifier",
                                          "src": "9911:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "mload",
                                        "nodeType": "YulIdentifier",
                                        "src": "9905:5:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9905:11:20"
                                    },
                                    {
                                      "arguments": [
                                        {
                                          "name": "mask",
                                          "nodeType": "YulIdentifier",
                                          "src": "9922:4:20"
                                        }
                                      ],
                                      "functionName": {
                                        "name": "not",
                                        "nodeType": "YulIdentifier",
                                        "src": "9918:3:20"
                                      },
                                      "nodeType": "YulFunctionCall",
                                      "src": "9918:9:20"
                                    }
                                  ],
                                  "functionName": {
                                    "name": "and",
                                    "nodeType": "YulIdentifier",
                                    "src": "9901:3:20"
                                  },
                                  "nodeType": "YulFunctionCall",
                                  "src": "9901:27:20"
                                },
                                {
                                  "name": "data",
                                  "nodeType": "YulIdentifier",
                                  "src": "9930:4:20"
                                }
                              ],
                              "functionName": {
                                "name": "or",
                                "nodeType": "YulIdentifier",
                                "src": "9898:2:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "9898:37:20"
                            }
                          ],
                          "functionName": {
                            "name": "mstore",
                            "nodeType": "YulIdentifier",
                            "src": "9885:6:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "9885:51:20"
                        },
                        "nodeType": "YulExpressionStatement",
                        "src": "9885:51:20"
                      },
                      {
                        "body": {
                          "nodeType": "YulBlock",
                          "src": "10039:61:20",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "name": "bufptr",
                                    "nodeType": "YulIdentifier",
                                    "src": "10064:6:20"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "name": "off",
                                        "nodeType": "YulIdentifier",
                                        "src": "10076:3:20"
                                      },
                                      {
                                        "name": "len",
                                        "nodeType": "YulIdentifier",
                                        "src": "10081:3:20"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "add",
                                      "nodeType": "YulIdentifier",
                                      "src": "10072:3:20"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "10072:13:20"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "10057:6:20"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "10057:29:20"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "10057:29:20"
                            }
                          ]
                        },
                        "condition": {
                          "arguments": [
                            {
                              "arguments": [
                                {
                                  "name": "off",
                                  "nodeType": "YulIdentifier",
                                  "src": "10013:3:20"
                                },
                                {
                                  "name": "len",
                                  "nodeType": "YulIdentifier",
                                  "src": "10018:3:20"
                                }
                              ],
                              "functionName": {
                                "name": "add",
                                "nodeType": "YulIdentifier",
                                "src": "10009:3:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10009:13:20"
                            },
                            {
                              "arguments": [
                                {
                                  "name": "bufptr",
                                  "nodeType": "YulIdentifier",
                                  "src": "10030:6:20"
                                }
                              ],
                              "functionName": {
                                "name": "mload",
                                "nodeType": "YulIdentifier",
                                "src": "10024:5:20"
                              },
                              "nodeType": "YulFunctionCall",
                              "src": "10024:13:20"
                            }
                          ],
                          "functionName": {
                            "name": "gt",
                            "nodeType": "YulIdentifier",
                            "src": "10006:2:20"
                          },
                          "nodeType": "YulFunctionCall",
                          "src": "10006:32:20"
                        },
                        "nodeType": "YulIf",
                        "src": "10003:2:20"
                      }
                    ]
                  },
                  "evmVersion": "istanbul",
                  "externalReferences": [
                    {
                      "declaration": 6390,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9741:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6394,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9930:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10018:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10081:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6396,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9868:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6420,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9922:4:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10013:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "10076:3:20",
                      "valueSize": 1
                    },
                    {
                      "declaration": 6392,
                      "isOffset": false,
                      "isSlot": false,
                      "src": "9862:3:20",
                      "valueSize": 1
                    }
                  ],
                  "id": 6427,
                  "nodeType": "InlineAssembly",
                  "src": "9649:461:20"
                },
                {
                  "expression": {
                    "id": 6428,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6390,
                    "src": "10126:3:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 6400,
                  "id": 6429,
                  "nodeType": "Return",
                  "src": "10119:10:20"
                }
              ]
            },
            "documentation": {
              "id": 6388,
              "nodeType": "StructuredDocumentation",
              "src": "9042:359:20",
              "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": 6431,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6397,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6390,
                  "mutability": "mutable",
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9424:17:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6389,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "9424:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6392,
                  "mutability": "mutable",
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9443:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6391,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9443:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6394,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9453:9:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6393,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9453:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6396,
                  "mutability": "mutable",
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9464:8:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6395,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9464:4:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9423:50:20"
            },
            "returnParameters": {
              "id": 6400,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6399,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6431,
                  "src": "9495:13:20",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$5974_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "id": 6398,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5974,
                    "src": "9495:6:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$5974_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "9494:15:20"
            },
            "scope": 6432,
            "src": "9406:730:20",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "scope": 6433,
        "src": "403:9735:20"
      }
    ],
    "src": "0:10139:20"
  },
  "compiler": {
    "name": "solc",
    "version": "0.7.4+commit.3f05b770.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.2",
  "updatedAt": "2021-01-20T20:53:41.277Z",
  "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
  }
}