creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/common/BLS.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\n/* MIT License\n\nCopyright (c) 2021 Hubble-Project (natspec added by Polygon Technology)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n*/\n\npragma solidity 0.8.19;\n\nimport \"../interfaces/common/IBLS.sol\";\nimport {ModexpInverse, ModexpSqrt} from \"../lib/ModExp.sol\";\n\n/**\n    @title  Boneh–Lynn–Shacham (BLS) signature scheme on Barreto-Naehrig 254 bit curve (BN-254)\n    @notice BLS signature aggregation reduces the size of signature data to store on-chain\n    @dev points on G1 are used for signatures and messages, and on G2 for public keys\n */\ncontract BLS is IBLS {\n    // Field order\n    // prettier-ignore\n    uint256 private constant N = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n\n    // Negated generator of G2\n    // prettier-ignore\n    uint256 private constant N_G2_X1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634;\n    // prettier-ignore\n    uint256 private constant N_G2_X0 = 10857046999023057135944570762232829481370756359578518086990519993285655852781;\n    // prettier-ignore\n    uint256 private constant N_G2_Y1 = 17805874995975841540914202342111839520379459829704422454583296818431106115052;\n    // prettier-ignore\n    uint256 private constant N_G2_Y0 = 13392588948715843804641432497768002650278120570034223513918757245338268106653;\n\n    // sqrt(-3)\n    // prettier-ignore\n    uint256 private constant Z0 = 0x0000000000000000b3c4d79d41a91759a9e4c7e359b6b89eaec68e62effffffd;\n    // (sqrt(-3) - 1)  / 2\n    // prettier-ignore\n    uint256 private constant Z1 = 0x000000000000000059e26bcea0d48bacd4f263f1acdb5c4f5763473177fffffe;\n\n    // prettier-ignore\n    uint256 private constant T24 = 0x1000000000000000000000000000000000000000000000000;\n    // prettier-ignore\n    uint256 private constant MASK24 = 0xffffffffffffffffffffffffffffffffffffffffffffffff;\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function verifySingle(\n        uint256[2] calldata signature,\n        uint256[4] calldata pubkey,\n        uint256[2] calldata message\n    ) external view returns (bool, bool) {\n        uint256[12] memory input = [\n            signature[0],\n            signature[1],\n            N_G2_X1,\n            N_G2_X0,\n            N_G2_Y1,\n            N_G2_Y0,\n            message[0],\n            message[1],\n            pubkey[1],\n            pubkey[0],\n            pubkey[3],\n            pubkey[2]\n        ];\n        uint256[1] memory out;\n\n        bool callSuccess;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            callSuccess := staticcall(gas(), 8, input, 384, out, 0x20)\n        }\n        if (!callSuccess) {\n            return (false, false);\n        }\n        return (out[0] != 0, true);\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function verifyMultiple(\n        uint256[2] calldata signature,\n        uint256[4][] calldata pubkeys,\n        uint256[2][] calldata messages\n    ) external view returns (bool checkResult, bool callSuccess) {\n        uint256 size = pubkeys.length;\n        // solhint-disable-next-line reason-string\n        require(size > 0, \"BLS: number of public key is zero\");\n        // solhint-disable-next-line reason-string\n        require(size == messages.length, \"BLS: number of public keys and messages must be equal\");\n        uint256 inputSize = (size + 1) * 6;\n        uint256[] memory input = new uint256[](inputSize);\n        input[0] = signature[0];\n        input[1] = signature[1];\n        input[2] = N_G2_X1;\n        input[3] = N_G2_X0;\n        input[4] = N_G2_Y1;\n        input[5] = N_G2_Y0;\n        for (uint256 i = 0; i < size; i++) {\n            input[i * 6 + 6] = messages[i][0];\n            input[i * 6 + 7] = messages[i][1];\n            input[i * 6 + 8] = pubkeys[i][1];\n            input[i * 6 + 9] = pubkeys[i][0];\n            input[i * 6 + 10] = pubkeys[i][3];\n            input[i * 6 + 11] = pubkeys[i][2];\n        }\n        uint256[1] memory out;\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            callSuccess := staticcall(gas(), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\n        }\n        if (!callSuccess) {\n            return (false, false);\n        }\n        return (out[0] != 0, true);\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function verifyMultipleSameMsg(\n        uint256[2] calldata signature,\n        uint256[4][] calldata pubkeys,\n        uint256[2] calldata message\n    ) external view returns (bool checkResult, bool callSuccess) {\n        uint256 size = pubkeys.length;\n        // solhint-disable-next-line reason-string\n        require(size > 0, \"BLS: number of public key is zero\");\n        uint256 inputSize = (size + 1) * 6;\n        uint256[] memory input = new uint256[](inputSize);\n        input[0] = signature[0];\n        input[1] = signature[1];\n        input[2] = N_G2_X1;\n        input[3] = N_G2_X0;\n        input[4] = N_G2_Y1;\n        input[5] = N_G2_Y0;\n        for (uint256 i = 0; i < size; i++) {\n            input[i * 6 + 6] = message[0];\n            input[i * 6 + 7] = message[1];\n            input[i * 6 + 8] = pubkeys[i][1];\n            input[i * 6 + 9] = pubkeys[i][0];\n            input[i * 6 + 10] = pubkeys[i][3];\n            input[i * 6 + 11] = pubkeys[i][2];\n        }\n        uint256[1] memory out;\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            callSuccess := staticcall(gas(), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\n        }\n        if (!callSuccess) {\n            return (false, false);\n        }\n        return (out[0] != 0, true);\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function hashToPoint(bytes32 domain, bytes memory message) external view returns (uint256[2] memory) {\n        uint256[2] memory u = this.hashToField(domain, message);\n        uint256[2] memory p0 = this.mapToPoint(u[0]);\n        uint256[2] memory p1 = this.mapToPoint(u[1]);\n        uint256[4] memory bnAddInput;\n        bnAddInput[0] = p0[0];\n        bnAddInput[1] = p0[1];\n        bnAddInput[2] = p1[0];\n        bnAddInput[3] = p1[1];\n        bool success;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            success := staticcall(sub(gas(), 2000), 6, bnAddInput, 128, p0, 64)\n            switch success\n            case 0 {\n                invalid()\n            }\n        }\n        require(success, \"BLS: bn add call failed\");\n        return p0;\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function mapToPoint(uint256 _x) external pure returns (uint256[2] memory p) {\n        // solhint-disable-next-line reason-string\n        require(_x < N, \"mapToPointFT: invalid field element\");\n        uint256 x = _x;\n\n        (, bool decision) = sqrt(x);\n\n        uint256 a0 = mulmod(x, x, N);\n        a0 = addmod(a0, 4, N);\n        uint256 a1 = mulmod(x, Z0, N);\n        uint256 a2 = mulmod(a1, a0, N);\n        a2 = inverse(a2);\n        a1 = mulmod(a1, a1, N);\n        a1 = mulmod(a1, a2, N);\n\n        // x1\n        a1 = mulmod(x, a1, N);\n        x = addmod(Z1, N - a1, N);\n        // check curve\n        a1 = mulmod(x, x, N);\n        a1 = mulmod(a1, x, N);\n        a1 = addmod(a1, 3, N);\n        bool found;\n        (a1, found) = sqrt(a1);\n        if (found) {\n            if (!decision) {\n                a1 = N - a1;\n            }\n            return [x, a1];\n        }\n\n        // x2\n        x = N - addmod(x, 1, N);\n        // check curve\n        a1 = mulmod(x, x, N);\n        a1 = mulmod(a1, x, N);\n        a1 = addmod(a1, 3, N);\n        (a1, found) = sqrt(a1);\n        if (found) {\n            if (!decision) {\n                a1 = N - a1;\n            }\n            return [x, a1];\n        }\n\n        // x3\n        x = mulmod(a0, a0, N);\n        x = mulmod(x, x, N);\n        x = mulmod(x, a2, N);\n        x = mulmod(x, a2, N);\n        x = addmod(x, 1, N);\n        // must be on curve\n        a1 = mulmod(x, x, N);\n        a1 = mulmod(a1, x, N);\n        a1 = addmod(a1, 3, N);\n        (a1, found) = sqrt(a1);\n        // solhint-disable-next-line reason-string\n        require(found, \"BLS: bad ft mapping implementation\");\n        if (!decision) {\n            a1 = N - a1;\n        }\n        return [x, a1];\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function isValidSignature(uint256[2] memory signature) external view returns (bool) {\n        if ((signature[0] >= N) || (signature[1] >= N)) {\n            return false;\n        } else {\n            return this.isOnCurveG1(signature);\n        }\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function isOnCurveG1(uint256[2] memory point) external pure returns (bool _isOnCurve) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let t0 := mload(point)\n            let t1 := mload(add(point, 32))\n            let t2 := mulmod(t0, t0, N)\n            t2 := mulmod(t2, t0, N)\n            t2 := addmod(t2, 3, N)\n            t1 := mulmod(t1, t1, N)\n            _isOnCurve := eq(t1, t2)\n        }\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function isOnCurveG2(uint256[4] memory point) external pure returns (bool _isOnCurve) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            // x0, x1\n            let t0 := mload(point)\n            let t1 := mload(add(point, 32))\n            // x0 ^ 2\n            let t2 := mulmod(t0, t0, N)\n            // x1 ^ 2\n            let t3 := mulmod(t1, t1, N)\n            // 3 * x0 ^ 2\n            let t4 := add(add(t2, t2), t2)\n            // 3 * x1 ^ 2\n            let t5 := addmod(add(t3, t3), t3, N)\n            // x0 * (x0 ^ 2 - 3 * x1 ^ 2)\n            t2 := mulmod(add(t2, sub(N, t5)), t0, N)\n            // x1 * (3 * x0 ^ 2 - x1 ^ 2)\n            t3 := mulmod(add(t4, sub(N, t3)), t1, N)\n\n            // x ^ 3 + b\n            t0 := addmod(t2, 0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5, N)\n            t1 := addmod(t3, 0x009713b03af0fed4cd2cafadeed8fdf4a74fa084e52d1852e4a2bd0685c315d2, N)\n\n            // y0, y1\n            t2 := mload(add(point, 64))\n            t3 := mload(add(point, 96))\n            // y ^ 2\n            t4 := mulmod(addmod(t2, t3, N), addmod(t2, sub(N, t3), N), N)\n            t3 := mulmod(shl(1, t2), t3, N)\n\n            // y ^ 2 == x ^ 3 + b\n            _isOnCurve := and(eq(t0, t4), eq(t1, t3))\n        }\n    }\n\n    /**\n     * @notice returns square root of a uint256 value\n     * @param xx the value to take the square root of\n     * @return x the uint256 value of the root\n     * @return hasRoot a bool indicating if there is a square root\n     */\n    function sqrt(uint256 xx) internal pure returns (uint256 x, bool hasRoot) {\n        x = ModexpSqrt.run(xx);\n        hasRoot = mulmod(x, x, N) == xx;\n    }\n\n    /**\n     * @notice inverts a uint256 value\n     * @param a uint256 value to invert\n     * @return uint256 of the value of the inverse\n     */\n    function inverse(uint256 a) internal pure returns (uint256) {\n        return ModexpInverse.run(a);\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function hashToField(bytes32 domain, bytes memory messages) external view returns (uint256[2] memory) {\n        bytes memory _msg = this.expandMsgTo96(domain, messages);\n        uint256 u0;\n        uint256 u1;\n        uint256 a0;\n        uint256 a1;\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let p := add(_msg, 24)\n            u1 := and(mload(p), MASK24)\n            p := add(_msg, 48)\n            u0 := and(mload(p), MASK24)\n            a0 := addmod(mulmod(u1, T24, N), u0, N)\n            p := add(_msg, 72)\n            u1 := and(mload(p), MASK24)\n            p := add(_msg, 96)\n            u0 := and(mload(p), MASK24)\n            a1 := addmod(mulmod(u1, T24, N), u0, N)\n        }\n        return [a0, a1];\n    }\n\n    /**\n     * @inheritdoc IBLS\n     */\n    function expandMsgTo96(bytes32 domain, bytes memory message) external pure returns (bytes memory) {\n        // zero<64>|msg<var>|lib_str<2>|I2OSP(0, 1)<1>|dst<var>|dst_len<1>\n        uint256 t0 = message.length;\n        bytes memory msg0 = new bytes(32 + t0 + 64 + 4);\n        bytes memory out = new bytes(96);\n        // b0\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let p := add(msg0, 96)\n            for {\n                let z := 0\n            } lt(z, t0) {\n                z := add(z, 32)\n            } {\n                mstore(add(p, z), mload(add(message, add(z, 32))))\n            }\n            p := add(p, t0)\n\n            mstore8(p, 0)\n            p := add(p, 1)\n            mstore8(p, 96)\n            p := add(p, 1)\n            mstore8(p, 0)\n            p := add(p, 1)\n\n            mstore(p, domain)\n            p := add(p, 32)\n            mstore8(p, 32)\n        }\n        bytes32 b0 = sha256(msg0);\n        bytes32 bi;\n        t0 = 32 + 34;\n\n        // resize intermediate message\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(msg0, t0)\n        }\n\n        // b1\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(msg0, 32), b0)\n            mstore8(add(msg0, 64), 1)\n            mstore(add(msg0, 65), domain)\n            mstore8(add(msg0, add(32, 65)), 32)\n        }\n\n        bi = sha256(msg0);\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(out, 32), bi)\n        }\n\n        // b2\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let t := xor(b0, bi)\n            mstore(add(msg0, 32), t)\n            mstore8(add(msg0, 64), 2)\n            mstore(add(msg0, 65), domain)\n            mstore8(add(msg0, add(32, 65)), 32)\n        }\n\n        bi = sha256(msg0);\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(out, 64), bi)\n        }\n\n        // b3\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let t := xor(b0, bi)\n            mstore(add(msg0, 32), t)\n            mstore8(add(msg0, 64), 3)\n            mstore(add(msg0, 65), domain)\n            mstore8(add(msg0, add(32, 65)), 32)\n        }\n\n        bi = sha256(msg0);\n\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            mstore(add(out, 96), bi)\n        }\n\n        return out;\n    }\n}\n"
      },
      "contracts/interfaces/common/IBLS.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IBLS {\n    /**\n     * @notice verifies a single signature\n     * @param signature 64-byte G1 group element (small sig)\n     * @param pubkey 128-byte G2 group element (big pubkey)\n     * @param message message signed to produce signature\n     * @return bool sig verification\n     * @return bool indicating call success\n     */\n    function verifySingle(\n        uint256[2] calldata signature,\n        uint256[4] calldata pubkey,\n        uint256[2] calldata message\n    ) external view returns (bool, bool);\n\n    /**\n     * @notice verifies multiple non-aggregated signatures where each message is unique\n     * @param signature 64-byte G1 group element (small sig)\n     * @param pubkeys array of 128-byte G2 group element (big pubkey)\n     * @param messages array of messages signed to produce signature\n     * @return checkResult bool indicating sig verification\n     * @return callSuccess bool indicating call success\n     */\n    function verifyMultiple(\n        uint256[2] calldata signature,\n        uint256[4][] calldata pubkeys,\n        uint256[2][] calldata messages\n    ) external view returns (bool checkResult, bool callSuccess);\n\n    /**\n     * @notice verifies an aggregated signature where the same message is signed\n     * @param signature 64-byte G1 group element (small sig)\n     * @param pubkeys array of 128-byte G2 group element (big pubkey)\n     * @param message message signed by all to produce signature\n     * @return checkResult sig verification\n     * @return callSuccess indicating call success\n     */\n    function verifyMultipleSameMsg(\n        uint256[2] calldata signature,\n        uint256[4][] calldata pubkeys,\n        uint256[2] calldata message\n    ) external view returns (bool checkResult, bool callSuccess);\n\n    /**\n     * @notice maps a field element to the curve\n     * @param _x a valid field element\n     * @return p the point on the curve the point is mapped to\n     */\n    function mapToPoint(uint256 _x) external pure returns (uint256[2] memory p);\n\n    /**\n     * @notice checks if a signature is formatted correctly and valid\n     * @dev will revert if improperly formatted, will return false if invalid\n     * @param signature the BLS signature\n     * @return bool indicating if the signature is valid or not\n     */\n    function isValidSignature(uint256[2] memory signature) external view returns (bool);\n\n    /**\n     * @notice checks if point in the finite field Fq (x,y) is on the G1 curve\n     * @param point array with x and y values of the point\n     * @return _isOnCurve bool indicating if the point is on the curve or not\n     */\n    function isOnCurveG1(uint256[2] memory point) external pure returns (bool _isOnCurve);\n\n    /**\n     * @notice checks if point in the finite field Fq (x,y) is on the G2 curve\n     * @param point array with x and y values of the point\n     * @return _isOnCurve bool indicating if the point is on the curve or not\n     */\n    function isOnCurveG2(uint256[4] memory point) external pure returns (bool _isOnCurve);\n\n    /**\n     * @notice hashes an arbitrary message to a point on the curve\n     * @dev Fouque-Tibouchi Hash to Curve\n     * @param domain domain separator for the hash\n     * @param message the message to map\n     * @return uint256[2] (x,y) point on the curve that the message maps to\n     */\n    function hashToPoint(bytes32 domain, bytes memory message) external view returns (uint256[2] memory);\n\n    /**\n     * @notice hashes an arbitrary message to a field element\n     * @param domain domain separator for the hash\n     * @param messages the messages to map\n     * @return uint256[2] (x,y) point of the field element that the message maps to\n     */\n    function hashToField(bytes32 domain, bytes memory messages) external view returns (uint256[2] memory);\n\n    /**\n     * @notice pads messages less than 96 bytes to 96 bytes for hashing\n     * @param domain domain separator for the hash\n     * @param message the message to pad\n     * @return bytes the padded message\n     */\n    function expandMsgTo96(bytes32 domain, bytes memory message) external pure returns (bytes memory);\n}\n"
      },
      "contracts/lib/ModExp.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\n/* MIT License\n\nCopyright (c) 2021 Hubble-Project\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n*/\n\npragma solidity 0.8.19;\n\n/**\n    @title Compute Inverse by Modular Exponentiation\n    @notice Compute $input^(N - 2) mod N$ using Addition Chain method.\n    Where     N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47\n    and   N - 2 = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd45\n    @dev the function body is generated with the modified addchain script\n    see https://github.com/kobigurk/addchain/commit/2c37a2ace567a9bdc680b4e929c94aaaa3ec700f\n */\nlibrary ModexpInverse {\n    /**\n     * @notice computes inverse\n     * @dev computes $input^(N - 2) mod N$ using Addition Chain method.\n     * @param t2 the number to get the inverse of (uint256)\n     * @return t0 the inverse (uint256)\n     */\n    function run(uint256 t2) internal pure returns (uint256 t0) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let n := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47\n            t0 := mulmod(t2, t2, n)\n            let t5 := mulmod(t0, t2, n)\n            let t1 := mulmod(t5, t0, n)\n            let t3 := mulmod(t5, t5, n)\n            let t8 := mulmod(t1, t0, n)\n            let t4 := mulmod(t3, t5, n)\n            let t6 := mulmod(t3, t1, n)\n            t0 := mulmod(t3, t3, n)\n            let t7 := mulmod(t8, t3, n)\n            t3 := mulmod(t4, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n        }\n    }\n}\n\n/**\n    @title Compute Square Root by Modular Exponentiation\n    @notice Compute $input^{(N + 1) / 4} mod N$ using Addition Chain method.\n    Where           N = 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47\n    and   (N + 1) / 4 = 0xc19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52\n */\nlibrary ModexpSqrt {\n    /**\n     * @notice computes square root by modular exponentiation\n     * @dev Compute $input^{(N + 1) / 4} mod N$ using Addition Chain method\n     * @param t6 the number to derive the square root of\n     * @return t0 the square root\n     */\n    function run(uint256 t6) internal pure returns (uint256 t0) {\n        // solhint-disable-next-line no-inline-assembly\n        assembly {\n            let n := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47\n\n            t0 := mulmod(t6, t6, n)\n            let t4 := mulmod(t0, t6, n)\n            let t2 := mulmod(t4, t0, n)\n            let t3 := mulmod(t4, t4, n)\n            let t8 := mulmod(t2, t0, n)\n            let t1 := mulmod(t3, t4, n)\n            let t5 := mulmod(t3, t2, n)\n            t0 := mulmod(t3, t3, n)\n            let t7 := mulmod(t8, t3, n)\n            t3 := mulmod(t1, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t8, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t7, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t6, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t5, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t4, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t3, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t2, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t0, n)\n            t0 := mulmod(t0, t1, n)\n            t0 := mulmod(t0, t0, n)\n        }\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 115
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}