open-dex/contracts/libraries/artifacts/build-info/9895d96e38503936a6acad3ebce86927.json
2024-08-24 12:08:46 +03:00

3799 lines
124 KiB
JSON

{
"id": "9895d96e38503936a6acad3ebce86927",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/libraries/BitMath.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\r\npragma solidity >=0.5.0;\r\n\r\n/// @title BitMath\r\n/// @dev This library provides functionality for computing bit properties of an unsigned integer\r\nlibrary BitMath {\r\n /// @notice Returns the index of the most significant bit of the number,\r\n /// where the least significant bit is at index 0 and the most significant bit is at index 255\r\n /// @dev The function satisfies the property:\r\n /// x >= 2**mostSignificantBit(x) and x < 2**(mostSignificantBit(x)+1)\r\n /// @param x the value for which to compute the most significant bit, must be greater than 0\r\n /// @return r the index of the most significant bit\r\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\r\n require(x > 0);\r\n\r\n if (x >= 0x100000000000000000000000000000000) {\r\n x >>= 128;\r\n r += 128;\r\n }\r\n if (x >= 0x10000000000000000) {\r\n x >>= 64;\r\n r += 64;\r\n }\r\n if (x >= 0x100000000) {\r\n x >>= 32;\r\n r += 32;\r\n }\r\n if (x >= 0x10000) {\r\n x >>= 16;\r\n r += 16;\r\n }\r\n if (x >= 0x100) {\r\n x >>= 8;\r\n r += 8;\r\n }\r\n if (x >= 0x10) {\r\n x >>= 4;\r\n r += 4;\r\n }\r\n if (x >= 0x4) {\r\n x >>= 2;\r\n r += 2;\r\n }\r\n if (x >= 0x2) r += 1;\r\n }\r\n\r\n /// @notice Returns the index of the least significant bit of the number,\r\n /// where the least significant bit is at index 0 and the most significant bit is at index 255\r\n /// @dev The function satisfies the property:\r\n /// (x & 2**leastSignificantBit(x)) != 0 and (x & (2**(leastSignificantBit(x)) - 1)) == 0)\r\n /// @param x the value for which to compute the least significant bit, must be greater than 0\r\n /// @return r the index of the least significant bit\r\n function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {\r\n require(x > 0);\r\n\r\n r = 255;\r\n if (x & type(uint128).max > 0) {\r\n r -= 128;\r\n } else {\r\n x >>= 128;\r\n }\r\n if (x & type(uint64).max > 0) {\r\n r -= 64;\r\n } else {\r\n x >>= 64;\r\n }\r\n if (x & type(uint32).max > 0) {\r\n r -= 32;\r\n } else {\r\n x >>= 32;\r\n }\r\n if (x & type(uint16).max > 0) {\r\n r -= 16;\r\n } else {\r\n x >>= 16;\r\n }\r\n if (x & type(uint8).max > 0) {\r\n r -= 8;\r\n } else {\r\n x >>= 8;\r\n }\r\n if (x & 0xf > 0) {\r\n r -= 4;\r\n } else {\r\n x >>= 4;\r\n }\r\n if (x & 0x3 > 0) {\r\n r -= 2;\r\n } else {\r\n x >>= 2;\r\n }\r\n if (x & 0x1 > 0) r -= 1;\r\n }\r\n}\r\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"contracts/libraries/BitMath.sol": {
"BitMath": {
"abi": [],
"devdoc": {
"details": "This library provides functionality for computing bit properties of an unsigned integer",
"kind": "dev",
"methods": {},
"title": "BitMath",
"version": 1
},
"evm": {
"assembly": " /* \"contracts/libraries/BitMath.sol\":192:2882 library BitMath {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/libraries/BitMath.sol\":192:2882 library BitMath {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa2646970667358221220274dda9aa8d3c5134b7d0e600c2069eb8627e589152899540822c3697156edf664736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220274dda9aa8d3c5134b7d0e600c2069eb8627e589152899540822c3697156edf664736f6c634300081a0033",
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x27 0x4D 0xDA SWAP11 0xA8 0xD3 0xC5 SGT 0x4B PUSH30 0xE600C2069EB8627E589152899540822C3697156EDF664736F6C63430008 BYTE STOP CALLER ",
"sourceMap": "192:2690:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220274dda9aa8d3c5134b7d0e600c2069eb8627e589152899540822c3697156edf664736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x27 0x4D 0xDA SWAP11 0xA8 0xD3 0xC5 SGT 0x4B PUSH30 0xE600C2069EB8627E589152899540822C3697156EDF664736F6C63430008 BYTE STOP CALLER ",
"sourceMap": "192:2690:0:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"leastSignificantBit(uint256)": "infinite",
"mostSignificantBit(uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 192,
"end": 2882,
"name": "PUSH #[$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH [$]",
"source": 0,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "B"
},
{
"begin": 192,
"end": 2882,
"name": "DUP3",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "DUP3",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "DUP3",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "CODECOPY",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "DUP1",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "MLOAD",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "BYTE",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 192,
"end": 2882,
"name": "EQ",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH [tag]",
"source": 0,
"value": "1"
},
{
"begin": 192,
"end": 2882,
"name": "JUMPI",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "MSTORE",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "4"
},
{
"begin": 192,
"end": 2882,
"name": "MSTORE",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "24"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "REVERT",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "tag",
"source": 0,
"value": "1"
},
{
"begin": 192,
"end": 2882,
"name": "JUMPDEST",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "ADDRESS",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "MSTORE",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "73"
},
{
"begin": 192,
"end": 2882,
"name": "DUP2",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "MSTORE8",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "DUP3",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "DUP2",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "RETURN",
"source": 0
}
],
".data": {
"0": {
".auxdata": "a2646970667358221220274dda9aa8d3c5134b7d0e600c2069eb8627e589152899540822c3697156edf664736f6c634300081a0033",
".code": [
{
"begin": 192,
"end": 2882,
"name": "PUSHDEPLOYADDRESS",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "ADDRESS",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "EQ",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "80"
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "40"
},
{
"begin": 192,
"end": 2882,
"name": "MSTORE",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "PUSH",
"source": 0,
"value": "0"
},
{
"begin": 192,
"end": 2882,
"name": "DUP1",
"source": 0
},
{
"begin": 192,
"end": 2882,
"name": "REVERT",
"source": 0
}
]
}
},
"sourceList": [
"contracts/libraries/BitMath.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"This library provides functionality for computing bit properties of an unsigned integer\",\"kind\":\"dev\",\"methods\":{},\"title\":\"BitMath\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/libraries/BitMath.sol\":\"BitMath\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/libraries/BitMath.sol\":{\"keccak256\":\"0x14c52bf69e189d123dc9fa84ebdca0d879cb020b7df4953678345a8e567aaf7f\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://aba03531acefeef92920d5208618ae8dfa9f9a918e2c5bfbf5798110ba8f60de\",\"dweb:/ipfs/QmUSm4Js5hMFvhBW4DvMhBPhhXTbwZ8ix9beZUNEppvAhv\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"contracts/libraries/BitMath.sol": {
"ast": {
"absolutePath": "contracts/libraries/BitMath.sol",
"exportedSymbols": {
"BitMath": [
278
]
},
"id": 279,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
">=",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "46:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "BitMath",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "74:118:0",
"text": "@title BitMath\n @dev This library provides functionality for computing bit properties of an unsigned integer"
},
"fullyImplemented": true,
"id": 278,
"linearizedBaseContracts": [
278
],
"name": "BitMath",
"nameLocation": "200:7:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 115,
"nodeType": "Block",
"src": "754:692:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 11,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "773:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "777:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "773:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 10,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "765:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "765:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 15,
"nodeType": "ExpressionStatement",
"src": "765:14:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 16,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "796:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030",
"id": 17,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "801:35:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1",
"typeString": "int_const 3402...(31 digits omitted)...1456"
},
"value": "0x100000000000000000000000000000000"
},
"src": "796:40:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 28,
"nodeType": "IfStatement",
"src": "792:105:0",
"trueBody": {
"id": 27,
"nodeType": "Block",
"src": "838:59:0",
"statements": [
{
"expression": {
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 19,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "853:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "313238",
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "859:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "853:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 22,
"nodeType": "ExpressionStatement",
"src": "853:9:0"
},
{
"expression": {
"id": 25,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 23,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "877:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "313238",
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "882:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "877:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 26,
"nodeType": "ExpressionStatement",
"src": "877:8:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 31,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 29,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "911:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30783130303030303030303030303030303030",
"id": 30,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "916:19:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_18446744073709551616_by_1",
"typeString": "int_const 18446744073709551616"
},
"value": "0x10000000000000000"
},
"src": "911:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 41,
"nodeType": "IfStatement",
"src": "907:87:0",
"trueBody": {
"id": 40,
"nodeType": "Block",
"src": "937:57:0",
"statements": [
{
"expression": {
"id": 34,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 32,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "952:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3634",
"id": 33,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "958:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "952:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 35,
"nodeType": "ExpressionStatement",
"src": "952:8:0"
},
{
"expression": {
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 36,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "975:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3634",
"id": 37,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "980:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "975:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 39,
"nodeType": "ExpressionStatement",
"src": "975:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 44,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 42,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1008:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "3078313030303030303030",
"id": 43,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1013:11:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4294967296_by_1",
"typeString": "int_const 4294967296"
},
"value": "0x100000000"
},
"src": "1008:16:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 54,
"nodeType": "IfStatement",
"src": "1004:79:0",
"trueBody": {
"id": 53,
"nodeType": "Block",
"src": "1026:57:0",
"statements": [
{
"expression": {
"id": 47,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 45,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1041:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3332",
"id": 46,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1047:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "1041:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 48,
"nodeType": "ExpressionStatement",
"src": "1041:8:0"
},
{
"expression": {
"id": 51,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 49,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1064:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3332",
"id": 50,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1069:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "1064:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 52,
"nodeType": "ExpressionStatement",
"src": "1064:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 57,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 55,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1097:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30783130303030",
"id": 56,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1102:7:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_65536_by_1",
"typeString": "int_const 65536"
},
"value": "0x10000"
},
"src": "1097:12:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 67,
"nodeType": "IfStatement",
"src": "1093:75:0",
"trueBody": {
"id": 66,
"nodeType": "Block",
"src": "1111:57:0",
"statements": [
{
"expression": {
"id": 60,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 58,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1126:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3136",
"id": 59,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1132:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "1126:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 61,
"nodeType": "ExpressionStatement",
"src": "1126:8:0"
},
{
"expression": {
"id": 64,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 62,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1149:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "3136",
"id": 63,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1154:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "1149:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 65,
"nodeType": "ExpressionStatement",
"src": "1149:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 70,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 68,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1182:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "3078313030",
"id": 69,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1187:5:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_256_by_1",
"typeString": "int_const 256"
},
"value": "0x100"
},
"src": "1182:10:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 80,
"nodeType": "IfStatement",
"src": "1178:71:0",
"trueBody": {
"id": 79,
"nodeType": "Block",
"src": "1194:55:0",
"statements": [
{
"expression": {
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 71,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1209:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "38",
"id": 72,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1215:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1209:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 74,
"nodeType": "ExpressionStatement",
"src": "1209:7:0"
},
{
"expression": {
"id": 77,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 75,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1231:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "38",
"id": 76,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1236:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "1231:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 78,
"nodeType": "ExpressionStatement",
"src": "1231:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 83,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 81,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1263:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "30783130",
"id": 82,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1268:4:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "0x10"
},
"src": "1263:9:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 93,
"nodeType": "IfStatement",
"src": "1259:70:0",
"trueBody": {
"id": 92,
"nodeType": "Block",
"src": "1274:55:0",
"statements": [
{
"expression": {
"id": 86,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 84,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1289:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 85,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1295:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "1289:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 87,
"nodeType": "ExpressionStatement",
"src": "1289:7:0"
},
{
"expression": {
"id": 90,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 88,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1311:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "34",
"id": 89,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1316:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "1311:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 91,
"nodeType": "ExpressionStatement",
"src": "1311:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 96,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 94,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1343:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "307834",
"id": 95,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1348:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "0x4"
},
"src": "1343:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 106,
"nodeType": "IfStatement",
"src": "1339:69:0",
"trueBody": {
"id": 105,
"nodeType": "Block",
"src": "1353:55:0",
"statements": [
{
"expression": {
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 97,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1368:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "32",
"id": 98,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1374:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1368:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 100,
"nodeType": "ExpressionStatement",
"src": "1368:7:0"
},
{
"expression": {
"id": 103,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 101,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1390:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "32",
"id": 102,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1395:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "1390:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 104,
"nodeType": "ExpressionStatement",
"src": "1390:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 109,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 107,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "1422:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">=",
"rightExpression": {
"hexValue": "307832",
"id": 108,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1427:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "0x2"
},
"src": "1422:8:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 114,
"nodeType": "IfStatement",
"src": "1418:20:0",
"trueBody": {
"expression": {
"id": 112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 110,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "1432:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"hexValue": "31",
"id": 111,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1437:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "1432:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 113,
"nodeType": "ExpressionStatement",
"src": "1432:6:0"
}
}
]
},
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "215:462:0",
"text": "@notice Returns the index of the most significant bit of the number,\n where the least significant bit is at index 0 and the most significant bit is at index 255\n @dev The function satisfies the property:\n x >= 2**mostSignificantBit(x) and x < 2**(mostSignificantBit(x)+1)\n @param x the value for which to compute the most significant bit, must be greater than 0\n @return r the index of the most significant bit"
},
"id": 116,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "mostSignificantBit",
"nameLocation": "692:18:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nameLocation": "719:1:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "711:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 4,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "711:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "710:11:0"
},
"returnParameters": {
"id": 9,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "r",
"nameLocation": "751:1:0",
"nodeType": "VariableDeclaration",
"scope": 116,
"src": "745:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 7,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "745:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "744:9:0"
},
"scope": 278,
"src": "683:763:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 276,
"nodeType": "Block",
"src": "2017:862:0",
"statements": [
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 127,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 125,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2036:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2040:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2036:5:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
],
"id": 124,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2028:7:0",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
"typeString": "function (bool) pure"
}
},
"id": 128,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2028:14:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 129,
"nodeType": "ExpressionStatement",
"src": "2028:14:0"
},
{
"expression": {
"id": 132,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 130,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2055:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "323535",
"id": 131,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2059:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_255_by_1",
"typeString": "int_const 255"
},
"value": "255"
},
"src": "2055:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 133,
"nodeType": "ExpressionStatement",
"src": "2055:7:0"
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 142,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 140,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 134,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2077:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 137,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2086:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint128_$",
"typeString": "type(uint128)"
},
"typeName": {
"id": 136,
"name": "uint128",
"nodeType": "ElementaryTypeName",
"src": "2086:7:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint128_$",
"typeString": "type(uint128)"
}
],
"id": 135,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2081:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 138,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2081:13:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint128",
"typeString": "type(uint128)"
}
},
"id": 139,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2095:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2081:17:0",
"typeDescriptions": {
"typeIdentifier": "t_uint128",
"typeString": "uint128"
}
},
"src": "2077:21:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 141,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2101:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2077:25:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 152,
"nodeType": "Block",
"src": "2145:36:0",
"statements": [
{
"expression": {
"id": 150,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 148,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2160:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "313238",
"id": 149,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2166:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "2160:9:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 151,
"nodeType": "ExpressionStatement",
"src": "2160:9:0"
}
]
},
"id": 153,
"nodeType": "IfStatement",
"src": "2073:108:0",
"trueBody": {
"id": 147,
"nodeType": "Block",
"src": "2104:35:0",
"statements": [
{
"expression": {
"id": 145,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 143,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2119:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "313238",
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2124:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_128_by_1",
"typeString": "int_const 128"
},
"value": "128"
},
"src": "2119:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 146,
"nodeType": "ExpressionStatement",
"src": "2119:8:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 162,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 154,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2195:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 157,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2204:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
},
"typeName": {
"id": 156,
"name": "uint64",
"nodeType": "ElementaryTypeName",
"src": "2204:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint64_$",
"typeString": "type(uint64)"
}
],
"id": 155,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2199:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 158,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2199:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint64",
"typeString": "type(uint64)"
}
},
"id": 159,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2212:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2199:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint64",
"typeString": "uint64"
}
},
"src": "2195:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 161,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2218:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2195:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 172,
"nodeType": "Block",
"src": "2261:35:0",
"statements": [
{
"expression": {
"id": 170,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 168,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2276:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3634",
"id": 169,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2282:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "2276:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 171,
"nodeType": "ExpressionStatement",
"src": "2276:8:0"
}
]
},
"id": 173,
"nodeType": "IfStatement",
"src": "2191:105:0",
"trueBody": {
"id": 167,
"nodeType": "Block",
"src": "2221:34:0",
"statements": [
{
"expression": {
"id": 165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 163,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2236:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "3634",
"id": 164,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2241:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_64_by_1",
"typeString": "int_const 64"
},
"value": "64"
},
"src": "2236:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 166,
"nodeType": "ExpressionStatement",
"src": "2236:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 182,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 180,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 174,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2310:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 177,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2319:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
},
"typeName": {
"id": 176,
"name": "uint32",
"nodeType": "ElementaryTypeName",
"src": "2319:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint32_$",
"typeString": "type(uint32)"
}
],
"id": 175,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2314:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 178,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2314:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint32",
"typeString": "type(uint32)"
}
},
"id": 179,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2327:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2314:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint32",
"typeString": "uint32"
}
},
"src": "2310:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 181,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2333:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2310:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 192,
"nodeType": "Block",
"src": "2376:35:0",
"statements": [
{
"expression": {
"id": 190,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 188,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2391:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3332",
"id": 189,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2397:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "2391:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 191,
"nodeType": "ExpressionStatement",
"src": "2391:8:0"
}
]
},
"id": 193,
"nodeType": "IfStatement",
"src": "2306:105:0",
"trueBody": {
"id": 187,
"nodeType": "Block",
"src": "2336:34:0",
"statements": [
{
"expression": {
"id": 185,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 183,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2351:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "3332",
"id": 184,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2356:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_32_by_1",
"typeString": "int_const 32"
},
"value": "32"
},
"src": "2351:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 186,
"nodeType": "ExpressionStatement",
"src": "2351:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 202,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 200,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 194,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2425:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 197,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2434:6:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
},
"typeName": {
"id": 196,
"name": "uint16",
"nodeType": "ElementaryTypeName",
"src": "2434:6:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint16_$",
"typeString": "type(uint16)"
}
],
"id": 195,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2429:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 198,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2429:12:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint16",
"typeString": "type(uint16)"
}
},
"id": 199,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2442:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2429:16:0",
"typeDescriptions": {
"typeIdentifier": "t_uint16",
"typeString": "uint16"
}
},
"src": "2425:20:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 201,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2448:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2425:24:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 212,
"nodeType": "Block",
"src": "2491:35:0",
"statements": [
{
"expression": {
"id": 210,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 208,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2506:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "3136",
"id": 209,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2512:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "2506:8:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 211,
"nodeType": "ExpressionStatement",
"src": "2506:8:0"
}
]
},
"id": 213,
"nodeType": "IfStatement",
"src": "2421:105:0",
"trueBody": {
"id": 207,
"nodeType": "Block",
"src": "2451:34:0",
"statements": [
{
"expression": {
"id": 205,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 203,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2466:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "3136",
"id": 204,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2471:2:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_16_by_1",
"typeString": "int_const 16"
},
"value": "16"
},
"src": "2466:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 206,
"nodeType": "ExpressionStatement",
"src": "2466:7:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 222,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 220,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 214,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2540:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"expression": {
"arguments": [
{
"id": 217,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2549:5:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 216,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "2549:5:0",
"typeDescriptions": {}
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
}
],
"id": 215,
"name": "type",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967269,
"src": "2544:4:0",
"typeDescriptions": {
"typeIdentifier": "t_function_metatype_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 218,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2544:11:0",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_magic_meta_type_t_uint8",
"typeString": "type(uint8)"
}
},
"id": 219,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2556:3:0",
"memberName": "max",
"nodeType": "MemberAccess",
"src": "2544:15:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "2540:19:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 221,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2562:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2540:23:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 232,
"nodeType": "Block",
"src": "2604:34:0",
"statements": [
{
"expression": {
"id": 230,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 228,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2619:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "38",
"id": 229,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2625:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "2619:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 231,
"nodeType": "ExpressionStatement",
"src": "2619:7:0"
}
]
},
"id": 233,
"nodeType": "IfStatement",
"src": "2536:102:0",
"trueBody": {
"id": 227,
"nodeType": "Block",
"src": "2565:33:0",
"statements": [
{
"expression": {
"id": 225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 223,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2580:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "38",
"id": 224,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2585:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_8_by_1",
"typeString": "int_const 8"
},
"value": "8"
},
"src": "2580:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 226,
"nodeType": "ExpressionStatement",
"src": "2580:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 238,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 236,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 234,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2652:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307866",
"id": 235,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2656:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_15_by_1",
"typeString": "int_const 15"
},
"value": "0xf"
},
"src": "2652:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 237,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2662:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2652:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 248,
"nodeType": "Block",
"src": "2704:34:0",
"statements": [
{
"expression": {
"id": 246,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 244,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2719:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "34",
"id": 245,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2725:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "2719:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 247,
"nodeType": "ExpressionStatement",
"src": "2719:7:0"
}
]
},
"id": 249,
"nodeType": "IfStatement",
"src": "2648:90:0",
"trueBody": {
"id": 243,
"nodeType": "Block",
"src": "2665:33:0",
"statements": [
{
"expression": {
"id": 241,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 239,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2680:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "34",
"id": 240,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2685:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "2680:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 242,
"nodeType": "ExpressionStatement",
"src": "2680:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 254,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 252,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 250,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2752:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307833",
"id": 251,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2756:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "0x3"
},
"src": "2752:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 253,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2762:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2752:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": {
"id": 264,
"nodeType": "Block",
"src": "2804:34:0",
"statements": [
{
"expression": {
"id": 262,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 260,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2819:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": ">>=",
"rightHandSide": {
"hexValue": "32",
"id": 261,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2825:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "2819:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 263,
"nodeType": "ExpressionStatement",
"src": "2819:7:0"
}
]
},
"id": 265,
"nodeType": "IfStatement",
"src": "2748:90:0",
"trueBody": {
"id": 259,
"nodeType": "Block",
"src": "2765:33:0",
"statements": [
{
"expression": {
"id": 257,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 255,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2780:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "32",
"id": 256,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2785:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "2780:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 258,
"nodeType": "ExpressionStatement",
"src": "2780:6:0"
}
]
}
},
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 270,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 268,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 266,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 119,
"src": "2852:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression": {
"hexValue": "307831",
"id": 267,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2856:3:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "0x1"
},
"src": "2852:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": ">",
"rightExpression": {
"hexValue": "30",
"id": 269,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2862:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2852:11:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 275,
"nodeType": "IfStatement",
"src": "2848:23:0",
"trueBody": {
"expression": {
"id": 273,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 271,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 122,
"src": "2865:1:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "31",
"id": 272,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2870:1:0",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "2865:6:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 274,
"nodeType": "ExpressionStatement",
"src": "2865:6:0"
}
}
]
},
"documentation": {
"id": 117,
"nodeType": "StructuredDocumentation",
"src": "1454:485:0",
"text": "@notice Returns the index of the least significant bit of the number,\n where the least significant bit is at index 0 and the most significant bit is at index 255\n @dev The function satisfies the property:\n (x & 2**leastSignificantBit(x)) != 0 and (x & (2**(leastSignificantBit(x)) - 1)) == 0)\n @param x the value for which to compute the least significant bit, must be greater than 0\n @return r the index of the least significant bit"
},
"id": 277,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "leastSignificantBit",
"nameLocation": "1954:19:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 120,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 119,
"mutability": "mutable",
"name": "x",
"nameLocation": "1982:1:0",
"nodeType": "VariableDeclaration",
"scope": 277,
"src": "1974:9:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 118,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1974:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1973:11:0"
},
"returnParameters": {
"id": 123,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 122,
"mutability": "mutable",
"name": "r",
"nameLocation": "2014:1:0",
"nodeType": "VariableDeclaration",
"scope": 277,
"src": "2008:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 121,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "2008:5:0",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
}
],
"src": "2007:9:0"
},
"scope": 278,
"src": "1945:934:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 279,
"src": "192:2690:0",
"usedErrors": [],
"usedEvents": []
}
],
"src": "46:2838:0"
},
"id": 0
}
}
}
}