{ "abi": [], "bytecode": { "object": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122061e5625dde6275648ca66c4a676359480213dc202ebd2f425901d57b3f42e2b464736f6c63430008160033", "sourceMap": "355:4893:37:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;355:4893:37;;;;;;;;;;;;;;;;;", "linkReferences": {} }, "deployedBytecode": { "object": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122061e5625dde6275648ca66c4a676359480213dc202ebd2f425901d57b3f42e2b464736f6c63430008160033", "sourceMap": "355:4893:37:-:0;;;;;;;;", "linkReferences": {} }, "methodIdentifiers": {}, "rawMetadata": "{\"compiler\":{\"version\":\"0.8.22+commit.4fc1097e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Handles \\\"phantom overflow\\\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Contains 512-bit math functions\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib_uniswap/v3-core/contracts/libraries/FullMath.sol\":\"FullMath\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":999999999},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":@uniswap/v3-core/=lib_uniswap/v3-core/\",\":@uniswap/v3-periphery/=lib_uniswap/v3-periphery/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":v3-core/=lib_uniswap/v3-core/\",\":v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/\"]},\"sources\":{\"lib_uniswap/v3-core/contracts/libraries/FullMath.sol\":{\"keccak256\":\"0x77608bce1ddeb28ed9963b554b55e8a083277eda7be31e2c7255ef532cc408be\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8fcb307cf783b612ab9abd339296391d202974e7aa158deff23d9fb3aaac832d\",\"dweb:/ipfs/QmXhcwQajcGZADQtVoQpSWYNY4tB3Y42GPPyiaW62M5JH2\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.22+commit.4fc1097e" }, "language": "Solidity", "output": { "abi": [], "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@uniswap/v3-core/=lib_uniswap/v3-core/", "@uniswap/v3-periphery/=lib_uniswap/v3-periphery/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "v3-core/=lib_uniswap/v3-core/", "v3-periphery/libraries/=lib_uniswap/v3-periphery/contracts/libraries/" ], "optimizer": { "runs": 999999999, "details": { "peephole": true, "inliner": true, "jumpdestRemover": true, "orderLiterals": true, "deduplicate": true, "cse": true, "constantOptimizer": true, "yul": true, "yulDetails": { "stackAllocation": true, "optimizerSteps": "dhfoD[xarrscLMcCTU]uljmul:fDnTOcmu" } } }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "lib_uniswap/v3-core/contracts/libraries/FullMath.sol": "FullMath" }, "libraries": {} }, "sources": { "lib_uniswap/v3-core/contracts/libraries/FullMath.sol": { "keccak256": "0x77608bce1ddeb28ed9963b554b55e8a083277eda7be31e2c7255ef532cc408be", "urls": [ "bzz-raw://8fcb307cf783b612ab9abd339296391d202974e7aa158deff23d9fb3aaac832d", "dweb:/ipfs/QmXhcwQajcGZADQtVoQpSWYNY4tB3Y42GPPyiaW62M5JH2" ], "license": "MIT" } }, "version": 1 }, "ast": { "absolutePath": "lib_uniswap/v3-core/contracts/libraries/FullMath.sol", "id": 44520, "exportedSymbols": { "FullMath": [ 44519 ] }, "nodeType": "SourceUnit", "src": "32:5217:37", "nodes": [ { "id": 44340, "nodeType": "PragmaDirective", "src": "32:24:37", "nodes": [], "literals": [ "solidity", ">=", "0.4", ".0" ] }, { "id": 44519, "nodeType": "ContractDefinition", "src": "355:4893:37", "nodes": [ { "id": 44474, "nodeType": "FunctionDefinition", "src": "834:3804:37", "nodes": [], "body": { "id": 44473, "nodeType": "Block", "src": "962:3676:37", "nodes": [], "statements": [ { "id": 44472, "nodeType": "UncheckedBlock", "src": "963:3674:37", "statements": [ { "assignments": [ 44354 ], "declarations": [ { "constant": false, "id": 44354, "mutability": "mutable", "name": "prod0", "nameLocation": "1293:5:37", "nodeType": "VariableDeclaration", "scope": 44472, "src": "1285:13:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44353, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1285:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 44355, "nodeType": "VariableDeclarationStatement", "src": "1285:13:37" }, { "assignments": [ 44357 ], "declarations": [ { "constant": false, "id": 44357, "mutability": "mutable", "name": "prod1", "nameLocation": "1361:5:37", "nodeType": "VariableDeclaration", "scope": 44472, "src": "1353:13:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44356, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1353:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 44358, "nodeType": "VariableDeclarationStatement", "src": "1353:13:37" }, { "AST": { "nativeSrc": "1429:141:37", "nodeType": "YulBlock", "src": "1429:141:37", "statements": [ { "nativeSrc": "1443:30:37", "nodeType": "YulVariableDeclaration", "src": "1443:30:37", "value": { "arguments": [ { "name": "a", "nativeSrc": "1460:1:37", "nodeType": "YulIdentifier", "src": "1460:1:37" }, { "name": "b", "nativeSrc": "1463:1:37", "nodeType": "YulIdentifier", "src": "1463:1:37" }, { "arguments": [ { "kind": "number", "nativeSrc": "1470:1:37", "nodeType": "YulLiteral", "src": "1470:1:37", "type": "", "value": "0" } ], "functionName": { "name": "not", "nativeSrc": "1466:3:37", "nodeType": "YulIdentifier", "src": "1466:3:37" }, "nativeSrc": "1466:6:37", "nodeType": "YulFunctionCall", "src": "1466:6:37" } ], "functionName": { "name": "mulmod", "nativeSrc": "1453:6:37", "nodeType": "YulIdentifier", "src": "1453:6:37" }, "nativeSrc": "1453:20:37", "nodeType": "YulFunctionCall", "src": "1453:20:37" }, "variables": [ { "name": "mm", "nativeSrc": "1447:2:37", "nodeType": "YulTypedName", "src": "1447:2:37", "type": "" } ] }, { "nativeSrc": "1486:18:37", "nodeType": "YulAssignment", "src": "1486:18:37", "value": { "arguments": [ { "name": "a", "nativeSrc": "1499:1:37", "nodeType": "YulIdentifier", "src": "1499:1:37" }, { "name": "b", "nativeSrc": "1502:1:37", "nodeType": "YulIdentifier", "src": "1502:1:37" } ], "functionName": { "name": "mul", "nativeSrc": "1495:3:37", "nodeType": "YulIdentifier", "src": "1495:3:37" }, "nativeSrc": "1495:9:37", "nodeType": "YulFunctionCall", "src": "1495:9:37" }, "variableNames": [ { "name": "prod0", "nativeSrc": "1486:5:37", "nodeType": "YulIdentifier", "src": "1486:5:37" } ] }, { "nativeSrc": "1517:43:37", "nodeType": "YulAssignment", "src": "1517:43:37", "value": { "arguments": [ { "arguments": [ { "name": "mm", "nativeSrc": "1534:2:37", "nodeType": "YulIdentifier", "src": "1534:2:37" }, { "name": "prod0", "nativeSrc": "1538:5:37", "nodeType": "YulIdentifier", "src": "1538:5:37" } ], "functionName": { "name": "sub", "nativeSrc": "1530:3:37", "nodeType": "YulIdentifier", "src": "1530:3:37" }, "nativeSrc": "1530:14:37", "nodeType": "YulFunctionCall", "src": "1530:14:37" }, { "arguments": [ { "name": "mm", "nativeSrc": "1549:2:37", "nodeType": "YulIdentifier", "src": "1549:2:37" }, { "name": "prod0", "nativeSrc": "1553:5:37", "nodeType": "YulIdentifier", "src": "1553:5:37" } ], "functionName": { "name": "lt", "nativeSrc": "1546:2:37", "nodeType": "YulIdentifier", "src": "1546:2:37" }, "nativeSrc": "1546:13:37", "nodeType": "YulFunctionCall", "src": "1546:13:37" } ], "functionName": { "name": "sub", "nativeSrc": "1526:3:37", "nodeType": "YulIdentifier", "src": "1526:3:37" }, "nativeSrc": "1526:34:37", "nodeType": "YulFunctionCall", "src": "1526:34:37" }, "variableNames": [ { "name": "prod1", "nativeSrc": "1517:5:37", "nodeType": "YulIdentifier", "src": "1517:5:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44344, "isOffset": false, "isSlot": false, "src": "1460:1:37", "valueSize": 1 }, { "declaration": 44344, "isOffset": false, "isSlot": false, "src": "1499:1:37", "valueSize": 1 }, { "declaration": 44346, "isOffset": false, "isSlot": false, "src": "1463:1:37", "valueSize": 1 }, { "declaration": 44346, "isOffset": false, "isSlot": false, "src": "1502:1:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "1486:5:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "1538:5:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "1553:5:37", "valueSize": 1 }, { "declaration": 44357, "isOffset": false, "isSlot": false, "src": "1517:5:37", "valueSize": 1 } ], "id": 44359, "nodeType": "InlineAssembly", "src": "1420:150:37" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44362, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44360, "name": "prod1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44357, "src": "1642:5:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "hexValue": "30", "id": 44361, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1651:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1642:10:37", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 44373, "nodeType": "IfStatement", "src": "1638:179:37", "trueBody": { "id": 44372, "nodeType": "Block", "src": "1654:163:37", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44366, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44364, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "1676:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 44365, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1690:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1676:15:37", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 44363, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1668:7:37", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 44367, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1668:24:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 44368, "nodeType": "ExpressionStatement", "src": "1668:24:37" }, { "AST": { "nativeSrc": "1715:65:37", "nodeType": "YulBlock", "src": "1715:65:37", "statements": [ { "nativeSrc": "1733:33:37", "nodeType": "YulAssignment", "src": "1733:33:37", "value": { "arguments": [ { "name": "prod0", "nativeSrc": "1747:5:37", "nodeType": "YulIdentifier", "src": "1747:5:37" }, { "name": "denominator", "nativeSrc": "1754:11:37", "nodeType": "YulIdentifier", "src": "1754:11:37" } ], "functionName": { "name": "div", "nativeSrc": "1743:3:37", "nodeType": "YulIdentifier", "src": "1743:3:37" }, "nativeSrc": "1743:23:37", "nodeType": "YulFunctionCall", "src": "1743:23:37" }, "variableNames": [ { "name": "result", "nativeSrc": "1733:6:37", "nodeType": "YulIdentifier", "src": "1733:6:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44348, "isOffset": false, "isSlot": false, "src": "1754:11:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "1747:5:37", "valueSize": 1 }, { "declaration": 44351, "isOffset": false, "isSlot": false, "src": "1733:6:37", "valueSize": 1 } ], "id": 44369, "nodeType": "InlineAssembly", "src": "1706:74:37" }, { "expression": { "id": 44370, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44351, "src": "1800:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 44352, "id": 44371, "nodeType": "Return", "src": "1793:13:37" } ] } }, { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44377, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44375, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "1930:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "id": 44376, "name": "prod1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44357, "src": "1944:5:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1930:19:37", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 44374, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "1922:7:37", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 44378, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "1922:28:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 44379, "nodeType": "ExpressionStatement", "src": "1922:28:37" }, { "assignments": [ 44381 ], "declarations": [ { "constant": false, "id": 44381, "mutability": "mutable", "name": "remainder", "nameLocation": "2235:9:37", "nodeType": "VariableDeclaration", "scope": 44472, "src": "2227:17:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44380, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2227:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 44382, "nodeType": "VariableDeclarationStatement", "src": "2227:17:37" }, { "AST": { "nativeSrc": "2263:62:37", "nodeType": "YulBlock", "src": "2263:62:37", "statements": [ { "nativeSrc": "2277:38:37", "nodeType": "YulAssignment", "src": "2277:38:37", "value": { "arguments": [ { "name": "a", "nativeSrc": "2297:1:37", "nodeType": "YulIdentifier", "src": "2297:1:37" }, { "name": "b", "nativeSrc": "2300:1:37", "nodeType": "YulIdentifier", "src": "2300:1:37" }, { "name": "denominator", "nativeSrc": "2303:11:37", "nodeType": "YulIdentifier", "src": "2303:11:37" } ], "functionName": { "name": "mulmod", "nativeSrc": "2290:6:37", "nodeType": "YulIdentifier", "src": "2290:6:37" }, "nativeSrc": "2290:25:37", "nodeType": "YulFunctionCall", "src": "2290:25:37" }, "variableNames": [ { "name": "remainder", "nativeSrc": "2277:9:37", "nodeType": "YulIdentifier", "src": "2277:9:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44344, "isOffset": false, "isSlot": false, "src": "2297:1:37", "valueSize": 1 }, { "declaration": 44346, "isOffset": false, "isSlot": false, "src": "2300:1:37", "valueSize": 1 }, { "declaration": 44348, "isOffset": false, "isSlot": false, "src": "2303:11:37", "valueSize": 1 }, { "declaration": 44381, "isOffset": false, "isSlot": false, "src": "2277:9:37", "valueSize": 1 } ], "id": 44383, "nodeType": "InlineAssembly", "src": "2254:71:37" }, { "AST": { "nativeSrc": "2398:108:37", "nodeType": "YulBlock", "src": "2398:108:37", "statements": [ { "nativeSrc": "2412:41:37", "nodeType": "YulAssignment", "src": "2412:41:37", "value": { "arguments": [ { "name": "prod1", "nativeSrc": "2425:5:37", "nodeType": "YulIdentifier", "src": "2425:5:37" }, { "arguments": [ { "name": "remainder", "nativeSrc": "2435:9:37", "nodeType": "YulIdentifier", "src": "2435:9:37" }, { "name": "prod0", "nativeSrc": "2446:5:37", "nodeType": "YulIdentifier", "src": "2446:5:37" } ], "functionName": { "name": "gt", "nativeSrc": "2432:2:37", "nodeType": "YulIdentifier", "src": "2432:2:37" }, "nativeSrc": "2432:20:37", "nodeType": "YulFunctionCall", "src": "2432:20:37" } ], "functionName": { "name": "sub", "nativeSrc": "2421:3:37", "nodeType": "YulIdentifier", "src": "2421:3:37" }, "nativeSrc": "2421:32:37", "nodeType": "YulFunctionCall", "src": "2421:32:37" }, "variableNames": [ { "name": "prod1", "nativeSrc": "2412:5:37", "nodeType": "YulIdentifier", "src": "2412:5:37" } ] }, { "nativeSrc": "2466:30:37", "nodeType": "YulAssignment", "src": "2466:30:37", "value": { "arguments": [ { "name": "prod0", "nativeSrc": "2479:5:37", "nodeType": "YulIdentifier", "src": "2479:5:37" }, { "name": "remainder", "nativeSrc": "2486:9:37", "nodeType": "YulIdentifier", "src": "2486:9:37" } ], "functionName": { "name": "sub", "nativeSrc": "2475:3:37", "nodeType": "YulIdentifier", "src": "2475:3:37" }, "nativeSrc": "2475:21:37", "nodeType": "YulFunctionCall", "src": "2475:21:37" }, "variableNames": [ { "name": "prod0", "nativeSrc": "2466:5:37", "nodeType": "YulIdentifier", "src": "2466:5:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "2446:5:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "2466:5:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "2479:5:37", "valueSize": 1 }, { "declaration": 44357, "isOffset": false, "isSlot": false, "src": "2412:5:37", "valueSize": 1 }, { "declaration": 44357, "isOffset": false, "isSlot": false, "src": "2425:5:37", "valueSize": 1 }, { "declaration": 44381, "isOffset": false, "isSlot": false, "src": "2435:9:37", "valueSize": 1 }, { "declaration": 44381, "isOffset": false, "isSlot": false, "src": "2486:9:37", "valueSize": 1 } ], "id": 44384, "nodeType": "InlineAssembly", "src": "2389:117:37" }, { "assignments": [ 44386 ], "declarations": [ { "constant": false, "id": 44386, "mutability": "mutable", "name": "twos", "nameLocation": "2663:4:37", "nodeType": "VariableDeclaration", "scope": 44472, "src": "2655:12:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44385, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2655:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 44397, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44396, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 44393, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "-", "prefix": true, "src": "2678:20:37", "subExpression": { "arguments": [ { "id": 44391, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "2686:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 44390, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2679:6:37", "typeDescriptions": { "typeIdentifier": "t_type$_t_int256_$", "typeString": "type(int256)" }, "typeName": { "id": 44389, "name": "int256", "nodeType": "ElementaryTypeName", "src": "2679:6:37", "typeDescriptions": {} } }, "id": 44392, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2679:19:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } }, "typeDescriptions": { "typeIdentifier": "t_int256", "typeString": "int256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_int256", "typeString": "int256" } ], "id": 44388, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "2670:7:37", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 44387, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2670:7:37", "typeDescriptions": {} } }, "id": 44394, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "2670:29:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "&", "rightExpression": { "id": 44395, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "2702:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "2670:43:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "2655:58:37" }, { "AST": { "nativeSrc": "2778:61:37", "nodeType": "YulBlock", "src": "2778:61:37", "statements": [ { "nativeSrc": "2792:37:37", "nodeType": "YulAssignment", "src": "2792:37:37", "value": { "arguments": [ { "name": "denominator", "nativeSrc": "2811:11:37", "nodeType": "YulIdentifier", "src": "2811:11:37" }, { "name": "twos", "nativeSrc": "2824:4:37", "nodeType": "YulIdentifier", "src": "2824:4:37" } ], "functionName": { "name": "div", "nativeSrc": "2807:3:37", "nodeType": "YulIdentifier", "src": "2807:3:37" }, "nativeSrc": "2807:22:37", "nodeType": "YulFunctionCall", "src": "2807:22:37" }, "variableNames": [ { "name": "denominator", "nativeSrc": "2792:11:37", "nodeType": "YulIdentifier", "src": "2792:11:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44348, "isOffset": false, "isSlot": false, "src": "2792:11:37", "valueSize": 1 }, { "declaration": 44348, "isOffset": false, "isSlot": false, "src": "2811:11:37", "valueSize": 1 }, { "declaration": 44386, "isOffset": false, "isSlot": false, "src": "2824:4:37", "valueSize": 1 } ], "id": 44398, "nodeType": "InlineAssembly", "src": "2769:70:37" }, { "AST": { "nativeSrc": "2912:49:37", "nodeType": "YulBlock", "src": "2912:49:37", "statements": [ { "nativeSrc": "2926:25:37", "nodeType": "YulAssignment", "src": "2926:25:37", "value": { "arguments": [ { "name": "prod0", "nativeSrc": "2939:5:37", "nodeType": "YulIdentifier", "src": "2939:5:37" }, { "name": "twos", "nativeSrc": "2946:4:37", "nodeType": "YulIdentifier", "src": "2946:4:37" } ], "functionName": { "name": "div", "nativeSrc": "2935:3:37", "nodeType": "YulIdentifier", "src": "2935:3:37" }, "nativeSrc": "2935:16:37", "nodeType": "YulFunctionCall", "src": "2935:16:37" }, "variableNames": [ { "name": "prod0", "nativeSrc": "2926:5:37", "nodeType": "YulIdentifier", "src": "2926:5:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "2926:5:37", "valueSize": 1 }, { "declaration": 44354, "isOffset": false, "isSlot": false, "src": "2939:5:37", "valueSize": 1 }, { "declaration": 44386, "isOffset": false, "isSlot": false, "src": "2946:4:37", "valueSize": 1 } ], "id": 44399, "nodeType": "InlineAssembly", "src": "2903:58:37" }, { "AST": { "nativeSrc": "3149:63:37", "nodeType": "YulBlock", "src": "3149:63:37", "statements": [ { "nativeSrc": "3163:39:37", "nodeType": "YulAssignment", "src": "3163:39:37", "value": { "arguments": [ { "arguments": [ { "arguments": [ { "kind": "number", "nativeSrc": "3183:1:37", "nodeType": "YulLiteral", "src": "3183:1:37", "type": "", "value": "0" }, { "name": "twos", "nativeSrc": "3186:4:37", "nodeType": "YulIdentifier", "src": "3186:4:37" } ], "functionName": { "name": "sub", "nativeSrc": "3179:3:37", "nodeType": "YulIdentifier", "src": "3179:3:37" }, "nativeSrc": "3179:12:37", "nodeType": "YulFunctionCall", "src": "3179:12:37" }, { "name": "twos", "nativeSrc": "3193:4:37", "nodeType": "YulIdentifier", "src": "3193:4:37" } ], "functionName": { "name": "div", "nativeSrc": "3175:3:37", "nodeType": "YulIdentifier", "src": "3175:3:37" }, "nativeSrc": "3175:23:37", "nodeType": "YulFunctionCall", "src": "3175:23:37" }, { "kind": "number", "nativeSrc": "3200:1:37", "nodeType": "YulLiteral", "src": "3200:1:37", "type": "", "value": "1" } ], "functionName": { "name": "add", "nativeSrc": "3171:3:37", "nodeType": "YulIdentifier", "src": "3171:3:37" }, "nativeSrc": "3171:31:37", "nodeType": "YulFunctionCall", "src": "3171:31:37" }, "variableNames": [ { "name": "twos", "nativeSrc": "3163:4:37", "nodeType": "YulIdentifier", "src": "3163:4:37" } ] } ] }, "evmVersion": "paris", "externalReferences": [ { "declaration": 44386, "isOffset": false, "isSlot": false, "src": "3163:4:37", "valueSize": 1 }, { "declaration": 44386, "isOffset": false, "isSlot": false, "src": "3186:4:37", "valueSize": 1 }, { "declaration": 44386, "isOffset": false, "isSlot": false, "src": "3193:4:37", "valueSize": 1 } ], "id": 44400, "nodeType": "InlineAssembly", "src": "3140:72:37" }, { "expression": { "id": 44405, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44401, "name": "prod0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44354, "src": "3221:5:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "|=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44404, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44402, "name": "prod1", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44357, "src": "3230:5:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44403, "name": "twos", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44386, "src": "3238:4:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3230:12:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3221:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44406, "nodeType": "ExpressionStatement", "src": "3221:21:37" }, { "assignments": [ 44408 ], "declarations": [ { "constant": false, "id": 44408, "mutability": "mutable", "name": "inv", "nameLocation": "3584:3:37", "nodeType": "VariableDeclaration", "scope": 44472, "src": "3576:11:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44407, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "3576:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "id": 44415, "initialValue": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "components": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44411, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "33", "id": 44409, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3591:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_3_by_1", "typeString": "int_const 3" }, "value": "3" }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44410, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "3595:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3591:15:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 44412, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "3590:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "^", "rightExpression": { "hexValue": "32", "id": 44413, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3610:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "3590:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "3576:35:37" }, { "expression": { "id": 44422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44416, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3826:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44421, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44417, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3833:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44420, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44418, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "3837:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44419, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3851:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3837:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3833:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3826:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44423, "nodeType": "ExpressionStatement", "src": "3826:28:37" }, { "expression": { "id": 44430, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44424, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3884:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44429, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44425, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3891:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44428, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44426, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "3895:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44427, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3909:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3895:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3891:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3884:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44431, "nodeType": "ExpressionStatement", "src": "3884:28:37" }, { "expression": { "id": 44438, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44432, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3943:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44437, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44433, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "3950:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44436, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44434, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "3954:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44435, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "3968:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3954:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3950:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "3943:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44439, "nodeType": "ExpressionStatement", "src": "3943:28:37" }, { "expression": { "id": 44446, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44440, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4002:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44441, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4009:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44444, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44442, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "4013:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44443, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4027:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4013:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4009:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4002:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44447, "nodeType": "ExpressionStatement", "src": "4002:28:37" }, { "expression": { "id": 44454, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44448, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4061:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44453, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44449, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4068:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44452, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44450, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "4072:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44451, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4086:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4072:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4068:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4061:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44455, "nodeType": "ExpressionStatement", "src": "4061:28:37" }, { "expression": { "id": 44462, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44456, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4121:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "*=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "hexValue": "32", "id": 44457, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "4128:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "-", "rightExpression": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44460, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44458, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44348, "src": "4132:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44459, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4146:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4132:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4128:21:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4121:28:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44463, "nodeType": "ExpressionStatement", "src": "4121:28:37" }, { "expression": { "id": 44468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44464, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44351, "src": "4587:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44467, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44465, "name": "prod0", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44354, "src": "4596:5:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "id": 44466, "name": "inv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44408, "src": "4604:3:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4596:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "4587:20:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44469, "nodeType": "ExpressionStatement", "src": "4587:20:37" }, { "expression": { "id": 44470, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44351, "src": "4624:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 44352, "id": 44471, "nodeType": "Return", "src": "4617:13:37" } ] } ] }, "documentation": { "id": 44342, "nodeType": "StructuredDocumentation", "src": "378:359:37", "text": "@notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n @param a The multiplicand\n @param b The multiplier\n @param denominator The divisor\n @return result The 256-bit result\n @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv" }, "implemented": true, "kind": "function", "modifiers": [], "name": "mulDiv", "nameLocation": "843:6:37", "parameters": { "id": 44349, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44344, "mutability": "mutable", "name": "a", "nameLocation": "867:1:37", "nodeType": "VariableDeclaration", "scope": 44474, "src": "859:9:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44343, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "859:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 44346, "mutability": "mutable", "name": "b", "nameLocation": "886:1:37", "nodeType": "VariableDeclaration", "scope": 44474, "src": "878:9:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44345, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "878:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 44348, "mutability": "mutable", "name": "denominator", "nameLocation": "905:11:37", "nodeType": "VariableDeclaration", "scope": 44474, "src": "897:19:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44347, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "897:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "849:73:37" }, "returnParameters": { "id": 44352, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44351, "mutability": "mutable", "name": "result", "nameLocation": "954:6:37", "nodeType": "VariableDeclaration", "scope": 44474, "src": "946:14:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44350, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "946:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "945:16:37" }, "scope": 44519, "stateMutability": "pure", "virtual": false, "visibility": "internal" }, { "id": 44518, "nodeType": "FunctionDefinition", "src": "4920:326:37", "nodes": [], "body": { "id": 44517, "nodeType": "Block", "src": "5058:188:37", "nodes": [], "statements": [ { "id": 44516, "nodeType": "UncheckedBlock", "src": "5059:186:37", "statements": [ { "expression": { "id": 44492, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "id": 44486, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44484, "src": "5078:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "arguments": [ { "id": 44488, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44477, "src": "5094:1:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 44489, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44479, "src": "5097:1:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 44490, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44481, "src": "5100:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 44487, "name": "mulDiv", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44474, "src": "5087:6:37", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 44491, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5087:25:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5078:34:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44493, "nodeType": "ExpressionStatement", "src": "5078:34:37" }, { "condition": { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44500, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "arguments": [ { "id": 44495, "name": "a", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44477, "src": "5133:1:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 44496, "name": "b", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44479, "src": "5136:1:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "id": 44497, "name": "denominator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44481, "src": "5139:11:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 44494, "name": "mulmod", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -16, "src": "5126:6:37", "typeDescriptions": { "typeIdentifier": "t_function_mulmod_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256,uint256) pure returns (uint256)" } }, "id": 44498, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5126:25:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "hexValue": "30", "id": 44499, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "5154:1:37", "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "5126:29:37", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 44515, "nodeType": "IfStatement", "src": "5122:117:37", "trueBody": { "id": 44514, "nodeType": "Block", "src": "5157:82:37", "statements": [ { "expression": { "arguments": [ { "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 44508, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "id": 44502, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44484, "src": "5179:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "expression": { "arguments": [ { "id": 44505, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "5193:7:37", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": { "id": 44504, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5193:7:37", "typeDescriptions": {} } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" } ], "id": 44503, "name": "type", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -27, "src": "5188:4:37", "typeDescriptions": { "typeIdentifier": "t_function_metatype_pure$__$returns$__$", "typeString": "function () pure" } }, "id": 44506, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5188:13:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_magic_meta_type_t_uint256", "typeString": "type(uint256)" } }, "id": 44507, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberLocation": "5202:3:37", "memberName": "max", "nodeType": "MemberAccess", "src": "5188:17:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "5179:26:37", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 44501, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "5171:7:37", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 44509, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "nameLocations": [], "names": [], "nodeType": "FunctionCall", "src": "5171:35:37", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 44510, "nodeType": "ExpressionStatement", "src": "5171:35:37" }, { "expression": { "id": 44512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "5220:8:37", "subExpression": { "id": 44511, "name": "result", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44484, "src": "5220:6:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 44513, "nodeType": "ExpressionStatement", "src": "5220:8:37" } ] } } ] } ] }, "documentation": { "id": 44475, "nodeType": "StructuredDocumentation", "src": "4644:271:37", "text": "@notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n @param a The multiplicand\n @param b The multiplier\n @param denominator The divisor\n @return result The 256-bit result" }, "implemented": true, "kind": "function", "modifiers": [], "name": "mulDivRoundingUp", "nameLocation": "4929:16:37", "parameters": { "id": 44482, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44477, "mutability": "mutable", "name": "a", "nameLocation": "4963:1:37", "nodeType": "VariableDeclaration", "scope": 44518, "src": "4955:9:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44476, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4955:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 44479, "mutability": "mutable", "name": "b", "nameLocation": "4982:1:37", "nodeType": "VariableDeclaration", "scope": 44518, "src": "4974:9:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44478, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4974:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" }, { "constant": false, "id": 44481, "mutability": "mutable", "name": "denominator", "nameLocation": "5001:11:37", "nodeType": "VariableDeclaration", "scope": 44518, "src": "4993:19:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44480, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "4993:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "4945:73:37" }, "returnParameters": { "id": 44485, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 44484, "mutability": "mutable", "name": "result", "nameLocation": "5050:6:37", "nodeType": "VariableDeclaration", "scope": 44518, "src": "5042:14:37", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 44483, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "5042:7:37", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "5041:16:37" }, "scope": 44519, "stateMutability": "pure", "virtual": false, "visibility": "internal" } ], "abstract": false, "baseContracts": [], "canonicalName": "FullMath", "contractDependencies": [], "contractKind": "library", "documentation": { "id": 44341, "nodeType": "StructuredDocumentation", "src": "58:297:37", "text": "@title Contains 512-bit math functions\n @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\n @dev Handles \"phantom overflow\" i.e., allows multiplication and division where an intermediate value overflows 256 bits" }, "fullyImplemented": true, "linearizedBaseContracts": [ 44519 ], "name": "FullMath", "nameLocation": "363:8:37", "scope": 44520, "usedErrors": [], "usedEvents": [] } ], "license": "MIT" }, "id": 37 }