{
  "contractName": "Buffer",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"A library for working with mutable byte buffers in Solidity. * Byte buffers are mutable and expandable, and provide a variety of primitives for writing to them. At any time you can fetch a bytes object containing the current contents of the buffer. The bytes object should not be stored between operations, as it may change due to resizing of the buffer.\",\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@ensdomains/buffer/contracts/Buffer.sol\":\"Buffer\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"keccak256\":\"0xa9ac824902ab6aaf6883432cd6f2a853186fcce568d63d04fa8143df6c5d6ebd\",\"urls\":[\"bzzr://232656f54a882bc204fc2dfd6a08bbe4bbd7860e6040ae914d69d8b60e23e133\"]}},\"version\":1}",
  "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820baad10f677e0a610b6935487d2f8577c8be4a010621fafa15cf054fc19e7ba0e0029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820baad10f677e0a610b6935487d2f8577c8be4a010621fafa15cf054fc19e7ba0e0029",
  "sourceMap": "403:9770:3:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
  "deployedSourceMap": "403:9770:3:-;;;;;;;;",
  "source": "pragma solidity >0.4.18;\n\n/**\n* @dev A library for working with mutable byte buffers in Solidity.\n*\n* Byte buffers are mutable and expandable, and provide a variety of primitives\n* for writing to them. At any time you can fetch a bytes object containing the\n* current contents of the buffer. The bytes object should not be stored between\n* operations, as it may change due to resizing of the buffer.\n*/\nlibrary Buffer {\n    /**\n    * @dev Represents a mutable buffer. Buffers have a current value (buf) and\n    *      a capacity. The capacity may be longer than the current value, in\n    *      which case it can be extended without the need to allocate more memory.\n    */\n    struct buffer {\n        bytes buf;\n        uint capacity;\n    }\n\n    /**\n    * @dev Initializes a buffer with an initial capacity.\n    * @param buf The buffer to initialize.\n    * @param capacity The number of bytes of space to allocate the buffer.\n    * @return The buffer, for chaining.\n    */\n    function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\n        if (capacity % 32 != 0) {\n            capacity += 32 - (capacity % 32);\n        }\n        // Allocate space for the buffer data\n        buf.capacity = capacity;\n        assembly {\n            let ptr := mload(0x40)\n            mstore(buf, ptr)\n            mstore(ptr, 0)\n            mstore(0x40, add(ptr, capacity))\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Initializes a new buffer from an existing bytes object.\n    *      Changes to the buffer may mutate the original value.\n    * @param b The bytes object to initialize the buffer with.\n    * @return A new buffer.\n    */\n    function fromBytes(bytes memory b) internal pure returns(buffer memory) {\n        buffer memory buf;\n        buf.buf = b;\n        buf.capacity = b.length;\n        return buf;\n    }\n\n    function resize(buffer memory buf, uint capacity) private pure {\n        bytes memory oldbuf = buf.buf;\n        init(buf, capacity);\n        append(buf, oldbuf);\n    }\n\n    function max(uint a, uint b) private pure returns(uint) {\n        if (a > b) {\n            return a;\n        }\n        return b;\n    }\n\n    /**\n    * @dev Sets buffer length to 0.\n    * @param buf The buffer to truncate.\n    * @return The original buffer, for chaining..\n    */\n    function truncate(buffer memory buf) internal pure returns (buffer memory) {\n        assembly {\n            let bufptr := mload(buf)\n            mstore(bufptr, 0)\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The start offset to write to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes memory data, uint len) internal pure returns(buffer memory) {\n        require(len <= data.length);\n\n        if (off + len + buf.buf.length > buf.capacity) {\n            resize(buf, max(buf.capacity, len + off) * 2);\n        }\n\n        uint dest;\n        uint src;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Start address = buffer address + offset + sizeof(buffer length)\n            dest := add(add(bufptr, 32), off)\n            // Update buffer length if we're extending it\n            if gt(add(len, off), buflen) {\n                mstore(bufptr, add(len, off))\n            }\n            src := add(data, 32)\n        }\n\n        // Copy word-length chunks while possible\n        for (; len >= 32; len -= 32) {\n            assembly {\n                mstore(dest, mload(src))\n            }\n            dest += 32;\n            src += 32;\n        }\n\n        // Copy remaining bytes\n        uint mask = 256 ** (32 - len) - 1;\n        assembly {\n            let srcpart := and(mload(src), not(mask))\n            let destpart := and(mload(dest), mask)\n            mstore(dest, or(destpart, srcpart))\n        }\n\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @param len The number of bytes to copy.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data, uint len) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, len);\n    }\n\n    /**\n    * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, data.length);\n    }\n\n    /**\n    * @dev Writes a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write the byte at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeUint8(buffer memory buf, uint off, uint8 data) internal pure returns(buffer memory) {\n        if (off > buf.capacity) {\n            resize(buf, buf.capacity * 2);\n        }\n\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Length of existing buffer data\n            let buflen := mload(bufptr)\n            // Address = buffer address + sizeof(buffer length) + off\n            let dest := add(add(bufptr, off), 32)\n            mstore8(dest, data)\n            // Update buffer length if we extended it\n            if eq(off, buflen) {\n                mstore(bufptr, add(buflen, 1))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\n        return writeUint8(buf, buf.buf.length, data);\n    }\n\n    /**\n    * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n    *      exceed the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (left-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function write(buffer memory buf, uint off, bytes32 data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, max(buf.capacity, len) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        // Right-align data\n        data = data >> (8 * (32 - len));\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + sizeof(buffer length) + off + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n\n    /**\n    * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n    *      capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function writeBytes20(buffer memory buf, uint off, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, off, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chhaining.\n    */\n    function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, bytes32(data), 20);\n    }\n\n    /**\n    * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param data The data to append.\n    * @return The original buffer, for chaining.\n    */\n    function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\n        return write(buf, buf.buf.length, data, 32);\n    }\n\n    /**\n    * @dev Writes an integer to the buffer. Resizes if doing so would exceed\n    *      the capacity of the buffer.\n    * @param buf The buffer to append to.\n    * @param off The offset to write at.\n    * @param data The data to append.\n    * @param len The number of bytes to write (right-aligned).\n    * @return The original buffer, for chaining.\n    */\n    function writeInt(buffer memory buf, uint off, uint data, uint len) private pure returns(buffer memory) {\n        if (len + off > buf.capacity) {\n            resize(buf, max(buf.capacity, len + off) * 2);\n        }\n\n        uint mask = 256 ** len - 1;\n        assembly {\n            // Memory address of the buffer data\n            let bufptr := mload(buf)\n            // Address = buffer address + off + sizeof(buffer length) + len\n            let dest := add(add(bufptr, off), len)\n            mstore(dest, or(and(mload(dest), not(mask)), data))\n            // Update buffer length if we extended it\n            if gt(add(off, len), mload(bufptr)) {\n                mstore(bufptr, add(off, len))\n            }\n        }\n        return buf;\n    }\n}\n",
  "sourcePath": "@ensdomains/buffer/contracts/Buffer.sol",
  "ast": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        1118
      ]
    },
    "id": 1119,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 662,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:3"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@dev A library for working with mutable byte buffers in Solidity.\n* Byte buffers are mutable and expandable, and provide a variety of primitives\nfor writing to them. At any time you can fetch a bytes object containing the\ncurrent contents of the buffer. The bytes object should not be stored between\noperations, as it may change due to resizing of the buffer.",
        "fullyImplemented": true,
        "id": 1118,
        "linearizedBaseContracts": [
          1118
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 667,
            "members": [
              {
                "constant": false,
                "id": 664,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 667,
                "src": "702:9:3",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 663,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:3",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 666,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 667,
                "src": "721:13:3",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 665,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:3",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 1118,
            "src": "678:63:3",
            "visibility": "public"
          },
          {
            "body": {
              "id": 701,
              "nodeType": "Block",
              "src": "1063:361:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 680,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 678,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 676,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 671,
                        "src": "1077:8:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 677,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 679,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 691,
                  "nodeType": "IfStatement",
                  "src": "1073:81:3",
                  "trueBody": {
                    "id": 690,
                    "nodeType": "Block",
                    "src": "1097:57:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 681,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 671,
                            "src": "1111:8:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 687,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 682,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 685,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 683,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 671,
                                    "src": "1129:8:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 684,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:3",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 686,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 689,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 696,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 692,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 669,
                        "src": "1209:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 694,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "1209:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 695,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 671,
                      "src": "1224:8:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 697,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 669,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 671,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1378:8:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 698,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    mstore(buf, ptr)\n    mstore(ptr, 0)\n    mstore(0x40, add(ptr, capacity))\n}",
                  "src": "1242:171:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 699,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 669,
                    "src": "1414:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 675,
                  "id": 700,
                  "nodeType": "Return",
                  "src": "1407:10:3"
                }
              ]
            },
            "documentation": "@dev Initializes a buffer with an initial capacity.\n@param buf The buffer to initialize.\n@param capacity The number of bytes of space to allocate the buffer.\n@return The buffer, for chaining.",
            "id": 702,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 672,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 669,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "992:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 668,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "992:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 671,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "1011:13:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 670,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:3"
            },
            "returnParameters": {
              "id": 675,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 674,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "1048:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 673,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1048:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:3"
            },
            "scope": 1118,
            "src": "978:446:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 727,
              "nodeType": "Block",
              "src": "1739:108:3",
              "statements": [
                {
                  "assignments": [
                    710
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 710,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 727,
                      "src": "1749:17:3",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 709,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 667,
                        "src": "1749:6:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 711,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1749:17:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 716,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 712,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 710,
                        "src": "1776:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 714,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 664,
                      "src": "1776:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 715,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 704,
                      "src": "1786:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1776:11:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 717,
                  "nodeType": "ExpressionStatement",
                  "src": "1776:11:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 723,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 718,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 710,
                        "src": "1797:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 720,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "1797:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 721,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 704,
                        "src": "1812:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 722,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1812:8:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1797:23:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 724,
                  "nodeType": "ExpressionStatement",
                  "src": "1797:23:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 725,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 710,
                    "src": "1837:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 708,
                  "id": 726,
                  "nodeType": "Return",
                  "src": "1830:10:3"
                }
              ]
            },
            "documentation": "@dev Initializes a new buffer from an existing bytes object.\n     Changes to the buffer may mutate the original value.\n@param b The bytes object to initialize the buffer with.\n@return A new buffer.",
            "id": 728,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 705,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 704,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 728,
                  "src": "1686:14:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 703,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1686:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1685:16:3"
            },
            "returnParameters": {
              "id": 708,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 707,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 728,
                  "src": "1724:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 706,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1724:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1723:15:3"
            },
            "scope": 1118,
            "src": "1667:180:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 750,
              "nodeType": "Block",
              "src": "1916:104:3",
              "statements": [
                {
                  "assignments": [
                    736
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 736,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 750,
                      "src": "1926:19:3",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 735,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1926:5:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 739,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 737,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 730,
                      "src": "1948:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 738,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 664,
                    "src": "1948:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1926:29:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 741,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 730,
                        "src": "1970:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 742,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 732,
                        "src": "1975:8:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 740,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 702,
                      "src": "1965:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 743,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1965:19:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 744,
                  "nodeType": "ExpressionStatement",
                  "src": "1965:19:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 746,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 730,
                        "src": "2001:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 747,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 736,
                        "src": "2006:6:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 745,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        887,
                        907
                      ],
                      "referencedDeclaration": 907,
                      "src": "1994:6:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 748,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1994:19:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 749,
                  "nodeType": "ExpressionStatement",
                  "src": "1994:19:3"
                }
              ]
            },
            "documentation": null,
            "id": 751,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 733,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 730,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 751,
                  "src": "1869:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 729,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1869:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 732,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 751,
                  "src": "1888:13:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 731,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1888:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1868:34:3"
            },
            "returnParameters": {
              "id": 734,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1916:0:3"
            },
            "scope": 1118,
            "src": "1853:167:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 769,
              "nodeType": "Block",
              "src": "2082:78:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 762,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 760,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 753,
                      "src": "2096:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 761,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 755,
                      "src": "2100:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2096:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 766,
                  "nodeType": "IfStatement",
                  "src": "2092:44:3",
                  "trueBody": {
                    "id": 765,
                    "nodeType": "Block",
                    "src": "2103:33:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 763,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 753,
                          "src": "2124:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 759,
                        "id": 764,
                        "nodeType": "Return",
                        "src": "2117:8:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 767,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 755,
                    "src": "2152:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 759,
                  "id": 768,
                  "nodeType": "Return",
                  "src": "2145:8:3"
                }
              ]
            },
            "documentation": null,
            "id": 770,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 756,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 753,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2039:6:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 752,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2039:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 755,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2047:6:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 754,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2047:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2038:16:3"
            },
            "returnParameters": {
              "id": 759,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 758,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2076:4:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 757,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2076:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2075:6:3"
            },
            "scope": 1118,
            "src": "2026:134:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 780,
              "nodeType": "Block",
              "src": "2383:123:3",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 772,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2436:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 777,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2393:102:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 778,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 772,
                    "src": "2496:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 776,
                  "id": 779,
                  "nodeType": "Return",
                  "src": "2489:10:3"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 781,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 773,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 772,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 781,
                  "src": "2326:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 771,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2326:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2325:19:3"
            },
            "returnParameters": {
              "id": 776,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 775,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 781,
                  "src": "2368:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 774,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2368:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2367:15:3"
            },
            "scope": 1118,
            "src": "2308:198:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 865,
              "nodeType": "Block",
              "src": "2976:1233:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 798,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 795,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 789,
                          "src": "2994:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 796,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 787,
                            "src": "3001:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 797,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3001:11:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2994:18:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 794,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2824,
                        2825
                      ],
                      "referencedDeclaration": 2824,
                      "src": "2986:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 799,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2986:27:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 800,
                  "nodeType": "ExpressionStatement",
                  "src": "2986:27:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 810,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 807,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 803,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 801,
                          "name": "off",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 785,
                          "src": "3028:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "+",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 802,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 789,
                          "src": "3034:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3028:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 804,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 783,
                            "src": "3040:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 805,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "3040:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 806,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3040:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3028:26:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 808,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 783,
                        "src": "3057:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 809,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "3057:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3028:41:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 825,
                  "nodeType": "IfStatement",
                  "src": "3024:117:3",
                  "trueBody": {
                    "id": 824,
                    "nodeType": "Block",
                    "src": "3071:70:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 812,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 783,
                              "src": "3092:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 821,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 814,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 783,
                                      "src": "3101:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 815,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "3101:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 818,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 816,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 789,
                                      "src": "3115:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 817,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 785,
                                      "src": "3121:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3115:9:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 813,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "3097:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 819,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3097:28:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 820,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3128:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3097:32:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 811,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "3085:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 822,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3085:45:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 823,
                        "nodeType": "ExpressionStatement",
                        "src": "3085:45:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    827
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 827,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3151:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 826,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3151:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 828,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3151:9:3"
                },
                {
                  "assignments": [
                    830
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 830,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3170:8:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 829,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3170:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 831,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3170:8:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 783,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3280:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 787,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3680:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3462:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 830,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3669:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3491:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 789,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3576:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3581:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 789,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3632:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3637:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 832,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    dest := add(add(bufptr, 32), off)\n    if gt(add(len, off), buflen)\n    {\n        mstore(bufptr, add(len, off))\n    }\n    src := add(data, 32)\n}",
                  "src": "3188:574:3"
                },
                {
                  "body": {
                    "id": 849,
                    "nodeType": "Block",
                    "src": "3788:136:3",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "dest": {
                              "declaration": 827,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3836:4:3",
                              "valueSize": 1
                            }
                          },
                          {
                            "src": {
                              "declaration": 830,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3848:3:3",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 840,
                        "nodeType": "InlineAssembly",
                        "operations": "{\n    mstore(dest, mload(src))\n}",
                        "src": "3802:82:3"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 843,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 841,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 827,
                            "src": "3880:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 842,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3888:2:3",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3880:10:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 844,
                        "nodeType": "ExpressionStatement",
                        "src": "3880:10:3"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 847,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 845,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 830,
                            "src": "3904:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 846,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3911:2:3",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3904:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 848,
                        "nodeType": "ExpressionStatement",
                        "src": "3904:9:3"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 835,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 833,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 789,
                      "src": "3766:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 834,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3773:2:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3766:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 850,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 836,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 789,
                        "src": "3777:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 837,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3784:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3777:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 839,
                    "nodeType": "ExpressionStatement",
                    "src": "3777:9:3"
                  },
                  "nodeType": "ForStatement",
                  "src": "3759:165:3"
                },
                {
                  "assignments": [
                    852
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 852,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3966:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 851,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3966:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 861,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 860,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 858,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 853,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3978:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 856,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 854,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3986:2:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 855,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 789,
                              "src": "3991:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3986:8:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 857,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3985:10:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3978:17:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 859,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3998:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3978:21:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3966:33:3"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 830,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4057:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 852,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4067:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4112:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 852,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4119:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4144:4:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 862,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let srcpart := and(mload(src), not(mask))\n    let destpart := and(mload(dest), mask)\n    mstore(dest, or(destpart, srcpart))\n}",
                  "src": "4009:189:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 863,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 783,
                    "src": "4199:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 793,
                  "id": 864,
                  "nodeType": "Return",
                  "src": "4192:10:3"
                }
              ]
            },
            "documentation": "@dev Writes a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The start offset to write to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 866,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 790,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 783,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2881:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 782,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2881:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 785,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2900:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 784,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2900:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 787,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2910:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 786,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2910:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 789,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2929:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 788,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2929:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2880:58:3"
            },
            "returnParameters": {
              "id": 793,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 792,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2961:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 791,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2961:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2960:15:3"
            },
            "scope": 1118,
            "src": "2866:1343:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 886,
              "nodeType": "Block",
              "src": "4625:61:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 878,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 868,
                        "src": "4648:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 879,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 868,
                            "src": "4653:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 880,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "4653:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 881,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4653:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 882,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 870,
                        "src": "4669:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 883,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 872,
                        "src": "4675:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 877,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 866,
                      "src": "4642:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 884,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4642:37:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 876,
                  "id": 885,
                  "nodeType": "Return",
                  "src": "4635:44:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 887,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 873,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 868,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4539:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 867,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4539:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 870,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4558:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 869,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4558:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 872,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4577:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 871,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4577:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4538:48:3"
            },
            "returnParameters": {
              "id": 876,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 875,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4610:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 874,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4610:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4609:15:3"
            },
            "scope": 1118,
            "src": "4523:163:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 906,
              "nodeType": "Block",
              "src": "5046:69:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 897,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 889,
                        "src": "5069:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 898,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 889,
                            "src": "5074:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 899,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "5074:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 900,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5074:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 901,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 891,
                        "src": "5090:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 902,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 891,
                          "src": "5096:4:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 903,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5096:11:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 896,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 866,
                      "src": "5063:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 904,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5063:45:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 895,
                  "id": 905,
                  "nodeType": "Return",
                  "src": "5056:52:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 907,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 892,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 889,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "4970:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 888,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4970:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 891,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "4989:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 890,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4989:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4969:38:3"
            },
            "returnParameters": {
              "id": 895,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 894,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "5031:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 893,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5031:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5030:15:3"
            },
            "scope": 1118,
            "src": "4954:161:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 935,
              "nodeType": "Block",
              "src": "5525:616:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 918,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 911,
                      "src": "5539:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 919,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 909,
                        "src": "5545:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 920,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "5545:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5539:18:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 931,
                  "nodeType": "IfStatement",
                  "src": "5535:78:3",
                  "trueBody": {
                    "id": 930,
                    "nodeType": "Block",
                    "src": "5559:54:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 923,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 909,
                              "src": "5580:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 927,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 924,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 909,
                                  "src": "5585:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 925,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 666,
                                "src": "5585:12:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 926,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5600:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5585:16:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 922,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "5573:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 928,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5573:29:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 929,
                        "nodeType": "ExpressionStatement",
                        "src": "5573:29:3"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 909,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5715:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6030:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 913,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5952:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5916:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 932,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    let dest := add(add(bufptr, off), 32)\n    mstore8(dest, data)\n    if eq(off, buflen)\n    {\n        mstore(bufptr, add(buflen, 1))\n    }\n}",
                  "src": "5623:507:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 933,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 909,
                    "src": "6131:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 917,
                  "id": 934,
                  "nodeType": "Return",
                  "src": "6124:10:3"
                }
              ]
            },
            "documentation": "@dev Writes a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write the byte at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 936,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 914,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 909,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5447:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 908,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5447:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 911,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5466:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 910,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5466:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 913,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5476:10:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 912,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5476:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5446:41:3"
            },
            "returnParameters": {
              "id": 917,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 916,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5510:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 915,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5510:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5509:15:3"
            },
            "scope": 1118,
            "src": "5427:714:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 953,
              "nodeType": "Block",
              "src": "6493:61:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 946,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 938,
                        "src": "6521:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 947,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 938,
                            "src": "6526:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 948,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "6526:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 949,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6526:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 950,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 940,
                        "src": "6542:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 945,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 936,
                      "src": "6510:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 951,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6510:37:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 944,
                  "id": 952,
                  "nodeType": "Return",
                  "src": "6503:44:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 954,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 941,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 938,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6425:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 937,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6425:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 940,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6444:10:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 939,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6444:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6424:31:3"
            },
            "returnParameters": {
              "id": 944,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 943,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6478:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 942,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6478:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6477:15:3"
            },
            "scope": 1118,
            "src": "6404:150:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1009,
              "nodeType": "Block",
              "src": "7031:706:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 972,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 969,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 967,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 962,
                        "src": "7045:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 968,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 958,
                        "src": "7051:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7045:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 956,
                        "src": "7057:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 971,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "7057:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7045:24:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 985,
                  "nodeType": "IfStatement",
                  "src": "7041:94:3",
                  "trueBody": {
                    "id": 984,
                    "nodeType": "Block",
                    "src": "7071:64:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 974,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 956,
                              "src": "7092:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 981,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 976,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 956,
                                      "src": "7101:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 977,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "7101:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "id": 978,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 962,
                                    "src": "7115:3:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 975,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "7097:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 979,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7097:22:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 980,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7122:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7097:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 973,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "7085:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 982,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7085:39:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 983,
                        "nodeType": "ExpressionStatement",
                        "src": "7085:39:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    987
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 987,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1009,
                      "src": "7145:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 986,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7145:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 993,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 992,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 990,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 988,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7157:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 989,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 962,
                        "src": "7164:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7157:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 991,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7170:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7157:14:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7145:26:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 994,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 960,
                      "src": "7209:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 1003,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 995,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 960,
                        "src": "7216:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1001,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 996,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7225:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 999,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 997,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7230:2:3",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 998,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 962,
                                    "src": "7235:3:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7230:8:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1000,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7229:10:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7225:14:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 1002,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7224:16:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7216:24:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7209:31:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 1005,
                  "nodeType": "ExpressionStatement",
                  "src": "7209:31:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 956,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7342:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7469:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7463:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 960,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7531:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 987,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7523:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7614:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7619:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7677:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7682:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1006,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "7250:476:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 956,
                    "src": "7727:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 966,
                  "id": 1008,
                  "nodeType": "Return",
                  "src": "7720:10:3"
                }
              ]
            },
            "documentation": "@dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n     exceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (left-aligned).\n@return The original buffer, for chaining.",
            "id": 1010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 963,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 956,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6942:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 955,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6942:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 958,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6961:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 957,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6961:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 960,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6971:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 959,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6971:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 962,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6985:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 961,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6985:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6941:53:3"
            },
            "returnParameters": {
              "id": 966,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 965,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "7016:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 964,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "7016:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7015:15:3"
            },
            "scope": 1118,
            "src": "6927:810:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1030,
              "nodeType": "Block",
              "src": "8146:58:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1022,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1012,
                        "src": "8169:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1023,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1014,
                        "src": "8174:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1025,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1016,
                            "src": "8187:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1024,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8179:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 1026,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8179:13:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 1027,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8194:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1021,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "8163:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1028,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8163:34:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1020,
                  "id": 1029,
                  "nodeType": "Return",
                  "src": "8156:41:3"
                }
              ]
            },
            "documentation": "@dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 1031,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1017,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1012,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8065:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1011,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8065:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1014,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8084:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1013,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8084:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1016,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8094:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1015,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8094:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8064:43:3"
            },
            "returnParameters": {
              "id": 1020,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1019,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8131:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1018,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8131:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8130:15:3"
            },
            "scope": 1118,
            "src": "8043:161:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1051,
              "nodeType": "Block",
              "src": "8565:69:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1041,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1033,
                        "src": "8588:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1042,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1033,
                            "src": "8593:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1043,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "8593:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1044,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8593:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1046,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1035,
                            "src": "8617:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1045,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8609:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 1047,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8609:13:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 1048,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8624:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1040,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "8582:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1049,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8582:45:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1039,
                  "id": 1050,
                  "nodeType": "Return",
                  "src": "8575:52:3"
                }
              ]
            },
            "documentation": "@dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chhaining.",
            "id": 1052,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1036,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1033,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8494:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1032,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8494:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1035,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8513:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1034,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8513:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8493:33:3"
            },
            "returnParameters": {
              "id": 1039,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1038,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8550:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1037,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8550:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8549:15:3"
            },
            "scope": 1118,
            "src": "8471:163:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1070,
              "nodeType": "Block",
              "src": "8994:60:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1062,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1054,
                        "src": "9017:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1063,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1054,
                            "src": "9022:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1064,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "9022:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1065,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9022:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1066,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1056,
                        "src": "9038:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 1067,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9044:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1061,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "9011:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1068,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9011:36:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1060,
                  "id": 1069,
                  "nodeType": "Return",
                  "src": "9004:43:3"
                }
              ]
            },
            "documentation": "@dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 1071,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1057,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1054,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8923:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1053,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8923:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1056,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8942:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1055,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8942:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8922:33:3"
            },
            "returnParameters": {
              "id": 1060,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1059,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8979:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1058,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8979:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8978:15:3"
            },
            "scope": 1118,
            "src": "8900:154:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1116,
              "nodeType": "Block",
              "src": "9528:643:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1089,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1086,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 1084,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1079,
                        "src": "9542:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 1085,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1075,
                        "src": "9548:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9542:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1087,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1073,
                        "src": "9554:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1088,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "9554:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9542:24:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1104,
                  "nodeType": "IfStatement",
                  "src": "9538:100:3",
                  "trueBody": {
                    "id": 1103,
                    "nodeType": "Block",
                    "src": "9568:70:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1091,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1073,
                              "src": "9589:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1100,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 1093,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1073,
                                      "src": "9598:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 1094,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "9598:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1097,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 1095,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1079,
                                      "src": "9612:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 1096,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1075,
                                      "src": "9618:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9612:9:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1092,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "9594:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1098,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9594:28:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 1099,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9625:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9594:32:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1090,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "9582:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1101,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9582:45:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1102,
                        "nodeType": "ExpressionStatement",
                        "src": "9582:45:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1106
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1106,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1116,
                      "src": "9648:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1105,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9648:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1112,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1111,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1109,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 1107,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9660:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 1108,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1079,
                        "src": "9667:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9660:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 1110,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9673:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9660:14:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9648:26:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 1073,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9776:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9903:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9897:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 1077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9965:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 1106,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9957:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10048:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10053:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10111:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10116:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1113,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "9684:476:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1114,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1073,
                    "src": "10161:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1083,
                  "id": 1115,
                  "nodeType": "Return",
                  "src": "10154:10:3"
                }
              ]
            },
            "documentation": "@dev Writes an integer to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (right-aligned).\n@return The original buffer, for chaining.",
            "id": 1117,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1080,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1073,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9442:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1072,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "9442:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1075,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9461:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1074,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9461:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1077,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9471:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1076,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9471:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1079,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9482:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1078,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9482:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9441:50:3"
            },
            "returnParameters": {
              "id": 1083,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1082,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9513:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1081,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "9513:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9512:15:3"
            },
            "scope": 1118,
            "src": "9424:747:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          }
        ],
        "scope": 1119,
        "src": "403:9770:3"
      }
    ],
    "src": "0:10174:3"
  },
  "legacyAST": {
    "absolutePath": "@ensdomains/buffer/contracts/Buffer.sol",
    "exportedSymbols": {
      "Buffer": [
        1118
      ]
    },
    "id": 1119,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 662,
        "literals": [
          "solidity",
          ">",
          "0.4",
          ".18"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:3"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@dev A library for working with mutable byte buffers in Solidity.\n* Byte buffers are mutable and expandable, and provide a variety of primitives\nfor writing to them. At any time you can fetch a bytes object containing the\ncurrent contents of the buffer. The bytes object should not be stored between\noperations, as it may change due to resizing of the buffer.",
        "fullyImplemented": true,
        "id": 1118,
        "linearizedBaseContracts": [
          1118
        ],
        "name": "Buffer",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "Buffer.buffer",
            "id": 667,
            "members": [
              {
                "constant": false,
                "id": 664,
                "name": "buf",
                "nodeType": "VariableDeclaration",
                "scope": 667,
                "src": "702:9:3",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes_storage_ptr",
                  "typeString": "bytes"
                },
                "typeName": {
                  "id": 663,
                  "name": "bytes",
                  "nodeType": "ElementaryTypeName",
                  "src": "702:5:3",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_storage_ptr",
                    "typeString": "bytes"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 666,
                "name": "capacity",
                "nodeType": "VariableDeclaration",
                "scope": 667,
                "src": "721:13:3",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 665,
                  "name": "uint",
                  "nodeType": "ElementaryTypeName",
                  "src": "721:4:3",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "buffer",
            "nodeType": "StructDefinition",
            "scope": 1118,
            "src": "678:63:3",
            "visibility": "public"
          },
          {
            "body": {
              "id": 701,
              "nodeType": "Block",
              "src": "1063:361:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 680,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 678,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 676,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 671,
                        "src": "1077:8:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "%",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 677,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1088:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "1077:13:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 679,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1094:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1077:18:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 691,
                  "nodeType": "IfStatement",
                  "src": "1073:81:3",
                  "trueBody": {
                    "id": 690,
                    "nodeType": "Block",
                    "src": "1097:57:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 688,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 681,
                            "name": "capacity",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 671,
                            "src": "1111:8:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 687,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 682,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1123:2:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 685,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 683,
                                    "name": "capacity",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 671,
                                    "src": "1129:8:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "%",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 684,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1140:2:3",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "src": "1129:13:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 686,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "1128:15:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "1123:20:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1111:32:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 689,
                        "nodeType": "ExpressionStatement",
                        "src": "1111:32:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 696,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 692,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 669,
                        "src": "1209:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 694,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "1209:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 695,
                      "name": "capacity",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 671,
                      "src": "1224:8:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1209:23:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 697,
                  "nodeType": "ExpressionStatement",
                  "src": "1209:23:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 669,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1307:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "capacity": {
                        "declaration": 671,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "1378:8:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 698,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let ptr := mload(0x40)\n    mstore(buf, ptr)\n    mstore(ptr, 0)\n    mstore(0x40, add(ptr, capacity))\n}",
                  "src": "1242:171:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 699,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 669,
                    "src": "1414:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 675,
                  "id": 700,
                  "nodeType": "Return",
                  "src": "1407:10:3"
                }
              ]
            },
            "documentation": "@dev Initializes a buffer with an initial capacity.\n@param buf The buffer to initialize.\n@param capacity The number of bytes of space to allocate the buffer.\n@return The buffer, for chaining.",
            "id": 702,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "init",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 672,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 669,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "992:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 668,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "992:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 671,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "1011:13:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 670,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1011:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:34:3"
            },
            "returnParameters": {
              "id": 675,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 674,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 702,
                  "src": "1048:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 673,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1048:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1047:15:3"
            },
            "scope": 1118,
            "src": "978:446:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 727,
              "nodeType": "Block",
              "src": "1739:108:3",
              "statements": [
                {
                  "assignments": [
                    710
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 710,
                      "name": "buf",
                      "nodeType": "VariableDeclaration",
                      "scope": 727,
                      "src": "1749:17:3",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                        "typeString": "struct Buffer.buffer"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 709,
                        "name": "buffer",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 667,
                        "src": "1749:6:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                          "typeString": "struct Buffer.buffer"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 711,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1749:17:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 716,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 712,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 710,
                        "src": "1776:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 714,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "buf",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 664,
                      "src": "1776:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory",
                        "typeString": "bytes memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 715,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 704,
                      "src": "1786:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes memory"
                      }
                    },
                    "src": "1776:11:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "id": 717,
                  "nodeType": "ExpressionStatement",
                  "src": "1776:11:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 723,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 718,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 710,
                        "src": "1797:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 720,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "1797:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 721,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 704,
                        "src": "1812:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      "id": 722,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1812:8:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1797:23:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 724,
                  "nodeType": "ExpressionStatement",
                  "src": "1797:23:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 725,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 710,
                    "src": "1837:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 708,
                  "id": 726,
                  "nodeType": "Return",
                  "src": "1830:10:3"
                }
              ]
            },
            "documentation": "@dev Initializes a new buffer from an existing bytes object.\n     Changes to the buffer may mutate the original value.\n@param b The bytes object to initialize the buffer with.\n@return A new buffer.",
            "id": 728,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "fromBytes",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 705,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 704,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 728,
                  "src": "1686:14:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 703,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1686:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1685:16:3"
            },
            "returnParameters": {
              "id": 708,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 707,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 728,
                  "src": "1724:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 706,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1724:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1723:15:3"
            },
            "scope": 1118,
            "src": "1667:180:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 750,
              "nodeType": "Block",
              "src": "1916:104:3",
              "statements": [
                {
                  "assignments": [
                    736
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 736,
                      "name": "oldbuf",
                      "nodeType": "VariableDeclaration",
                      "scope": 750,
                      "src": "1926:19:3",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes_memory_ptr",
                        "typeString": "bytes"
                      },
                      "typeName": {
                        "id": 735,
                        "name": "bytes",
                        "nodeType": "ElementaryTypeName",
                        "src": "1926:5:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_storage_ptr",
                          "typeString": "bytes"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 739,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 737,
                      "name": "buf",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 730,
                      "src": "1948:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                        "typeString": "struct Buffer.buffer memory"
                      }
                    },
                    "id": 738,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "buf",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 664,
                    "src": "1948:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_memory",
                      "typeString": "bytes memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1926:29:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 741,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 730,
                        "src": "1970:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 742,
                        "name": "capacity",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 732,
                        "src": "1975:8:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 740,
                      "name": "init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 702,
                      "src": "1965:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 743,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1965:19:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 744,
                  "nodeType": "ExpressionStatement",
                  "src": "1965:19:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 746,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 730,
                        "src": "2001:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 747,
                        "name": "oldbuf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 736,
                        "src": "2006:6:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 745,
                      "name": "append",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        887,
                        907
                      ],
                      "referencedDeclaration": 907,
                      "src": "1994:6:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_bytes_memory_ptr_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,bytes memory) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 748,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1994:19:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "id": 749,
                  "nodeType": "ExpressionStatement",
                  "src": "1994:19:3"
                }
              ]
            },
            "documentation": null,
            "id": 751,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "resize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 733,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 730,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 751,
                  "src": "1869:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 729,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "1869:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 732,
                  "name": "capacity",
                  "nodeType": "VariableDeclaration",
                  "scope": 751,
                  "src": "1888:13:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 731,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1888:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1868:34:3"
            },
            "returnParameters": {
              "id": 734,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1916:0:3"
            },
            "scope": 1118,
            "src": "1853:167:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 769,
              "nodeType": "Block",
              "src": "2082:78:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 762,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 760,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 753,
                      "src": "2096:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 761,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 755,
                      "src": "2100:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2096:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 766,
                  "nodeType": "IfStatement",
                  "src": "2092:44:3",
                  "trueBody": {
                    "id": 765,
                    "nodeType": "Block",
                    "src": "2103:33:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 763,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 753,
                          "src": "2124:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "functionReturnParameters": 759,
                        "id": 764,
                        "nodeType": "Return",
                        "src": "2117:8:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 767,
                    "name": "b",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 755,
                    "src": "2152:1:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 759,
                  "id": 768,
                  "nodeType": "Return",
                  "src": "2145:8:3"
                }
              ]
            },
            "documentation": null,
            "id": 770,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "max",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 756,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 753,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2039:6:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 752,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2039:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 755,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2047:6:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 754,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2047:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2038:16:3"
            },
            "returnParameters": {
              "id": 759,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 758,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 770,
                  "src": "2076:4:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 757,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2076:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2075:6:3"
            },
            "scope": 1118,
            "src": "2026:134:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 780,
              "nodeType": "Block",
              "src": "2383:123:3",
              "statements": [
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 772,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "2436:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 777,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    mstore(bufptr, 0)\n}",
                  "src": "2393:102:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 778,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 772,
                    "src": "2496:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 776,
                  "id": 779,
                  "nodeType": "Return",
                  "src": "2489:10:3"
                }
              ]
            },
            "documentation": "@dev Sets buffer length to 0.\n@param buf The buffer to truncate.\n@return The original buffer, for chaining..",
            "id": 781,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "truncate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 773,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 772,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 781,
                  "src": "2326:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 771,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2326:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2325:19:3"
            },
            "returnParameters": {
              "id": 776,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 775,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 781,
                  "src": "2368:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 774,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2368:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2367:15:3"
            },
            "scope": 1118,
            "src": "2308:198:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 865,
              "nodeType": "Block",
              "src": "2976:1233:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 798,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 795,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 789,
                          "src": "2994:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 796,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 787,
                            "src": "3001:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          },
                          "id": 797,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "length",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "3001:11:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "2994:18:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      ],
                      "id": 794,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        2824,
                        2825
                      ],
                      "referencedDeclaration": 2824,
                      "src": "2986:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
                        "typeString": "function (bool) pure"
                      }
                    },
                    "id": 799,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2986:27:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 800,
                  "nodeType": "ExpressionStatement",
                  "src": "2986:27:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 810,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 807,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 803,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 801,
                          "name": "off",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 785,
                          "src": "3028:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "+",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 802,
                          "name": "len",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 789,
                          "src": "3034:3:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "3028:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 804,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 783,
                            "src": "3040:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 805,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "3040:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 806,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "3040:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3028:26:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 808,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 783,
                        "src": "3057:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 809,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "3057:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3028:41:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 825,
                  "nodeType": "IfStatement",
                  "src": "3024:117:3",
                  "trueBody": {
                    "id": 824,
                    "nodeType": "Block",
                    "src": "3071:70:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 812,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 783,
                              "src": "3092:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 821,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 814,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 783,
                                      "src": "3101:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 815,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "3101:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 818,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 816,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 789,
                                      "src": "3115:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 817,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 785,
                                      "src": "3121:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "3115:9:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 813,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "3097:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 819,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3097:28:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 820,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3128:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "3097:32:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 811,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "3085:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 822,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "3085:45:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 823,
                        "nodeType": "ExpressionStatement",
                        "src": "3085:45:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    827
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 827,
                      "name": "dest",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3151:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 826,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3151:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 828,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3151:9:3"
                },
                {
                  "assignments": [
                    830
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 830,
                      "name": "src",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3170:8:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 829,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3170:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 831,
                  "initialValue": null,
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3170:8:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 783,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3280:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 787,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3680:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3462:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "src": {
                        "declaration": 830,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3669:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3491:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 789,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3576:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3581:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 789,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3632:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 785,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "3637:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 832,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    dest := add(add(bufptr, 32), off)\n    if gt(add(len, off), buflen)\n    {\n        mstore(bufptr, add(len, off))\n    }\n    src := add(data, 32)\n}",
                  "src": "3188:574:3"
                },
                {
                  "body": {
                    "id": 849,
                    "nodeType": "Block",
                    "src": "3788:136:3",
                    "statements": [
                      {
                        "externalReferences": [
                          {
                            "dest": {
                              "declaration": 827,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3836:4:3",
                              "valueSize": 1
                            }
                          },
                          {
                            "src": {
                              "declaration": 830,
                              "isOffset": false,
                              "isSlot": false,
                              "src": "3848:3:3",
                              "valueSize": 1
                            }
                          }
                        ],
                        "id": 840,
                        "nodeType": "InlineAssembly",
                        "operations": "{\n    mstore(dest, mload(src))\n}",
                        "src": "3802:82:3"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 843,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 841,
                            "name": "dest",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 827,
                            "src": "3880:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 842,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3888:2:3",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3880:10:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 844,
                        "nodeType": "ExpressionStatement",
                        "src": "3880:10:3"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 847,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 845,
                            "name": "src",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 830,
                            "src": "3904:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "+=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3332",
                            "id": 846,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "3911:2:3",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_32_by_1",
                              "typeString": "int_const 32"
                            },
                            "value": "32"
                          },
                          "src": "3904:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 848,
                        "nodeType": "ExpressionStatement",
                        "src": "3904:9:3"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 835,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 833,
                      "name": "len",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 789,
                      "src": "3766:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "3332",
                      "id": 834,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3773:2:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_32_by_1",
                        "typeString": "int_const 32"
                      },
                      "value": "32"
                    },
                    "src": "3766:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 850,
                  "initializationExpression": null,
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 838,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftHandSide": {
                        "argumentTypes": null,
                        "id": 836,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 789,
                        "src": "3777:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "Assignment",
                      "operator": "-=",
                      "rightHandSide": {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 837,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3784:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      },
                      "src": "3777:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 839,
                    "nodeType": "ExpressionStatement",
                    "src": "3777:9:3"
                  },
                  "nodeType": "ForStatement",
                  "src": "3759:165:3"
                },
                {
                  "assignments": [
                    852
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 852,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 865,
                      "src": "3966:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 851,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "3966:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 861,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 860,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 858,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 853,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3978:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 856,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "3332",
                              "id": 854,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "3986:2:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_32_by_1",
                                "typeString": "int_const 32"
                              },
                              "value": "32"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 855,
                              "name": "len",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 789,
                              "src": "3991:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "3986:8:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 857,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "3985:10:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3978:17:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 859,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3998:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "3978:21:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3966:33:3"
                },
                {
                  "externalReferences": [
                    {
                      "src": {
                        "declaration": 830,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4057:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 852,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4067:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4112:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 852,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4119:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "dest": {
                        "declaration": 827,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "4144:4:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 862,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let srcpart := and(mload(src), not(mask))\n    let destpart := and(mload(dest), mask)\n    mstore(dest, or(destpart, srcpart))\n}",
                  "src": "4009:189:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 863,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 783,
                    "src": "4199:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 793,
                  "id": 864,
                  "nodeType": "Return",
                  "src": "4192:10:3"
                }
              ]
            },
            "documentation": "@dev Writes a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The start offset to write to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 866,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 790,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 783,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2881:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 782,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2881:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 785,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2900:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 784,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2900:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 787,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2910:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 786,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2910:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 789,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2929:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 788,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "2929:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2880:58:3"
            },
            "returnParameters": {
              "id": 793,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 792,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 866,
                  "src": "2961:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 791,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "2961:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2960:15:3"
            },
            "scope": 1118,
            "src": "2866:1343:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 886,
              "nodeType": "Block",
              "src": "4625:61:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 878,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 868,
                        "src": "4648:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 879,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 868,
                            "src": "4653:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 880,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "4653:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 881,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4653:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 882,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 870,
                        "src": "4669:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 883,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 872,
                        "src": "4675:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 877,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 866,
                      "src": "4642:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 884,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4642:37:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 876,
                  "id": 885,
                  "nodeType": "Return",
                  "src": "4635:44:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@param len The number of bytes to copy.\n@return The original buffer, for chaining.",
            "id": 887,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 873,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 868,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4539:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 867,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4539:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 870,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4558:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 869,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4558:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 872,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4577:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 871,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "4577:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4538:48:3"
            },
            "returnParameters": {
              "id": 876,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 875,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 887,
                  "src": "4610:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 874,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4610:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4609:15:3"
            },
            "scope": 1118,
            "src": "4523:163:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 906,
              "nodeType": "Block",
              "src": "5046:69:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 897,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 889,
                        "src": "5069:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 898,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 889,
                            "src": "5074:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 899,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "5074:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 900,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5074:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 901,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 891,
                        "src": "5090:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 902,
                          "name": "data",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 891,
                          "src": "5096:4:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory_ptr",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 903,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5096:11:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 896,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 866,
                      "src": "5063:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes memory,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 904,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5063:45:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 895,
                  "id": 905,
                  "nodeType": "Return",
                  "src": "5056:52:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte string to a buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 907,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "append",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 892,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 889,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "4970:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 888,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "4970:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 891,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "4989:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 890,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4989:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4969:38:3"
            },
            "returnParameters": {
              "id": 895,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 894,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 907,
                  "src": "5031:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 893,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5031:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5030:15:3"
            },
            "scope": 1118,
            "src": "4954:161:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 935,
              "nodeType": "Block",
              "src": "5525:616:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 921,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 918,
                      "name": "off",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 911,
                      "src": "5539:3:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 919,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 909,
                        "src": "5545:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 920,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "5545:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5539:18:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 931,
                  "nodeType": "IfStatement",
                  "src": "5535:78:3",
                  "trueBody": {
                    "id": 930,
                    "nodeType": "Block",
                    "src": "5559:54:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 923,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 909,
                              "src": "5580:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 927,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 924,
                                  "name": "buf",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 909,
                                  "src": "5585:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                    "typeString": "struct Buffer.buffer memory"
                                  }
                                },
                                "id": 925,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "capacity",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 666,
                                "src": "5585:12:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 926,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5600:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "5585:16:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 922,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "5573:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 928,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5573:29:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 929,
                        "nodeType": "ExpressionStatement",
                        "src": "5573:29:3"
                      }
                    ]
                  }
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 909,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5715:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "6030:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 913,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5952:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 911,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "5916:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 932,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let buflen := mload(bufptr)\n    let dest := add(add(bufptr, off), 32)\n    mstore8(dest, data)\n    if eq(off, buflen)\n    {\n        mstore(bufptr, add(buflen, 1))\n    }\n}",
                  "src": "5623:507:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 933,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 909,
                    "src": "6131:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 917,
                  "id": 934,
                  "nodeType": "Return",
                  "src": "6124:10:3"
                }
              ]
            },
            "documentation": "@dev Writes a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write the byte at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 936,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 914,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 909,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5447:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 908,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5447:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 911,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5466:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 910,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "5466:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 913,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5476:10:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 912,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "5476:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5446:41:3"
            },
            "returnParameters": {
              "id": 917,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 916,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 936,
                  "src": "5510:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 915,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "5510:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5509:15:3"
            },
            "scope": 1118,
            "src": "5427:714:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 953,
              "nodeType": "Block",
              "src": "6493:61:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 946,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 938,
                        "src": "6521:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 947,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 938,
                            "src": "6526:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 948,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "6526:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 949,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "6526:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 950,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 940,
                        "src": "6542:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint8",
                          "typeString": "uint8"
                        }
                      ],
                      "id": 945,
                      "name": "writeUint8",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 936,
                      "src": "6510:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_uint8_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,uint8) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 951,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6510:37:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 944,
                  "id": 952,
                  "nodeType": "Return",
                  "src": "6503:44:3"
                }
              ]
            },
            "documentation": "@dev Appends a byte to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 954,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendUint8",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 941,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 938,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6425:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 937,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6425:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 940,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6444:10:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 939,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "6444:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6424:31:3"
            },
            "returnParameters": {
              "id": 944,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 943,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 954,
                  "src": "6478:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 942,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6478:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6477:15:3"
            },
            "scope": 1118,
            "src": "6404:150:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1009,
              "nodeType": "Block",
              "src": "7031:706:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 972,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 969,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 967,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 962,
                        "src": "7045:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 968,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 958,
                        "src": "7051:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7045:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 970,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 956,
                        "src": "7057:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 971,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "7057:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "7045:24:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 985,
                  "nodeType": "IfStatement",
                  "src": "7041:94:3",
                  "trueBody": {
                    "id": 984,
                    "nodeType": "Block",
                    "src": "7071:64:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 974,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 956,
                              "src": "7092:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 981,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 976,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 956,
                                      "src": "7101:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 977,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "7101:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "id": 978,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 962,
                                    "src": "7115:3:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 975,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "7097:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 979,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7097:22:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 980,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "7122:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "7097:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 973,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "7085:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 982,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7085:39:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 983,
                        "nodeType": "ExpressionStatement",
                        "src": "7085:39:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    987
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 987,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1009,
                      "src": "7145:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 986,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "7145:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 993,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 992,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 990,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 988,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7157:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 989,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 962,
                        "src": "7164:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7157:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 991,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "7170:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "7157:14:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "7145:26:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1004,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 994,
                      "name": "data",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 960,
                      "src": "7209:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      },
                      "id": 1003,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 995,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 960,
                        "src": "7216:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">>",
                      "rightExpression": {
                        "argumentTypes": null,
                        "components": [
                          {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 1001,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "hexValue": "38",
                              "id": 996,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7225:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_8_by_1",
                                "typeString": "int_const 8"
                              },
                              "value": "8"
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "*",
                            "rightExpression": {
                              "argumentTypes": null,
                              "components": [
                                {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 999,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "3332",
                                    "id": 997,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "7230:2:3",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_32_by_1",
                                      "typeString": "int_const 32"
                                    },
                                    "value": "32"
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 998,
                                    "name": "len",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 962,
                                    "src": "7235:3:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "7230:8:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "id": 1000,
                              "isConstant": false,
                              "isInlineArray": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "TupleExpression",
                              "src": "7229:10:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "7225:14:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "id": 1002,
                        "isConstant": false,
                        "isInlineArray": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "TupleExpression",
                        "src": "7224:16:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "7216:24:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "src": "7209:31:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "id": 1005,
                  "nodeType": "ExpressionStatement",
                  "src": "7209:31:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 956,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7342:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7469:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7463:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 960,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7531:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 987,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7523:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7614:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7619:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 958,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7677:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 962,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "7682:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1006,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "7250:476:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1007,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 956,
                    "src": "7727:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 966,
                  "id": 1008,
                  "nodeType": "Return",
                  "src": "7720:10:3"
                }
              ]
            },
            "documentation": "@dev Writes up to 32 bytes to the buffer. Resizes if doing so would\n     exceed the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (left-aligned).\n@return The original buffer, for chaining.",
            "id": 1010,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "write",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 963,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 956,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6942:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 955,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "6942:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 958,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6961:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 957,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6961:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 960,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6971:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 959,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6971:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 962,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "6985:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 961,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "6985:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6941:53:3"
            },
            "returnParameters": {
              "id": 966,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 965,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1010,
                  "src": "7016:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 964,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "7016:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7015:15:3"
            },
            "scope": 1118,
            "src": "6927:810:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          },
          {
            "body": {
              "id": 1030,
              "nodeType": "Block",
              "src": "8146:58:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1022,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1012,
                        "src": "8169:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1023,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1014,
                        "src": "8174:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1025,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1016,
                            "src": "8187:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1024,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8179:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 1026,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8179:13:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 1027,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8194:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1021,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "8163:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1028,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8163:34:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1020,
                  "id": 1029,
                  "nodeType": "Return",
                  "src": "8156:41:3"
                }
              ]
            },
            "documentation": "@dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the\n     capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 1031,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1017,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1012,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8065:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1011,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8065:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1014,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8084:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1013,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "8084:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1016,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8094:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1015,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8094:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8064:43:3"
            },
            "returnParameters": {
              "id": 1020,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1019,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1031,
                  "src": "8131:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1018,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8131:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8130:15:3"
            },
            "scope": 1118,
            "src": "8043:161:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1051,
              "nodeType": "Block",
              "src": "8565:69:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1041,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1033,
                        "src": "8588:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1042,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1033,
                            "src": "8593:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1043,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "8593:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1044,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "8593:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 1046,
                            "name": "data",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1035,
                            "src": "8617:4:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes20",
                              "typeString": "bytes20"
                            }
                          ],
                          "id": 1045,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "8609:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_bytes32_$",
                            "typeString": "type(bytes32)"
                          },
                          "typeName": "bytes32"
                        },
                        "id": 1047,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "8609:13:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3230",
                        "id": 1048,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "8624:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_20_by_1",
                          "typeString": "int_const 20"
                        },
                        "value": "20"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1040,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "8582:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1049,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "8582:45:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1039,
                  "id": 1050,
                  "nodeType": "Return",
                  "src": "8575:52:3"
                }
              ]
            },
            "documentation": "@dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chhaining.",
            "id": 1052,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes20",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1036,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1033,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8494:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1032,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8494:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1035,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8513:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes20",
                    "typeString": "bytes20"
                  },
                  "typeName": {
                    "id": 1034,
                    "name": "bytes20",
                    "nodeType": "ElementaryTypeName",
                    "src": "8513:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes20",
                      "typeString": "bytes20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8493:33:3"
            },
            "returnParameters": {
              "id": 1039,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1038,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1052,
                  "src": "8550:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1037,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8550:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8549:15:3"
            },
            "scope": 1118,
            "src": "8471:163:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1070,
              "nodeType": "Block",
              "src": "8994:60:3",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 1062,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1054,
                        "src": "9017:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 1063,
                            "name": "buf",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 1054,
                            "src": "9022:3:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                              "typeString": "struct Buffer.buffer memory"
                            }
                          },
                          "id": 1064,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "buf",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 664,
                          "src": "9022:7:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes_memory",
                            "typeString": "bytes memory"
                          }
                        },
                        "id": 1065,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "9022:14:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 1066,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1056,
                        "src": "9038:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "3332",
                        "id": 1067,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9044:2:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_32_by_1",
                          "typeString": "int_const 32"
                        },
                        "value": "32"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_buffer_$667_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": 1061,
                      "name": "write",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        866,
                        1010
                      ],
                      "referencedDeclaration": 1010,
                      "src": "9011:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$_t_bytes32_$_t_uint256_$returns$_t_struct$_buffer_$667_memory_ptr_$",
                        "typeString": "function (struct Buffer.buffer memory,uint256,bytes32,uint256) pure returns (struct Buffer.buffer memory)"
                      }
                    },
                    "id": 1068,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "9011:36:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1060,
                  "id": 1069,
                  "nodeType": "Return",
                  "src": "9004:43:3"
                }
              ]
            },
            "documentation": "@dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param data The data to append.\n@return The original buffer, for chaining.",
            "id": 1071,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "appendBytes32",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1057,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1054,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8923:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1053,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8923:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1056,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8942:12:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 1055,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "8942:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8922:33:3"
            },
            "returnParameters": {
              "id": 1060,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1059,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1071,
                  "src": "8979:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1058,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "8979:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8978:15:3"
            },
            "scope": 1118,
            "src": "8900:154:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 1116,
              "nodeType": "Block",
              "src": "9528:643:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1089,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1086,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 1084,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1079,
                        "src": "9542:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 1085,
                        "name": "off",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1075,
                        "src": "9548:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9542:9:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 1087,
                        "name": "buf",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1073,
                        "src": "9554:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                          "typeString": "struct Buffer.buffer memory"
                        }
                      },
                      "id": 1088,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "capacity",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 666,
                      "src": "9554:12:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "9542:24:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 1104,
                  "nodeType": "IfStatement",
                  "src": "9538:100:3",
                  "trueBody": {
                    "id": 1103,
                    "nodeType": "Block",
                    "src": "9568:70:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 1091,
                              "name": "buf",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 1073,
                              "src": "9589:3:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 1100,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "expression": {
                                      "argumentTypes": null,
                                      "id": 1093,
                                      "name": "buf",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1073,
                                      "src": "9598:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                        "typeString": "struct Buffer.buffer memory"
                                      }
                                    },
                                    "id": 1094,
                                    "isConstant": false,
                                    "isLValue": true,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "capacity",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 666,
                                    "src": "9598:12:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  {
                                    "argumentTypes": null,
                                    "commonType": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    "id": 1097,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "leftExpression": {
                                      "argumentTypes": null,
                                      "id": 1095,
                                      "name": "len",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1079,
                                      "src": "9612:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "nodeType": "BinaryOperation",
                                    "operator": "+",
                                    "rightExpression": {
                                      "argumentTypes": null,
                                      "id": 1096,
                                      "name": "off",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 1075,
                                      "src": "9618:3:3",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "src": "9612:9:3",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  ],
                                  "id": 1092,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 770,
                                  "src": "9594:3:3",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                    "typeString": "function (uint256,uint256) pure returns (uint256)"
                                  }
                                },
                                "id": 1098,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "9594:28:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "*",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "32",
                                "id": 1099,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "9625:1:3",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_2_by_1",
                                  "typeString": "int_const 2"
                                },
                                "value": "2"
                              },
                              "src": "9594:32:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                                "typeString": "struct Buffer.buffer memory"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 1090,
                            "name": "resize",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 751,
                            "src": "9582:6:3",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_struct$_buffer_$667_memory_ptr_$_t_uint256_$returns$__$",
                              "typeString": "function (struct Buffer.buffer memory,uint256) pure"
                            }
                          },
                          "id": 1101,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "9582:45:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 1102,
                        "nodeType": "ExpressionStatement",
                        "src": "9582:45:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    1106
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 1106,
                      "name": "mask",
                      "nodeType": "VariableDeclaration",
                      "scope": 1116,
                      "src": "9648:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 1105,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "9648:4:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 1112,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 1111,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 1109,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "hexValue": "323536",
                        "id": 1107,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "9660:3:3",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_256_by_1",
                          "typeString": "int_const 256"
                        },
                        "value": "256"
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "**",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 1108,
                        "name": "len",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1079,
                        "src": "9667:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "9660:10:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 1110,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "9673:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "9660:14:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "9648:26:3"
                },
                {
                  "externalReferences": [
                    {
                      "buf": {
                        "declaration": 1073,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9776:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9903:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9897:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "data": {
                        "declaration": 1077,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9965:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "mask": {
                        "declaration": 1106,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "9957:4:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10048:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10053:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "off": {
                        "declaration": 1075,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10111:3:3",
                        "valueSize": 1
                      }
                    },
                    {
                      "len": {
                        "declaration": 1079,
                        "isOffset": false,
                        "isSlot": false,
                        "src": "10116:3:3",
                        "valueSize": 1
                      }
                    }
                  ],
                  "id": 1113,
                  "nodeType": "InlineAssembly",
                  "operations": "{\n    let bufptr := mload(buf)\n    let dest := add(add(bufptr, off), len)\n    mstore(dest, or(and(mload(dest), not(mask)), data))\n    if gt(add(off, len), mload(bufptr))\n    {\n        mstore(bufptr, add(off, len))\n    }\n}",
                  "src": "9684:476:3"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 1114,
                    "name": "buf",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 1073,
                    "src": "10161:3:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                      "typeString": "struct Buffer.buffer memory"
                    }
                  },
                  "functionReturnParameters": 1083,
                  "id": 1115,
                  "nodeType": "Return",
                  "src": "10154:10:3"
                }
              ]
            },
            "documentation": "@dev Writes an integer to the buffer. Resizes if doing so would exceed\n     the capacity of the buffer.\n@param buf The buffer to append to.\n@param off The offset to write at.\n@param data The data to append.\n@param len The number of bytes to write (right-aligned).\n@return The original buffer, for chaining.",
            "id": 1117,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "writeInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 1080,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1073,
                  "name": "buf",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9442:17:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1072,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "9442:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1075,
                  "name": "off",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9461:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1074,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9461:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1077,
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9471:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1076,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9471:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 1079,
                  "name": "len",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9482:8:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 1078,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "9482:4:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9441:50:3"
            },
            "returnParameters": {
              "id": 1083,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 1082,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 1117,
                  "src": "9513:13:3",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_buffer_$667_memory_ptr",
                    "typeString": "struct Buffer.buffer"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 1081,
                    "name": "buffer",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 667,
                    "src": "9513:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_buffer_$667_storage_ptr",
                      "typeString": "struct Buffer.buffer"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9512:15:3"
            },
            "scope": 1118,
            "src": "9424:747:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "private"
          }
        ],
        "scope": 1119,
        "src": "403:9770:3"
      }
    ],
    "src": "0:10174:3"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.0+commit.1d4f565a.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.6",
  "updatedAt": "2019-08-07T14:38:41.860Z",
  "devdoc": {
    "details": "A library for working with mutable byte buffers in Solidity. * Byte buffers are mutable and expandable, and provide a variety of primitives for writing to them. At any time you can fetch a bytes object containing the current contents of the buffer. The bytes object should not be stored between operations, as it may change due to resizing of the buffer.",
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}