UNPKG

moonwalkerswap-v1-core

Version:
1,088 lines 309 kB
{ "contractName": "BitMath", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"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\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/BitMath.sol\":\"BitMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/BitMath.sol\":{\"keccak256\":\"0xfdb9011d56f4fc6dbf7dfa9bd191d13c405dc1ef5f295e222d402fedd7b78b4a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://635d12ff3353f4996357c4c8798051c49755de9a9431c8068fdd45364c8359f4\",\"dweb:/ipfs/QmfTTffPWDnN1aBeNXgcdozJeBxa9Q6CWJJ2bZh7ZoymKz\"]}},\"version\":1}", "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c636c374d1125fbebdf4041931eebb5f19eb0e4483652d34f07b229b12f4f96264736f6c63430007060033", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c636c374d1125fbebdf4041931eebb5f19eb0e4483652d34f07b229b12f4f96264736f6c63430007060033", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "174:2602:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;", "deployedSourceMap": "174:2602:17:-:0;;;;;;;;", "source": "// SPDX-License-Identifier: MIT\npragma solidity >=0.5.0;\n\n/// @title BitMath\n/// @dev This library provides functionality for computing bit properties of an unsigned integer\nlibrary BitMath {\n /// @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\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0);\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n\n /// @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\n function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0);\n\n r = 255;\n if (x & type(uint128).max > 0) {\n r -= 128;\n } else {\n x >>= 128;\n }\n if (x & type(uint64).max > 0) {\n r -= 64;\n } else {\n x >>= 64;\n }\n if (x & type(uint32).max > 0) {\n r -= 32;\n } else {\n x >>= 32;\n }\n if (x & type(uint16).max > 0) {\n r -= 16;\n } else {\n x >>= 16;\n }\n if (x & type(uint8).max > 0) {\n r -= 8;\n } else {\n x >>= 8;\n }\n if (x & 0xf > 0) {\n r -= 4;\n } else {\n x >>= 4;\n }\n if (x & 0x3 > 0) {\n r -= 2;\n } else {\n x >>= 2;\n }\n if (x & 0x1 > 0) r -= 1;\n }\n}\n", "sourcePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/BitMath.sol", "ast": { "absolutePath": "/Users/warrenmason/Documents/UniswapV3Contracts/Core/LiveContracts/MoonwalkerSwap-v1-Core/contracts/libraries/BitMath.sol", "exportedSymbols": { "BitMath": [ 3800 ] }, "id": 3801, "license": "MIT", "nodeType": "SourceUnit", "nodes": [ { "id": 3523, "literals": [ "solidity", ">=", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "32:24:17" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": { "id": 3524, "nodeType": "StructuredDocumentation", "src": "58:116:17", "text": "@title BitMath\n @dev This library provides functionality for computing bit properties of an unsigned integer" }, "fullyImplemented": true, "id": 3800, "linearizedBaseContracts": [ 3800 ], "name": "BitMath", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 3637, "nodeType": "Block", "src": "729:660:17", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3535, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3533, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "747:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 3534, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "751:1:17", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "747:5:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 3532, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4294967278, 4294967278 ], "referencedDeclaration": 4294967278, "src": "739:7:17", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 3536, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "739:14:17", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 3537, "nodeType": "ExpressionStatement", "src": "739:14:17" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3540, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3538, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "768:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "3078313030303030303030303030303030303030303030303030303030303030303030", "id": 3539, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "773:35:17", "typeDescriptions": { "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1", "typeString": "int_const 3402...(31 digits omitted)...1456" }, "value": "0x100000000000000000000000000000000" }, "src": "768:40:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3550, "nodeType": "IfStatement", "src": "764:102:17", "trueBody": { "id": 3549, "nodeType": "Block", "src": "810:56:17", "statements": [ { "expression": { "id": 3543, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3541, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "824:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "313238", "id": 3542, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "830:3:17", "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "824:9:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3544, "nodeType": "ExpressionStatement", "src": "824:9:17" }, { "expression": { "id": 3547, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3545, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "847:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "313238", "id": 3546, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "852:3:17", "typeDescriptions": { "typeIdentifier": "t_rational_128_by_1", "typeString": "int_const 128" }, "value": "128" }, "src": "847:8:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3548, "nodeType": "ExpressionStatement", "src": "847:8:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3553, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3551, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "879:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "30783130303030303030303030303030303030", "id": 3552, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "884:19:17", "typeDescriptions": { "typeIdentifier": "t_rational_18446744073709551616_by_1", "typeString": "int_const 18446744073709551616" }, "value": "0x10000000000000000" }, "src": "879:24:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3563, "nodeType": "IfStatement", "src": "875:84:17", "trueBody": { "id": 3562, "nodeType": "Block", "src": "905:54:17", "statements": [ { "expression": { "id": 3556, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3554, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "919:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "3634", "id": 3555, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "925:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "919:8:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3557, "nodeType": "ExpressionStatement", "src": "919:8:17" }, { "expression": { "id": 3560, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3558, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "941:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "3634", "id": 3559, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "946:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_64_by_1", "typeString": "int_const 64" }, "value": "64" }, "src": "941:7:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3561, "nodeType": "ExpressionStatement", "src": "941:7:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3566, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3564, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "972:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "3078313030303030303030", "id": 3565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "977:11:17", "typeDescriptions": { "typeIdentifier": "t_rational_4294967296_by_1", "typeString": "int_const 4294967296" }, "value": "0x100000000" }, "src": "972:16:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3576, "nodeType": "IfStatement", "src": "968:76:17", "trueBody": { "id": 3575, "nodeType": "Block", "src": "990:54:17", "statements": [ { "expression": { "id": 3569, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3567, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1004:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "3332", "id": 3568, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1010:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "1004:8:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3570, "nodeType": "ExpressionStatement", "src": "1004:8:17" }, { "expression": { "id": 3573, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3571, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "1026:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "3332", "id": 3572, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1031:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_32_by_1", "typeString": "int_const 32" }, "value": "32" }, "src": "1026:7:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3574, "nodeType": "ExpressionStatement", "src": "1026:7:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3577, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1057:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "30783130303030", "id": 3578, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1062:7:17", "typeDescriptions": { "typeIdentifier": "t_rational_65536_by_1", "typeString": "int_const 65536" }, "value": "0x10000" }, "src": "1057:12:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3589, "nodeType": "IfStatement", "src": "1053:72:17", "trueBody": { "id": 3588, "nodeType": "Block", "src": "1071:54:17", "statements": [ { "expression": { "id": 3582, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3580, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1085:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "3136", "id": 3581, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1091:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "1085:8:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3583, "nodeType": "ExpressionStatement", "src": "1085:8:17" }, { "expression": { "id": 3586, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3584, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "1107:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "3136", "id": 3585, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1112:2:17", "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "16" }, "src": "1107:7:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3587, "nodeType": "ExpressionStatement", "src": "1107:7:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3592, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3590, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1138:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "3078313030", "id": 3591, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1143:5:17", "typeDescriptions": { "typeIdentifier": "t_rational_256_by_1", "typeString": "int_const 256" }, "value": "0x100" }, "src": "1138:10:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3602, "nodeType": "IfStatement", "src": "1134:68:17", "trueBody": { "id": 3601, "nodeType": "Block", "src": "1150:52:17", "statements": [ { "expression": { "id": 3595, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3593, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1164:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "38", "id": 3594, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1170:1:17", "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "1164:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3596, "nodeType": "ExpressionStatement", "src": "1164:7:17" }, { "expression": { "id": 3599, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3597, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "1185:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "38", "id": 3598, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1190:1:17", "typeDescriptions": { "typeIdentifier": "t_rational_8_by_1", "typeString": "int_const 8" }, "value": "8" }, "src": "1185:6:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3600, "nodeType": "ExpressionStatement", "src": "1185:6:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3605, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3603, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1215:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "hexValue": "30783130", "id": 3604, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1220:4:17", "typeDescriptions": { "typeIdentifier": "t_rational_16_by_1", "typeString": "int_const 16" }, "value": "0x10" }, "src": "1215:9:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 3615, "nodeType": "IfStatement", "src": "1211:67:17", "trueBody": { "id": 3614, "nodeType": "Block", "src": "1226:52:17", "statements": [ { "expression": { "id": 3608, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3606, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1240:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": ">>=", "rightHandSide": { "hexValue": "34", "id": 3607, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1246:1:17", "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" }, "value": "4" }, "src": "1240:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 3609, "nodeType": "ExpressionStatement", "src": "1240:7:17" }, { "expression": { "id": 3612, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 3610, "name": "r", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3530, "src": "1261:1:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "hexValue": "34", "id": 3611, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1266:1:17", "typeDescriptions": { "typeIdentifier": "t_rational_4_by_1", "typeString": "int_const 4" }, "value": "4" }, "src": "1261:6:17", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 3613, "nodeType": "ExpressionStatement", "src": "1261:6:17" } ] } }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 3618, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 3616, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3527, "src": "1291:1:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "