diff --git a/contracts/scripts/deploy.ts b/contracts/scripts/deploy.ts index 4425c4dc..5329c0d3 100644 --- a/contracts/scripts/deploy.ts +++ b/contracts/scripts/deploy.ts @@ -10,18 +10,12 @@ type Deployments = { }; async function main() { - const solvencyVerifier = await ethers.deployContract( - "src/SolvencyVerifier.sol:Verifier" - ); - await solvencyVerifier.deployed(); - const inclusionVerifier = await ethers.deployContract( "src/InclusionVerifier.sol:Verifier" ); await inclusionVerifier.deployed(); const summa = await ethers.deployContract("Summa", [ - solvencyVerifier.address, inclusionVerifier.address, ]); @@ -61,7 +55,6 @@ async function main() { //Copy the ABIs from `artifacts/src/*` to `backend/src/contracts/*` copyAbi(fs, "Summa", "Summa"); - copyAbi(fs, "SolvencyVerifier", "Verifier"); copyAbi(fs, "InclusionVerifier", "Verifier"); } diff --git a/contracts/src/SolvencyVerifier.sol b/contracts/src/SolvencyVerifier.sol deleted file mode 100644 index d1e940a9..00000000 --- a/contracts/src/SolvencyVerifier.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - pragma solidity ^0.8.17; - - contract Verifier { - function verify( - uint256[] memory pubInputs, - bytes memory proof - ) public view returns (bool) { - bool success = true; - bytes32[846] memory transcript; - assembly { let f_p := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47 let f_q := 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 function validate_ec_point(x, y) -> valid { { let x_lt_p := lt(x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) let y_lt_p := lt(y, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) valid := and(x_lt_p, y_lt_p) } { let y_square := mulmod(y, y, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) let x_square := mulmod(x, x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) let x_cube := mulmod(x_square, x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) let x_cube_plus_3 := addmod(x_cube, 3, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) let is_affine := eq(x_cube_plus_3, y_square) valid := and(valid, is_affine) } } mstore(add(transcript, 0x20), mod(mload(add(pubInputs, 0x20)), f_q))mstore(add(transcript, 0x40), mod(mload(add(pubInputs, 0x40)), f_q))mstore(add(transcript, 0x60), mod(mload(add(pubInputs, 0x60)), f_q))mstore(add(transcript, 0x0), 308492134225063399814226381520525808113815168934209933683689315739401114858) { let x := mload(add(proof, 0x20)) mstore(add(transcript, 0x80), x) let y := mload(add(proof, 0x40)) mstore(add(transcript, 0xa0), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x60)) mstore(add(transcript, 0xc0), x) let y := mload(add(proof, 0x80)) mstore(add(transcript, 0xe0), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0xa0)) mstore(add(transcript, 0x100), x) let y := mload(add(proof, 0xc0)) mstore(add(transcript, 0x120), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0x140), keccak256(add(transcript, 0x0), 320)){ let hash := mload(add(transcript, 0x140)) mstore(add(transcript, 0x160), mod(hash, f_q)) mstore(add(transcript, 0x180), hash) } { let x := mload(add(proof, 0xe0)) mstore(add(transcript, 0x1a0), x) let y := mload(add(proof, 0x100)) mstore(add(transcript, 0x1c0), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x120)) mstore(add(transcript, 0x1e0), x) let y := mload(add(proof, 0x140)) mstore(add(transcript, 0x200), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0x220), keccak256(add(transcript, 0x180), 160)){ let hash := mload(add(transcript, 0x220)) mstore(add(transcript, 0x240), mod(hash, f_q)) mstore(add(transcript, 0x260), hash) }mstore8(add(transcript, 0x280), 1)mstore(add(transcript, 0x280), keccak256(add(transcript, 0x260), 33)){ let hash := mload(add(transcript, 0x280)) mstore(add(transcript, 0x2a0), mod(hash, f_q)) mstore(add(transcript, 0x2c0), hash) } { let x := mload(add(proof, 0x160)) mstore(add(transcript, 0x2e0), x) let y := mload(add(proof, 0x180)) mstore(add(transcript, 0x300), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x1a0)) mstore(add(transcript, 0x320), x) let y := mload(add(proof, 0x1c0)) mstore(add(transcript, 0x340), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x1e0)) mstore(add(transcript, 0x360), x) let y := mload(add(proof, 0x200)) mstore(add(transcript, 0x380), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x220)) mstore(add(transcript, 0x3a0), x) let y := mload(add(proof, 0x240)) mstore(add(transcript, 0x3c0), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0x3e0), keccak256(add(transcript, 0x2c0), 288)){ let hash := mload(add(transcript, 0x3e0)) mstore(add(transcript, 0x400), mod(hash, f_q)) mstore(add(transcript, 0x420), hash) } { let x := mload(add(proof, 0x260)) mstore(add(transcript, 0x440), x) let y := mload(add(proof, 0x280)) mstore(add(transcript, 0x460), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x2a0)) mstore(add(transcript, 0x480), x) let y := mload(add(proof, 0x2c0)) mstore(add(transcript, 0x4a0), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x2e0)) mstore(add(transcript, 0x4c0), x) let y := mload(add(proof, 0x300)) mstore(add(transcript, 0x4e0), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x320)) mstore(add(transcript, 0x500), x) let y := mload(add(proof, 0x340)) mstore(add(transcript, 0x520), y) success := and(validate_ec_point(x, y), success) } { let x := mload(add(proof, 0x360)) mstore(add(transcript, 0x540), x) let y := mload(add(proof, 0x380)) mstore(add(transcript, 0x560), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0x580), keccak256(add(transcript, 0x420), 352)){ let hash := mload(add(transcript, 0x580)) mstore(add(transcript, 0x5a0), mod(hash, f_q)) mstore(add(transcript, 0x5c0), hash) }mstore(add(transcript, 0x5e0), mod(mload(add(proof, 0x3a0)), f_q))mstore(add(transcript, 0x600), mod(mload(add(proof, 0x3c0)), f_q))mstore(add(transcript, 0x620), mod(mload(add(proof, 0x3e0)), f_q))mstore(add(transcript, 0x640), mod(mload(add(proof, 0x400)), f_q))mstore(add(transcript, 0x660), mod(mload(add(proof, 0x420)), f_q))mstore(add(transcript, 0x680), mod(mload(add(proof, 0x440)), f_q))mstore(add(transcript, 0x6a0), mod(mload(add(proof, 0x460)), f_q))mstore(add(transcript, 0x6c0), mod(mload(add(proof, 0x480)), f_q))mstore(add(transcript, 0x6e0), mod(mload(add(proof, 0x4a0)), f_q))mstore(add(transcript, 0x700), mod(mload(add(proof, 0x4c0)), f_q))mstore(add(transcript, 0x720), mod(mload(add(proof, 0x4e0)), f_q))mstore(add(transcript, 0x740), mod(mload(add(proof, 0x500)), f_q))mstore(add(transcript, 0x760), mod(mload(add(proof, 0x520)), f_q))mstore(add(transcript, 0x780), mod(mload(add(proof, 0x540)), f_q))mstore(add(transcript, 0x7a0), mod(mload(add(proof, 0x560)), f_q))mstore(add(transcript, 0x7c0), mod(mload(add(proof, 0x580)), f_q))mstore(add(transcript, 0x7e0), mod(mload(add(proof, 0x5a0)), f_q))mstore(add(transcript, 0x800), mod(mload(add(proof, 0x5c0)), f_q))mstore(add(transcript, 0x820), mod(mload(add(proof, 0x5e0)), f_q))mstore(add(transcript, 0x840), mod(mload(add(proof, 0x600)), f_q))mstore(add(transcript, 0x860), mod(mload(add(proof, 0x620)), f_q))mstore(add(transcript, 0x880), mod(mload(add(proof, 0x640)), f_q))mstore(add(transcript, 0x8a0), mod(mload(add(proof, 0x660)), f_q))mstore(add(transcript, 0x8c0), mod(mload(add(proof, 0x680)), f_q))mstore(add(transcript, 0x8e0), mod(mload(add(proof, 0x6a0)), f_q))mstore(add(transcript, 0x900), mod(mload(add(proof, 0x6c0)), f_q))mstore(add(transcript, 0x920), mod(mload(add(proof, 0x6e0)), f_q))mstore(add(transcript, 0x940), mod(mload(add(proof, 0x700)), f_q))mstore(add(transcript, 0x960), mod(mload(add(proof, 0x720)), f_q))mstore(add(transcript, 0x980), mod(mload(add(proof, 0x740)), f_q))mstore(add(transcript, 0x9a0), mod(mload(add(proof, 0x760)), f_q))mstore(add(transcript, 0x9c0), mod(mload(add(proof, 0x780)), f_q))mstore(add(transcript, 0x9e0), mod(mload(add(proof, 0x7a0)), f_q))mstore(add(transcript, 0xa00), keccak256(add(transcript, 0x5c0), 1088)){ let hash := mload(add(transcript, 0xa00)) mstore(add(transcript, 0xa20), mod(hash, f_q)) mstore(add(transcript, 0xa40), hash) }mstore8(add(transcript, 0xa60), 1)mstore(add(transcript, 0xa60), keccak256(add(transcript, 0xa40), 33)){ let hash := mload(add(transcript, 0xa60)) mstore(add(transcript, 0xa80), mod(hash, f_q)) mstore(add(transcript, 0xaa0), hash) } { let x := mload(add(proof, 0x7c0)) mstore(add(transcript, 0xac0), x) let y := mload(add(proof, 0x7e0)) mstore(add(transcript, 0xae0), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0xb00), keccak256(add(transcript, 0xaa0), 96)){ let hash := mload(add(transcript, 0xb00)) mstore(add(transcript, 0xb20), mod(hash, f_q)) mstore(add(transcript, 0xb40), hash) } { let x := mload(add(proof, 0x800)) mstore(add(transcript, 0xb60), x) let y := mload(add(proof, 0x820)) mstore(add(transcript, 0xb80), y) success := and(validate_ec_point(x, y), success) }mstore(add(transcript, 0xba0), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x5a0)), f_q))mstore(add(transcript, 0xbc0), mulmod(mload(add(transcript, 0xba0)), mload(add(transcript, 0xba0)), f_q))mstore(add(transcript, 0xbe0), mulmod(mload(add(transcript, 0xbc0)), mload(add(transcript, 0xbc0)), f_q))mstore(add(transcript, 0xc00), mulmod(mload(add(transcript, 0xbe0)), mload(add(transcript, 0xbe0)), f_q))mstore(add(transcript, 0xc20), mulmod(mload(add(transcript, 0xc00)), mload(add(transcript, 0xc00)), f_q))mstore(add(transcript, 0xc40), mulmod(mload(add(transcript, 0xc20)), mload(add(transcript, 0xc20)), f_q))mstore(add(transcript, 0xc60), mulmod(mload(add(transcript, 0xc40)), mload(add(transcript, 0xc40)), f_q))mstore(add(transcript, 0xc80), mulmod(mload(add(transcript, 0xc60)), mload(add(transcript, 0xc60)), f_q))mstore(add(transcript, 0xca0), mulmod(mload(add(transcript, 0xc80)), mload(add(transcript, 0xc80)), f_q))mstore(add(transcript, 0xcc0), mulmod(mload(add(transcript, 0xca0)), mload(add(transcript, 0xca0)), f_q))mstore(add(transcript, 0xce0), addmod(mload(add(transcript, 0xcc0)), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q))mstore(add(transcript, 0xd00), mulmod(mload(add(transcript, 0xce0)), 21866867634659744680037180739646672280844703888306253060159436409049855557633, f_q))mstore(add(transcript, 0xd20), mulmod(mload(add(transcript, 0xd00)), 9936069627611189518829255670237324269287146421271524553312532036927871056678, f_q))mstore(add(transcript, 0xd40), addmod(mload(add(transcript, 0x5a0)), 11952173244228085703417150075019950819261217979144509790385672149647937438939, f_q))mstore(add(transcript, 0xd60), mulmod(mload(add(transcript, 0xd00)), 1680739780407307830605919050682431078078760076686599579086116998224280619988, f_q))mstore(add(transcript, 0xd80), addmod(mload(add(transcript, 0x5a0)), 20207503091431967391640486694574844010469604323729434764612087188351527875629, f_q))mstore(add(transcript, 0xda0), mulmod(mload(add(transcript, 0xd00)), 14158528901797138466244491986759313854666262535363044392173788062030301470987, f_q))mstore(add(transcript, 0xdc0), addmod(mload(add(transcript, 0x5a0)), 7729713970042136756001913758497961233882101865052989951524416124545507024630, f_q))mstore(add(transcript, 0xde0), mulmod(mload(add(transcript, 0xd00)), 15699029810934084314820646074566828280617789951162923449200398535581206172418, f_q))mstore(add(transcript, 0xe00), addmod(mload(add(transcript, 0x5a0)), 6189213060905190907425759670690446807930574449253110894497805650994602323199, f_q))mstore(add(transcript, 0xe20), mulmod(mload(add(transcript, 0xd00)), 4260969412351770314333984243767775737437927068151180798236715529158398853173, f_q))mstore(add(transcript, 0xe40), addmod(mload(add(transcript, 0x5a0)), 17627273459487504907912421501489499351110437332264853545461488657417409642444, f_q))mstore(add(transcript, 0xe60), mulmod(mload(add(transcript, 0xd00)), 4925592601992654644734291590386747644864797672605745962807370354577123815907, f_q))mstore(add(transcript, 0xe80), addmod(mload(add(transcript, 0x5a0)), 16962650269846620577512114154870527443683566727810288380890833831998684679710, f_q))mstore(add(transcript, 0xea0), mulmod(mload(add(transcript, 0xd00)), 1, f_q))mstore(add(transcript, 0xec0), addmod(mload(add(transcript, 0x5a0)), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q))mstore(add(transcript, 0xee0), mulmod(mload(add(transcript, 0xd00)), 19380560087801265747114831706136320509424814679569278834391540198888293317501, f_q))mstore(add(transcript, 0xf00), addmod(mload(add(transcript, 0x5a0)), 2507682784038009475131574039120954579123549720846755509306663987687515178116, f_q))mstore(add(transcript, 0xf20), mulmod(mload(add(transcript, 0xd00)), 6252951856119339508807713076978770803512896272623217303779254502899773638908, f_q))mstore(add(transcript, 0xf40), addmod(mload(add(transcript, 0x5a0)), 15635291015719935713438692668278504285035468127792817039918949683676034856709, f_q)){ let prod := mload(add(transcript, 0xd40)) prod := mulmod(mload(add(transcript, 0xd80)), prod, f_q) mstore(add(transcript, 0xf60), prod) prod := mulmod(mload(add(transcript, 0xdc0)), prod, f_q) mstore(add(transcript, 0xf80), prod) prod := mulmod(mload(add(transcript, 0xe00)), prod, f_q) mstore(add(transcript, 0xfa0), prod) prod := mulmod(mload(add(transcript, 0xe40)), prod, f_q) mstore(add(transcript, 0xfc0), prod) prod := mulmod(mload(add(transcript, 0xe80)), prod, f_q) mstore(add(transcript, 0xfe0), prod) prod := mulmod(mload(add(transcript, 0xec0)), prod, f_q) mstore(add(transcript, 0x1000), prod) prod := mulmod(mload(add(transcript, 0xf00)), prod, f_q) mstore(add(transcript, 0x1020), prod) prod := mulmod(mload(add(transcript, 0xf40)), prod, f_q) mstore(add(transcript, 0x1040), prod) prod := mulmod(mload(add(transcript, 0xce0)), prod, f_q) mstore(add(transcript, 0x1060), prod) }mstore(add(transcript, 0x10a0), 32)mstore(add(transcript, 0x10c0), 32)mstore(add(transcript, 0x10e0), 32)mstore(add(transcript, 0x1100), mload(add(transcript, 0x1060)))mstore(add(transcript, 0x1120), 21888242871839275222246405745257275088548364400416034343698204186575808495615)mstore(add(transcript, 0x1140), 21888242871839275222246405745257275088548364400416034343698204186575808495617)success := and(eq(staticcall(gas(), 0x5, add(transcript, 0x10a0), 0xc0, add(transcript, 0x1080), 0x20), 1), success){ let inv := mload(add(transcript, 0x1080)) let v v := mload(add(transcript, 0xce0)) mstore(add(transcript, 0xce0), mulmod(mload(add(transcript, 0x1040)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xf40)) mstore(add(transcript, 0xf40), mulmod(mload(add(transcript, 0x1020)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xf00)) mstore(add(transcript, 0xf00), mulmod(mload(add(transcript, 0x1000)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xec0)) mstore(add(transcript, 0xec0), mulmod(mload(add(transcript, 0xfe0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xe80)) mstore(add(transcript, 0xe80), mulmod(mload(add(transcript, 0xfc0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xe40)) mstore(add(transcript, 0xe40), mulmod(mload(add(transcript, 0xfa0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xe00)) mstore(add(transcript, 0xe00), mulmod(mload(add(transcript, 0xf80)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xdc0)) mstore(add(transcript, 0xdc0), mulmod(mload(add(transcript, 0xf60)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0xd80)) mstore(add(transcript, 0xd80), mulmod(mload(add(transcript, 0xd40)), inv, f_q)) inv := mulmod(v, inv, f_q) mstore(add(transcript, 0xd40), inv) }mstore(add(transcript, 0x1160), mulmod(mload(add(transcript, 0xd20)), mload(add(transcript, 0xd40)), f_q))mstore(add(transcript, 0x1180), mulmod(mload(add(transcript, 0xd60)), mload(add(transcript, 0xd80)), f_q))mstore(add(transcript, 0x11a0), mulmod(mload(add(transcript, 0xda0)), mload(add(transcript, 0xdc0)), f_q))mstore(add(transcript, 0x11c0), mulmod(mload(add(transcript, 0xde0)), mload(add(transcript, 0xe00)), f_q))mstore(add(transcript, 0x11e0), mulmod(mload(add(transcript, 0xe20)), mload(add(transcript, 0xe40)), f_q))mstore(add(transcript, 0x1200), mulmod(mload(add(transcript, 0xe60)), mload(add(transcript, 0xe80)), f_q))mstore(add(transcript, 0x1220), mulmod(mload(add(transcript, 0xea0)), mload(add(transcript, 0xec0)), f_q))mstore(add(transcript, 0x1240), mulmod(mload(add(transcript, 0xee0)), mload(add(transcript, 0xf00)), f_q))mstore(add(transcript, 0x1260), mulmod(mload(add(transcript, 0xf20)), mload(add(transcript, 0xf40)), f_q)){ let result := mulmod(mload(add(transcript, 0x1220)), mload(add(transcript, 0x20)), f_q)result := addmod(mulmod(mload(add(transcript, 0x1240)), mload(add(transcript, 0x40)), f_q), result, f_q)result := addmod(mulmod(mload(add(transcript, 0x1260)), mload(add(transcript, 0x60)), f_q), result, f_q)mstore(add(transcript, 0x1280), result) }mstore(add(transcript, 0x12a0), addmod(mload(add(transcript, 0x5e0)), mload(add(transcript, 0x720)), f_q))mstore(add(transcript, 0x12c0), mulmod(mload(add(transcript, 0x12a0)), mload(add(transcript, 0x12a0)), f_q))mstore(add(transcript, 0x12e0), mulmod(mload(add(transcript, 0x12c0)), mload(add(transcript, 0x12c0)), f_q))mstore(add(transcript, 0x1300), mulmod(mload(add(transcript, 0x12a0)), mload(add(transcript, 0x12e0)), f_q))mstore(add(transcript, 0x1320), mulmod(mload(add(transcript, 0x1300)), 2910766817845651019878574839501801340070030115151021261302834310722729507541, f_q))mstore(add(transcript, 0x1340), addmod(mload(add(transcript, 0x600)), mload(add(transcript, 0x740)), f_q))mstore(add(transcript, 0x1360), mulmod(mload(add(transcript, 0x1340)), mload(add(transcript, 0x1340)), f_q))mstore(add(transcript, 0x1380), mulmod(mload(add(transcript, 0x1360)), mload(add(transcript, 0x1360)), f_q))mstore(add(transcript, 0x13a0), mulmod(mload(add(transcript, 0x1340)), mload(add(transcript, 0x1380)), f_q))mstore(add(transcript, 0x13c0), mulmod(mload(add(transcript, 0x13a0)), 19727366863391167538122140361473584127147630672623100827934084310230022599144, f_q))mstore(add(transcript, 0x13e0), addmod(mload(add(transcript, 0x1320)), mload(add(transcript, 0x13c0)), f_q))mstore(add(transcript, 0x1400), addmod(mload(add(transcript, 0x13e0)), sub(f_q, mload(add(transcript, 0x620))), f_q))mstore(add(transcript, 0x1420), mulmod(mload(add(transcript, 0x1400)), mload(add(transcript, 0x7a0)), f_q))mstore(add(transcript, 0x1440), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1420)), f_q))mstore(add(transcript, 0x1460), mulmod(mload(add(transcript, 0x1300)), 5776684794125549462448597414050232243778680302179439492664047328281728356345, f_q))mstore(add(transcript, 0x1480), mulmod(mload(add(transcript, 0x13a0)), 8348174920934122550483593999453880006756108121341067172388445916328941978568, f_q))mstore(add(transcript, 0x14a0), addmod(mload(add(transcript, 0x1460)), mload(add(transcript, 0x1480)), f_q))mstore(add(transcript, 0x14c0), addmod(mload(add(transcript, 0x14a0)), sub(f_q, mload(add(transcript, 0x640))), f_q))mstore(add(transcript, 0x14e0), mulmod(mload(add(transcript, 0x14c0)), mload(add(transcript, 0x7a0)), f_q))mstore(add(transcript, 0x1500), addmod(mload(add(transcript, 0x1440)), mload(add(transcript, 0x14e0)), f_q))mstore(add(transcript, 0x1520), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1500)), f_q))mstore(add(transcript, 0x1540), addmod(mload(add(transcript, 0x1300)), sub(f_q, mload(add(transcript, 0x660))), f_q))mstore(add(transcript, 0x1560), mulmod(mload(add(transcript, 0x1540)), mload(add(transcript, 0x7c0)), f_q))mstore(add(transcript, 0x1580), addmod(mload(add(transcript, 0x1520)), mload(add(transcript, 0x1560)), f_q))mstore(add(transcript, 0x15a0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1580)), f_q))mstore(add(transcript, 0x15c0), mulmod(mload(add(transcript, 0x660)), 2910766817845651019878574839501801340070030115151021261302834310722729507541, f_q))mstore(add(transcript, 0x15e0), mulmod(mload(add(transcript, 0x1340)), 19727366863391167538122140361473584127147630672623100827934084310230022599144, f_q))mstore(add(transcript, 0x1600), addmod(mload(add(transcript, 0x15c0)), mload(add(transcript, 0x15e0)), f_q))mstore(add(transcript, 0x1620), addmod(mload(add(transcript, 0x1600)), mload(add(transcript, 0x6e0)), f_q))mstore(add(transcript, 0x1640), mulmod(mload(add(transcript, 0x1620)), mload(add(transcript, 0x1620)), f_q))mstore(add(transcript, 0x1660), mulmod(mload(add(transcript, 0x1640)), mload(add(transcript, 0x1640)), f_q))mstore(add(transcript, 0x1680), mulmod(mload(add(transcript, 0x1620)), mload(add(transcript, 0x1660)), f_q))mstore(add(transcript, 0x16a0), mulmod(mload(add(transcript, 0x620)), 8897705321156975119607866206188469715432233408805434913352778521345836531302, f_q))mstore(add(transcript, 0x16c0), mulmod(mload(add(transcript, 0x640)), 13897810991298242824030978581179475767377101082166056046492926701399149797630, f_q))mstore(add(transcript, 0x16e0), addmod(mload(add(transcript, 0x16a0)), mload(add(transcript, 0x16c0)), f_q))mstore(add(transcript, 0x1700), addmod(mload(add(transcript, 0x1680)), sub(f_q, mload(add(transcript, 0x16e0))), f_q))mstore(add(transcript, 0x1720), mulmod(mload(add(transcript, 0x1700)), mload(add(transcript, 0x7c0)), f_q))mstore(add(transcript, 0x1740), addmod(mload(add(transcript, 0x15a0)), mload(add(transcript, 0x1720)), f_q))mstore(add(transcript, 0x1760), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1740)), f_q))mstore(add(transcript, 0x1780), mulmod(mload(add(transcript, 0x660)), 5776684794125549462448597414050232243778680302179439492664047328281728356345, f_q))mstore(add(transcript, 0x17a0), mulmod(mload(add(transcript, 0x1340)), 8348174920934122550483593999453880006756108121341067172388445916328941978568, f_q))mstore(add(transcript, 0x17c0), addmod(mload(add(transcript, 0x1780)), mload(add(transcript, 0x17a0)), f_q))mstore(add(transcript, 0x17e0), addmod(mload(add(transcript, 0x17c0)), mload(add(transcript, 0x700)), f_q))mstore(add(transcript, 0x1800), mulmod(mload(add(transcript, 0x620)), 7127083008168878795310303301757642617203533252990949589494537404444738046722, f_q))mstore(add(transcript, 0x1820), mulmod(mload(add(transcript, 0x640)), 10251091711782631878897995303436082826711938358699127319815611151510940403902, f_q))mstore(add(transcript, 0x1840), addmod(mload(add(transcript, 0x1800)), mload(add(transcript, 0x1820)), f_q))mstore(add(transcript, 0x1860), addmod(mload(add(transcript, 0x17e0)), sub(f_q, mload(add(transcript, 0x1840))), f_q))mstore(add(transcript, 0x1880), mulmod(mload(add(transcript, 0x1860)), mload(add(transcript, 0x7c0)), f_q))mstore(add(transcript, 0x18a0), addmod(mload(add(transcript, 0x1760)), mload(add(transcript, 0x1880)), f_q))mstore(add(transcript, 0x18c0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x18a0)), f_q))mstore(add(transcript, 0x18e0), addmod(1, sub(f_q, mload(add(transcript, 0x780))), f_q))mstore(add(transcript, 0x1900), mulmod(mload(add(transcript, 0x18e0)), mload(add(transcript, 0x780)), f_q))mstore(add(transcript, 0x1920), addmod(2, sub(f_q, mload(add(transcript, 0x780))), f_q))mstore(add(transcript, 0x1940), mulmod(mload(add(transcript, 0x1920)), mload(add(transcript, 0x1900)), f_q))mstore(add(transcript, 0x1960), addmod(3, sub(f_q, mload(add(transcript, 0x780))), f_q))mstore(add(transcript, 0x1980), mulmod(mload(add(transcript, 0x1960)), mload(add(transcript, 0x1940)), f_q))mstore(add(transcript, 0x19a0), addmod(mload(add(transcript, 0x6a0)), mload(add(transcript, 0x5e0)), f_q))mstore(add(transcript, 0x19c0), addmod(mload(add(transcript, 0x19a0)), sub(f_q, mload(add(transcript, 0x620))), f_q))mstore(add(transcript, 0x19e0), mulmod(mload(add(transcript, 0x19c0)), mload(add(transcript, 0x1980)), f_q))mstore(add(transcript, 0x1a00), addmod(mload(add(transcript, 0x18c0)), mload(add(transcript, 0x19e0)), f_q))mstore(add(transcript, 0x1a20), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1a00)), f_q))mstore(add(transcript, 0x1a40), addmod(mload(add(transcript, 0x680)), sub(f_q, mload(add(transcript, 0x640))), f_q))mstore(add(transcript, 0x1a60), mulmod(mload(add(transcript, 0x1a40)), mload(add(transcript, 0x1980)), f_q))mstore(add(transcript, 0x1a80), addmod(mload(add(transcript, 0x1a20)), mload(add(transcript, 0x1a60)), f_q))mstore(add(transcript, 0x1aa0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1a80)), f_q))mstore(add(transcript, 0x1ac0), mulmod(mload(add(transcript, 0x1920)), mload(add(transcript, 0x780)), f_q))mstore(add(transcript, 0x1ae0), mulmod(mload(add(transcript, 0x1960)), mload(add(transcript, 0x1ac0)), f_q))mstore(add(transcript, 0x1b00), addmod(4, sub(f_q, mload(add(transcript, 0x780))), f_q))mstore(add(transcript, 0x1b20), mulmod(mload(add(transcript, 0x1b00)), mload(add(transcript, 0x1ae0)), f_q))mstore(add(transcript, 0x1b40), mulmod(mload(add(transcript, 0x660)), mload(add(transcript, 0x1b20)), f_q))mstore(add(transcript, 0x1b60), addmod(1, sub(f_q, mload(add(transcript, 0x660))), f_q))mstore(add(transcript, 0x1b80), mulmod(mload(add(transcript, 0x1b60)), mload(add(transcript, 0x1b40)), f_q))mstore(add(transcript, 0x1ba0), addmod(mload(add(transcript, 0x1aa0)), mload(add(transcript, 0x1b80)), f_q))mstore(add(transcript, 0x1bc0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1ba0)), f_q))mstore(add(transcript, 0x1be0), mulmod(2, mload(add(transcript, 0x660)), f_q))mstore(add(transcript, 0x1c00), addmod(mload(add(transcript, 0x600)), sub(f_q, mload(add(transcript, 0x5e0))), f_q))mstore(add(transcript, 0x1c20), mulmod(mload(add(transcript, 0x1c00)), mload(add(transcript, 0x1be0)), f_q))mstore(add(transcript, 0x1c40), addmod(mload(add(transcript, 0x620)), sub(f_q, mload(add(transcript, 0x5e0))), f_q))mstore(add(transcript, 0x1c60), addmod(mload(add(transcript, 0x1c20)), sub(f_q, mload(add(transcript, 0x1c40))), f_q))mstore(add(transcript, 0x1c80), addmod(mload(add(transcript, 0x600)), sub(f_q, mload(add(transcript, 0x640))), f_q))mstore(add(transcript, 0x1ca0), addmod(mload(add(transcript, 0x1c60)), sub(f_q, mload(add(transcript, 0x1c80))), f_q))mstore(add(transcript, 0x1cc0), mulmod(mload(add(transcript, 0x1ca0)), mload(add(transcript, 0x1b20)), f_q))mstore(add(transcript, 0x1ce0), addmod(mload(add(transcript, 0x1bc0)), mload(add(transcript, 0x1cc0)), f_q))mstore(add(transcript, 0x1d00), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1ce0)), f_q))mstore(add(transcript, 0x1d20), mulmod(mload(add(transcript, 0x1960)), mload(add(transcript, 0x1900)), f_q))mstore(add(transcript, 0x1d40), mulmod(mload(add(transcript, 0x1b00)), mload(add(transcript, 0x1d20)), f_q))mstore(add(transcript, 0x1d60), addmod(mload(add(transcript, 0x5e0)), mload(add(transcript, 0x600)), f_q))mstore(add(transcript, 0x1d80), addmod(mload(add(transcript, 0x1d60)), sub(f_q, mload(add(transcript, 0x660))), f_q))mstore(add(transcript, 0x1da0), mulmod(mload(add(transcript, 0x1d80)), mload(add(transcript, 0x1d40)), f_q))mstore(add(transcript, 0x1dc0), addmod(mload(add(transcript, 0x1d00)), mload(add(transcript, 0x1da0)), f_q))mstore(add(transcript, 0x1de0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1dc0)), f_q))mstore(add(transcript, 0x1e00), addmod(mload(add(transcript, 0x1de0)), mload(add(transcript, 0x1da0)), f_q))mstore(add(transcript, 0x1e20), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1e00)), f_q))mstore(add(transcript, 0x1e40), mulmod(mload(add(transcript, 0x1b00)), mload(add(transcript, 0x1940)), f_q))mstore(add(transcript, 0x1e60), addmod(mload(add(transcript, 0x5e0)), sub(f_q, mload(add(transcript, 0x600))), f_q))mstore(add(transcript, 0x1e80), addmod(mload(add(transcript, 0x1e60)), 5192296858534827628530496329220096, f_q))mstore(add(transcript, 0x1ea0), addmod(mload(add(transcript, 0x1e80)), sub(f_q, mload(add(transcript, 0x660))), f_q))mstore(add(transcript, 0x1ec0), mulmod(mload(add(transcript, 0x1ea0)), mload(add(transcript, 0x1e40)), f_q))mstore(add(transcript, 0x1ee0), addmod(mload(add(transcript, 0x1e20)), mload(add(transcript, 0x1ec0)), f_q))mstore(add(transcript, 0x1f00), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1ee0)), f_q))mstore(add(transcript, 0x1f20), addmod(1, sub(f_q, mload(add(transcript, 0x8c0))), f_q))mstore(add(transcript, 0x1f40), mulmod(mload(add(transcript, 0x1f20)), mload(add(transcript, 0x1220)), f_q))mstore(add(transcript, 0x1f60), addmod(mload(add(transcript, 0x1f00)), mload(add(transcript, 0x1f40)), f_q))mstore(add(transcript, 0x1f80), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x1f60)), f_q))mstore(add(transcript, 0x1fa0), mulmod(mload(add(transcript, 0x920)), mload(add(transcript, 0x920)), f_q))mstore(add(transcript, 0x1fc0), addmod(mload(add(transcript, 0x1fa0)), sub(f_q, mload(add(transcript, 0x920))), f_q))mstore(add(transcript, 0x1fe0), mulmod(mload(add(transcript, 0x1fc0)), mload(add(transcript, 0x1160)), f_q))mstore(add(transcript, 0x2000), addmod(mload(add(transcript, 0x1f80)), mload(add(transcript, 0x1fe0)), f_q))mstore(add(transcript, 0x2020), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2000)), f_q))mstore(add(transcript, 0x2040), addmod(mload(add(transcript, 0x920)), sub(f_q, mload(add(transcript, 0x900))), f_q))mstore(add(transcript, 0x2060), mulmod(mload(add(transcript, 0x2040)), mload(add(transcript, 0x1220)), f_q))mstore(add(transcript, 0x2080), addmod(mload(add(transcript, 0x2020)), mload(add(transcript, 0x2060)), f_q))mstore(add(transcript, 0x20a0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2080)), f_q))mstore(add(transcript, 0x20c0), addmod(1, sub(f_q, mload(add(transcript, 0x1160))), f_q))mstore(add(transcript, 0x20e0), addmod(mload(add(transcript, 0x1180)), mload(add(transcript, 0x11a0)), f_q))mstore(add(transcript, 0x2100), addmod(mload(add(transcript, 0x20e0)), mload(add(transcript, 0x11c0)), f_q))mstore(add(transcript, 0x2120), addmod(mload(add(transcript, 0x2100)), mload(add(transcript, 0x11e0)), f_q))mstore(add(transcript, 0x2140), addmod(mload(add(transcript, 0x2120)), mload(add(transcript, 0x1200)), f_q))mstore(add(transcript, 0x2160), addmod(mload(add(transcript, 0x20c0)), sub(f_q, mload(add(transcript, 0x2140))), f_q))mstore(add(transcript, 0x2180), mulmod(mload(add(transcript, 0x800)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x21a0), addmod(mload(add(transcript, 0x6e0)), mload(add(transcript, 0x2180)), f_q))mstore(add(transcript, 0x21c0), addmod(mload(add(transcript, 0x21a0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x21e0), mulmod(mload(add(transcript, 0x820)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2200), addmod(mload(add(transcript, 0x5e0)), mload(add(transcript, 0x21e0)), f_q))mstore(add(transcript, 0x2220), addmod(mload(add(transcript, 0x2200)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2240), mulmod(mload(add(transcript, 0x2220)), mload(add(transcript, 0x21c0)), f_q))mstore(add(transcript, 0x2260), mulmod(mload(add(transcript, 0x840)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2280), addmod(mload(add(transcript, 0x600)), mload(add(transcript, 0x2260)), f_q))mstore(add(transcript, 0x22a0), addmod(mload(add(transcript, 0x2280)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x22c0), mulmod(mload(add(transcript, 0x22a0)), mload(add(transcript, 0x2240)), f_q))mstore(add(transcript, 0x22e0), mulmod(mload(add(transcript, 0x860)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2300), addmod(mload(add(transcript, 0x700)), mload(add(transcript, 0x22e0)), f_q))mstore(add(transcript, 0x2320), addmod(mload(add(transcript, 0x2300)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2340), mulmod(mload(add(transcript, 0x2320)), mload(add(transcript, 0x22c0)), f_q))mstore(add(transcript, 0x2360), mulmod(mload(add(transcript, 0x2340)), mload(add(transcript, 0x8e0)), f_q))mstore(add(transcript, 0x2380), mulmod(1, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x23a0), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x2380)), f_q))mstore(add(transcript, 0x23c0), addmod(mload(add(transcript, 0x6e0)), mload(add(transcript, 0x23a0)), f_q))mstore(add(transcript, 0x23e0), addmod(mload(add(transcript, 0x23c0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2400), mulmod(4131629893567559867359510883348571134090853742863529169391034518566172092834, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2420), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x2400)), f_q))mstore(add(transcript, 0x2440), addmod(mload(add(transcript, 0x5e0)), mload(add(transcript, 0x2420)), f_q))mstore(add(transcript, 0x2460), addmod(mload(add(transcript, 0x2440)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2480), mulmod(mload(add(transcript, 0x2460)), mload(add(transcript, 0x23e0)), f_q))mstore(add(transcript, 0x24a0), mulmod(8910878055287538404433155982483128285667088683464058436815641868457422632747, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x24c0), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x24a0)), f_q))mstore(add(transcript, 0x24e0), addmod(mload(add(transcript, 0x600)), mload(add(transcript, 0x24c0)), f_q))mstore(add(transcript, 0x2500), addmod(mload(add(transcript, 0x24e0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2520), mulmod(mload(add(transcript, 0x2500)), mload(add(transcript, 0x2480)), f_q))mstore(add(transcript, 0x2540), mulmod(11166246659983828508719468090013646171463329086121580628794302409516816350802, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2560), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x2540)), f_q))mstore(add(transcript, 0x2580), addmod(mload(add(transcript, 0x700)), mload(add(transcript, 0x2560)), f_q))mstore(add(transcript, 0x25a0), addmod(mload(add(transcript, 0x2580)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x25c0), mulmod(mload(add(transcript, 0x25a0)), mload(add(transcript, 0x2520)), f_q))mstore(add(transcript, 0x25e0), mulmod(mload(add(transcript, 0x25c0)), mload(add(transcript, 0x8c0)), f_q))mstore(add(transcript, 0x2600), addmod(mload(add(transcript, 0x2360)), sub(f_q, mload(add(transcript, 0x25e0))), f_q))mstore(add(transcript, 0x2620), mulmod(mload(add(transcript, 0x2600)), mload(add(transcript, 0x2160)), f_q))mstore(add(transcript, 0x2640), addmod(mload(add(transcript, 0x20a0)), mload(add(transcript, 0x2620)), f_q))mstore(add(transcript, 0x2660), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2640)), f_q))mstore(add(transcript, 0x2680), mulmod(mload(add(transcript, 0x880)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x26a0), addmod(mload(add(transcript, 0x660)), mload(add(transcript, 0x2680)), f_q))mstore(add(transcript, 0x26c0), addmod(mload(add(transcript, 0x26a0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x26e0), mulmod(mload(add(transcript, 0x8a0)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2700), addmod(mload(add(transcript, 0x1280)), mload(add(transcript, 0x26e0)), f_q))mstore(add(transcript, 0x2720), addmod(mload(add(transcript, 0x2700)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2740), mulmod(mload(add(transcript, 0x2720)), mload(add(transcript, 0x26c0)), f_q))mstore(add(transcript, 0x2760), mulmod(mload(add(transcript, 0x2740)), mload(add(transcript, 0x940)), f_q))mstore(add(transcript, 0x2780), mulmod(284840088355319032285349970403338060113257071685626700086398481893096618818, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x27a0), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x2780)), f_q))mstore(add(transcript, 0x27c0), addmod(mload(add(transcript, 0x660)), mload(add(transcript, 0x27a0)), f_q))mstore(add(transcript, 0x27e0), addmod(mload(add(transcript, 0x27c0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2800), mulmod(21134065618345176623193549882539580312263652408302468683943992798037078993309, mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2820), mulmod(mload(add(transcript, 0x5a0)), mload(add(transcript, 0x2800)), f_q))mstore(add(transcript, 0x2840), addmod(mload(add(transcript, 0x1280)), mload(add(transcript, 0x2820)), f_q))mstore(add(transcript, 0x2860), addmod(mload(add(transcript, 0x2840)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2880), mulmod(mload(add(transcript, 0x2860)), mload(add(transcript, 0x27e0)), f_q))mstore(add(transcript, 0x28a0), mulmod(mload(add(transcript, 0x2880)), mload(add(transcript, 0x920)), f_q))mstore(add(transcript, 0x28c0), addmod(mload(add(transcript, 0x2760)), sub(f_q, mload(add(transcript, 0x28a0))), f_q))mstore(add(transcript, 0x28e0), mulmod(mload(add(transcript, 0x28c0)), mload(add(transcript, 0x2160)), f_q))mstore(add(transcript, 0x2900), addmod(mload(add(transcript, 0x2660)), mload(add(transcript, 0x28e0)), f_q))mstore(add(transcript, 0x2920), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2900)), f_q))mstore(add(transcript, 0x2940), addmod(1, sub(f_q, mload(add(transcript, 0x960))), f_q))mstore(add(transcript, 0x2960), mulmod(mload(add(transcript, 0x2940)), mload(add(transcript, 0x1220)), f_q))mstore(add(transcript, 0x2980), addmod(mload(add(transcript, 0x2920)), mload(add(transcript, 0x2960)), f_q))mstore(add(transcript, 0x29a0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2980)), f_q))mstore(add(transcript, 0x29c0), mulmod(mload(add(transcript, 0x960)), mload(add(transcript, 0x960)), f_q))mstore(add(transcript, 0x29e0), addmod(mload(add(transcript, 0x29c0)), sub(f_q, mload(add(transcript, 0x960))), f_q))mstore(add(transcript, 0x2a00), mulmod(mload(add(transcript, 0x29e0)), mload(add(transcript, 0x1160)), f_q))mstore(add(transcript, 0x2a20), addmod(mload(add(transcript, 0x29a0)), mload(add(transcript, 0x2a00)), f_q))mstore(add(transcript, 0x2a40), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2a20)), f_q))mstore(add(transcript, 0x2a60), addmod(mload(add(transcript, 0x9a0)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2a80), mulmod(mload(add(transcript, 0x2a60)), mload(add(transcript, 0x980)), f_q))mstore(add(transcript, 0x2aa0), addmod(mload(add(transcript, 0x9e0)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2ac0), mulmod(mload(add(transcript, 0x2aa0)), mload(add(transcript, 0x2a80)), f_q))mstore(add(transcript, 0x2ae0), mulmod(256, mload(add(transcript, 0x6c0)), f_q))mstore(add(transcript, 0x2b00), addmod(mload(add(transcript, 0x660)), sub(f_q, mload(add(transcript, 0x2ae0))), f_q))mstore(add(transcript, 0x2b20), mulmod(mload(add(transcript, 0x2b00)), mload(add(transcript, 0x760)), f_q))mstore(add(transcript, 0x2b40), addmod(mload(add(transcript, 0x2b20)), mload(add(transcript, 0x240)), f_q))mstore(add(transcript, 0x2b60), mulmod(mload(add(transcript, 0x2b40)), mload(add(transcript, 0x960)), f_q))mstore(add(transcript, 0x2b80), addmod(mload(add(transcript, 0x720)), mload(add(transcript, 0x2a0)), f_q))mstore(add(transcript, 0x2ba0), mulmod(mload(add(transcript, 0x2b80)), mload(add(transcript, 0x2b60)), f_q))mstore(add(transcript, 0x2bc0), addmod(mload(add(transcript, 0x2ac0)), sub(f_q, mload(add(transcript, 0x2ba0))), f_q))mstore(add(transcript, 0x2be0), mulmod(mload(add(transcript, 0x2bc0)), mload(add(transcript, 0x2160)), f_q))mstore(add(transcript, 0x2c00), addmod(mload(add(transcript, 0x2a40)), mload(add(transcript, 0x2be0)), f_q))mstore(add(transcript, 0x2c20), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2c00)), f_q))mstore(add(transcript, 0x2c40), addmod(mload(add(transcript, 0x9a0)), sub(f_q, mload(add(transcript, 0x9e0))), f_q))mstore(add(transcript, 0x2c60), mulmod(mload(add(transcript, 0x2c40)), mload(add(transcript, 0x1220)), f_q))mstore(add(transcript, 0x2c80), addmod(mload(add(transcript, 0x2c20)), mload(add(transcript, 0x2c60)), f_q))mstore(add(transcript, 0x2ca0), mulmod(mload(add(transcript, 0x400)), mload(add(transcript, 0x2c80)), f_q))mstore(add(transcript, 0x2cc0), mulmod(mload(add(transcript, 0x2c40)), mload(add(transcript, 0x2160)), f_q))mstore(add(transcript, 0x2ce0), addmod(mload(add(transcript, 0x9a0)), sub(f_q, mload(add(transcript, 0x9c0))), f_q))mstore(add(transcript, 0x2d00), mulmod(mload(add(transcript, 0x2ce0)), mload(add(transcript, 0x2cc0)), f_q))mstore(add(transcript, 0x2d20), addmod(mload(add(transcript, 0x2ca0)), mload(add(transcript, 0x2d00)), f_q))mstore(add(transcript, 0x2d40), mulmod(mload(add(transcript, 0xcc0)), mload(add(transcript, 0xcc0)), f_q))mstore(add(transcript, 0x2d60), mulmod(mload(add(transcript, 0x2d40)), mload(add(transcript, 0xcc0)), f_q))mstore(add(transcript, 0x2d80), mulmod(mload(add(transcript, 0x2d60)), mload(add(transcript, 0xcc0)), f_q))mstore(add(transcript, 0x2da0), mulmod(mload(add(transcript, 0x2d80)), mload(add(transcript, 0xcc0)), f_q))mstore(add(transcript, 0x2dc0), mulmod(1, mload(add(transcript, 0xcc0)), f_q))mstore(add(transcript, 0x2de0), mulmod(1, mload(add(transcript, 0x2d40)), f_q))mstore(add(transcript, 0x2e00), mulmod(1, mload(add(transcript, 0x2d60)), f_q))mstore(add(transcript, 0x2e20), mulmod(1, mload(add(transcript, 0x2d80)), f_q))mstore(add(transcript, 0x2e40), mulmod(mload(add(transcript, 0x2d20)), mload(add(transcript, 0xce0)), f_q))mstore(add(transcript, 0x2e60), mulmod(mload(add(transcript, 0xba0)), mload(add(transcript, 0x5a0)), f_q))mstore(add(transcript, 0x2e80), mulmod(mload(add(transcript, 0x5a0)), 1, f_q))mstore(add(transcript, 0x2ea0), addmod(mload(add(transcript, 0xb20)), sub(f_q, mload(add(transcript, 0x2e80))), f_q))mstore(add(transcript, 0x2ec0), mulmod(mload(add(transcript, 0x5a0)), 4925592601992654644734291590386747644864797672605745962807370354577123815907, f_q))mstore(add(transcript, 0x2ee0), addmod(mload(add(transcript, 0xb20)), sub(f_q, mload(add(transcript, 0x2ec0))), f_q))mstore(add(transcript, 0x2f00), mulmod(mload(add(transcript, 0x5a0)), 9936069627611189518829255670237324269287146421271524553312532036927871056678, f_q))mstore(add(transcript, 0x2f20), addmod(mload(add(transcript, 0xb20)), sub(f_q, mload(add(transcript, 0x2f00))), f_q))mstore(add(transcript, 0x2f40), mulmod(mload(add(transcript, 0x5a0)), 19380560087801265747114831706136320509424814679569278834391540198888293317501, f_q))mstore(add(transcript, 0x2f60), addmod(mload(add(transcript, 0xb20)), sub(f_q, mload(add(transcript, 0x2f40))), f_q)){ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 19470333053884630052643688193991482022807116448657043890197497819686199857828, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 2417909817954645169602717551265793065741247951758990453500706366889608637789, f_q), f_q), result, f_q)mstore(add(transcript, 0x2f80), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 13686227242150003628673578706486473027501243666075718775893288845164412632930, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 10079503758141076467065204586507257535549232608832327988764044976944819876346, f_q), f_q), result, f_q)mstore(add(transcript, 0x2fa0), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 18715936898160381416714524359517348601997944075114713669820885373469568354766, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 15375775075249615866494035504844970190233299190010037655541891534730124992278, f_q), f_q), result, f_q)mstore(add(transcript, 0x2fc0), result) }mstore(add(transcript, 0x2fe0), mulmod(1, mload(add(transcript, 0x2ea0)), f_q))mstore(add(transcript, 0x3000), mulmod(mload(add(transcript, 0x2fe0)), mload(add(transcript, 0x2f60)), f_q))mstore(add(transcript, 0x3020), mulmod(mload(add(transcript, 0x3000)), mload(add(transcript, 0x2ee0)), f_q)){ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0x5a0)), 2507682784038009475131574039120954579123549720846755509306663987687515178117, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0x5a0)), 19380560087801265747114831706136320509424814679569278834391540198888293317500, f_q), f_q), result, f_q)mstore(add(transcript, 0x3040), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0x5a0)), 19380560087801265747114831706136320509424814679569278834391540198888293317500, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0x5a0)), 13127608231681926238307118629157549705911918406946061530612285695988519678593, f_q), f_q), result, f_q)mstore(add(transcript, 0x3060), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 16140595808673403009154643164823336476463527776677864878778453135559733237044, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 5747647063165872213091762580433938612084836623738169464919751051016075258573, f_q), f_q), result, f_q)mstore(add(transcript, 0x3080), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 17015964487361230672162623735654618573844832338054897787312333529290879253714, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 3176732791729641355588945816447819802711920387939493967460175841862547409845, f_q), f_q), result, f_q)mstore(add(transcript, 0x30a0), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0xba0)), 19187508498431587163140984396833674282302409422288044257471288693049179355069, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0xba0)), 17472297497993506786357772047295541913219081564856233764575529621311665103799, f_q), f_q), result, f_q)mstore(add(transcript, 0x30c0), result) }mstore(add(transcript, 0x30e0), mulmod(mload(add(transcript, 0x3000)), mload(add(transcript, 0x2f20)), f_q)){ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0x5a0)), 16962650269846620577512114154870527443683566727810288380890833831998684679711, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0x5a0)), 4925592601992654644734291590386747644864797672605745962807370354577123815906, f_q), f_q), result, f_q)mstore(add(transcript, 0x3100), result) }{ let result := mulmod(mload(add(transcript, 0xb20)), mulmod(mload(add(transcript, 0x5a0)), 4925592601992654644734291590386747644864797672605745962807370354577123815906, f_q), f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), mulmod(mload(add(transcript, 0x5a0)), 664623189640884330400307346618971907426870604454565164570654825418724962734, f_q), f_q), result, f_q)mstore(add(transcript, 0x3120), result) }mstore(add(transcript, 0x3140), mulmod(mload(add(transcript, 0x2fe0)), mload(add(transcript, 0x2ee0)), f_q)){ let result := mulmod(mload(add(transcript, 0xb20)), 1, f_q)result := addmod(mulmod(mload(add(transcript, 0x5a0)), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q), result, f_q)mstore(add(transcript, 0x3160), result) }{ let prod := mload(add(transcript, 0x2f80)) prod := mulmod(mload(add(transcript, 0x2fa0)), prod, f_q) mstore(add(transcript, 0x3180), prod) prod := mulmod(mload(add(transcript, 0x2fc0)), prod, f_q) mstore(add(transcript, 0x31a0), prod) prod := mulmod(mload(add(transcript, 0x3040)), prod, f_q) mstore(add(transcript, 0x31c0), prod) prod := mulmod(mload(add(transcript, 0x3060)), prod, f_q) mstore(add(transcript, 0x31e0), prod) prod := mulmod(mload(add(transcript, 0x3000)), prod, f_q) mstore(add(transcript, 0x3200), prod) prod := mulmod(mload(add(transcript, 0x3080)), prod, f_q) mstore(add(transcript, 0x3220), prod) prod := mulmod(mload(add(transcript, 0x30a0)), prod, f_q) mstore(add(transcript, 0x3240), prod) prod := mulmod(mload(add(transcript, 0x30c0)), prod, f_q) mstore(add(transcript, 0x3260), prod) prod := mulmod(mload(add(transcript, 0x30e0)), prod, f_q) mstore(add(transcript, 0x3280), prod) prod := mulmod(mload(add(transcript, 0x3100)), prod, f_q) mstore(add(transcript, 0x32a0), prod) prod := mulmod(mload(add(transcript, 0x3120)), prod, f_q) mstore(add(transcript, 0x32c0), prod) prod := mulmod(mload(add(transcript, 0x3140)), prod, f_q) mstore(add(transcript, 0x32e0), prod) prod := mulmod(mload(add(transcript, 0x3160)), prod, f_q) mstore(add(transcript, 0x3300), prod) prod := mulmod(mload(add(transcript, 0x2fe0)), prod, f_q) mstore(add(transcript, 0x3320), prod) }mstore(add(transcript, 0x3360), 32)mstore(add(transcript, 0x3380), 32)mstore(add(transcript, 0x33a0), 32)mstore(add(transcript, 0x33c0), mload(add(transcript, 0x3320)))mstore(add(transcript, 0x33e0), 21888242871839275222246405745257275088548364400416034343698204186575808495615)mstore(add(transcript, 0x3400), 21888242871839275222246405745257275088548364400416034343698204186575808495617)success := and(eq(staticcall(gas(), 0x5, add(transcript, 0x3360), 0xc0, add(transcript, 0x3340), 0x20), 1), success){ let inv := mload(add(transcript, 0x3340)) let v v := mload(add(transcript, 0x2fe0)) mstore(add(transcript, 0x2fe0), mulmod(mload(add(transcript, 0x3300)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3160)) mstore(add(transcript, 0x3160), mulmod(mload(add(transcript, 0x32e0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3140)) mstore(add(transcript, 0x3140), mulmod(mload(add(transcript, 0x32c0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3120)) mstore(add(transcript, 0x3120), mulmod(mload(add(transcript, 0x32a0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3100)) mstore(add(transcript, 0x3100), mulmod(mload(add(transcript, 0x3280)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x30e0)) mstore(add(transcript, 0x30e0), mulmod(mload(add(transcript, 0x3260)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x30c0)) mstore(add(transcript, 0x30c0), mulmod(mload(add(transcript, 0x3240)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x30a0)) mstore(add(transcript, 0x30a0), mulmod(mload(add(transcript, 0x3220)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3080)) mstore(add(transcript, 0x3080), mulmod(mload(add(transcript, 0x3200)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3000)) mstore(add(transcript, 0x3000), mulmod(mload(add(transcript, 0x31e0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3060)) mstore(add(transcript, 0x3060), mulmod(mload(add(transcript, 0x31c0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3040)) mstore(add(transcript, 0x3040), mulmod(mload(add(transcript, 0x31a0)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x2fc0)) mstore(add(transcript, 0x2fc0), mulmod(mload(add(transcript, 0x3180)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x2fa0)) mstore(add(transcript, 0x2fa0), mulmod(mload(add(transcript, 0x2f80)), inv, f_q)) inv := mulmod(v, inv, f_q) mstore(add(transcript, 0x2f80), inv) }{ let result := mload(add(transcript, 0x2f80))result := addmod(mload(add(transcript, 0x2fa0)), result, f_q)result := addmod(mload(add(transcript, 0x2fc0)), result, f_q)mstore(add(transcript, 0x3420), result) }mstore(add(transcript, 0x3440), mulmod(mload(add(transcript, 0x3020)), mload(add(transcript, 0x3000)), f_q)){ let result := mload(add(transcript, 0x3040))result := addmod(mload(add(transcript, 0x3060)), result, f_q)mstore(add(transcript, 0x3460), result) }mstore(add(transcript, 0x3480), mulmod(mload(add(transcript, 0x3020)), mload(add(transcript, 0x30e0)), f_q)){ let result := mload(add(transcript, 0x3080))result := addmod(mload(add(transcript, 0x30a0)), result, f_q)result := addmod(mload(add(transcript, 0x30c0)), result, f_q)mstore(add(transcript, 0x34a0), result) }mstore(add(transcript, 0x34c0), mulmod(mload(add(transcript, 0x3020)), mload(add(transcript, 0x3140)), f_q)){ let result := mload(add(transcript, 0x3100))result := addmod(mload(add(transcript, 0x3120)), result, f_q)mstore(add(transcript, 0x34e0), result) }mstore(add(transcript, 0x3500), mulmod(mload(add(transcript, 0x3020)), mload(add(transcript, 0x2fe0)), f_q)){ let result := mload(add(transcript, 0x3160))mstore(add(transcript, 0x3520), result) }{ let prod := mload(add(transcript, 0x3420)) prod := mulmod(mload(add(transcript, 0x3460)), prod, f_q) mstore(add(transcript, 0x3540), prod) prod := mulmod(mload(add(transcript, 0x34a0)), prod, f_q) mstore(add(transcript, 0x3560), prod) prod := mulmod(mload(add(transcript, 0x34e0)), prod, f_q) mstore(add(transcript, 0x3580), prod) prod := mulmod(mload(add(transcript, 0x3520)), prod, f_q) mstore(add(transcript, 0x35a0), prod) }mstore(add(transcript, 0x35e0), 32)mstore(add(transcript, 0x3600), 32)mstore(add(transcript, 0x3620), 32)mstore(add(transcript, 0x3640), mload(add(transcript, 0x35a0)))mstore(add(transcript, 0x3660), 21888242871839275222246405745257275088548364400416034343698204186575808495615)mstore(add(transcript, 0x3680), 21888242871839275222246405745257275088548364400416034343698204186575808495617)success := and(eq(staticcall(gas(), 0x5, add(transcript, 0x35e0), 0xc0, add(transcript, 0x35c0), 0x20), 1), success){ let inv := mload(add(transcript, 0x35c0)) let v v := mload(add(transcript, 0x3520)) mstore(add(transcript, 0x3520), mulmod(mload(add(transcript, 0x3580)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x34e0)) mstore(add(transcript, 0x34e0), mulmod(mload(add(transcript, 0x3560)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x34a0)) mstore(add(transcript, 0x34a0), mulmod(mload(add(transcript, 0x3540)), inv, f_q)) inv := mulmod(v, inv, f_q) v := mload(add(transcript, 0x3460)) mstore(add(transcript, 0x3460), mulmod(mload(add(transcript, 0x3420)), inv, f_q)) inv := mulmod(v, inv, f_q) mstore(add(transcript, 0x3420), inv) }mstore(add(transcript, 0x36a0), mulmod(mload(add(transcript, 0x3440)), mload(add(transcript, 0x3460)), f_q))mstore(add(transcript, 0x36c0), mulmod(mload(add(transcript, 0x3480)), mload(add(transcript, 0x34a0)), f_q))mstore(add(transcript, 0x36e0), mulmod(mload(add(transcript, 0x34c0)), mload(add(transcript, 0x34e0)), f_q))mstore(add(transcript, 0x3700), mulmod(mload(add(transcript, 0x3500)), mload(add(transcript, 0x3520)), f_q))mstore(add(transcript, 0x3720), mulmod(mload(add(transcript, 0xa20)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3740), mulmod(mload(add(transcript, 0x3720)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3760), mulmod(mload(add(transcript, 0x3740)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3780), mulmod(mload(add(transcript, 0x3760)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x37a0), mulmod(mload(add(transcript, 0x3780)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x37c0), mulmod(mload(add(transcript, 0x37a0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x37e0), mulmod(mload(add(transcript, 0x37c0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3800), mulmod(mload(add(transcript, 0x37e0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3820), mulmod(mload(add(transcript, 0x3800)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3840), mulmod(mload(add(transcript, 0x3820)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3860), mulmod(mload(add(transcript, 0x3840)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3880), mulmod(mload(add(transcript, 0x3860)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x38a0), mulmod(mload(add(transcript, 0x3880)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x38c0), mulmod(mload(add(transcript, 0x38a0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x38e0), mulmod(mload(add(transcript, 0x38c0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3900), mulmod(mload(add(transcript, 0x38e0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3920), mulmod(mload(add(transcript, 0xa80)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3940), mulmod(mload(add(transcript, 0x3920)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3960), mulmod(mload(add(transcript, 0x3940)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3980), mulmod(mload(add(transcript, 0x3960)), mload(add(transcript, 0xa80)), f_q)){ let result := mulmod(mload(add(transcript, 0x5e0)), mload(add(transcript, 0x2f80)), f_q)result := addmod(mulmod(mload(add(transcript, 0x620)), mload(add(transcript, 0x2fa0)), f_q), result, f_q)result := addmod(mulmod(mload(add(transcript, 0x6a0)), mload(add(transcript, 0x2fc0)), f_q), result, f_q)mstore(add(transcript, 0x39a0), result) }mstore(add(transcript, 0x39c0), mulmod(mload(add(transcript, 0x39a0)), mload(add(transcript, 0x3420)), f_q))mstore(add(transcript, 0x39e0), mulmod(sub(f_q, mload(add(transcript, 0x39c0))), 1, f_q)){ let result := mulmod(mload(add(transcript, 0x600)), mload(add(transcript, 0x2f80)), f_q)result := addmod(mulmod(mload(add(transcript, 0x640)), mload(add(transcript, 0x2fa0)), f_q), result, f_q)result := addmod(mulmod(mload(add(transcript, 0x680)), mload(add(transcript, 0x2fc0)), f_q), result, f_q)mstore(add(transcript, 0x3a00), result) }mstore(add(transcript, 0x3a20), mulmod(mload(add(transcript, 0x3a00)), mload(add(transcript, 0x3420)), f_q))mstore(add(transcript, 0x3a40), mulmod(sub(f_q, mload(add(transcript, 0x3a20))), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3a60), mulmod(1, mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3a80), addmod(mload(add(transcript, 0x39e0)), mload(add(transcript, 0x3a40)), f_q))mstore(add(transcript, 0x3aa0), mulmod(mload(add(transcript, 0x3a80)), 1, f_q))mstore(add(transcript, 0x3ac0), mulmod(mload(add(transcript, 0x3a60)), 1, f_q))mstore(add(transcript, 0x3ae0), mulmod(1, mload(add(transcript, 0x3440)), f_q)){ let result := mulmod(mload(add(transcript, 0x660)), mload(add(transcript, 0x3040)), f_q)result := addmod(mulmod(mload(add(transcript, 0x6c0)), mload(add(transcript, 0x3060)), f_q), result, f_q)mstore(add(transcript, 0x3b00), result) }mstore(add(transcript, 0x3b20), mulmod(mload(add(transcript, 0x3b00)), mload(add(transcript, 0x36a0)), f_q))mstore(add(transcript, 0x3b40), mulmod(sub(f_q, mload(add(transcript, 0x3b20))), 1, f_q))mstore(add(transcript, 0x3b60), mulmod(mload(add(transcript, 0x3ae0)), 1, f_q)){ let result := mulmod(mload(add(transcript, 0x920)), mload(add(transcript, 0x3040)), f_q)result := addmod(mulmod(mload(add(transcript, 0x940)), mload(add(transcript, 0x3060)), f_q), result, f_q)mstore(add(transcript, 0x3b80), result) }mstore(add(transcript, 0x3ba0), mulmod(mload(add(transcript, 0x3b80)), mload(add(transcript, 0x36a0)), f_q))mstore(add(transcript, 0x3bc0), mulmod(sub(f_q, mload(add(transcript, 0x3ba0))), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3be0), mulmod(mload(add(transcript, 0x3ae0)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x3c00), addmod(mload(add(transcript, 0x3b40)), mload(add(transcript, 0x3bc0)), f_q)){ let result := mulmod(mload(add(transcript, 0x960)), mload(add(transcript, 0x3040)), f_q)result := addmod(mulmod(mload(add(transcript, 0x980)), mload(add(transcript, 0x3060)), f_q), result, f_q)mstore(add(transcript, 0x3c20), result) }mstore(add(transcript, 0x3c40), mulmod(mload(add(transcript, 0x3c20)), mload(add(transcript, 0x36a0)), f_q))mstore(add(transcript, 0x3c60), mulmod(sub(f_q, mload(add(transcript, 0x3c40))), mload(add(transcript, 0x3720)), f_q))mstore(add(transcript, 0x3c80), mulmod(mload(add(transcript, 0x3ae0)), mload(add(transcript, 0x3720)), f_q))mstore(add(transcript, 0x3ca0), addmod(mload(add(transcript, 0x3c00)), mload(add(transcript, 0x3c60)), f_q))mstore(add(transcript, 0x3cc0), mulmod(mload(add(transcript, 0x3ca0)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3ce0), mulmod(mload(add(transcript, 0x3b60)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3d00), mulmod(mload(add(transcript, 0x3be0)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3d20), mulmod(mload(add(transcript, 0x3c80)), mload(add(transcript, 0xa80)), f_q))mstore(add(transcript, 0x3d40), addmod(mload(add(transcript, 0x3aa0)), mload(add(transcript, 0x3cc0)), f_q))mstore(add(transcript, 0x3d60), mulmod(1, mload(add(transcript, 0x3480)), f_q)){ let result := mulmod(mload(add(transcript, 0x8c0)), mload(add(transcript, 0x3080)), f_q)result := addmod(mulmod(mload(add(transcript, 0x8e0)), mload(add(transcript, 0x30a0)), f_q), result, f_q)result := addmod(mulmod(mload(add(transcript, 0x900)), mload(add(transcript, 0x30c0)), f_q), result, f_q)mstore(add(transcript, 0x3d80), result) }mstore(add(transcript, 0x3da0), mulmod(mload(add(transcript, 0x3d80)), mload(add(transcript, 0x36c0)), f_q))mstore(add(transcript, 0x3dc0), mulmod(sub(f_q, mload(add(transcript, 0x3da0))), 1, f_q))mstore(add(transcript, 0x3de0), mulmod(mload(add(transcript, 0x3d60)), 1, f_q))mstore(add(transcript, 0x3e00), mulmod(mload(add(transcript, 0x3dc0)), mload(add(transcript, 0x3920)), f_q))mstore(add(transcript, 0x3e20), mulmod(mload(add(transcript, 0x3de0)), mload(add(transcript, 0x3920)), f_q))mstore(add(transcript, 0x3e40), addmod(mload(add(transcript, 0x3d40)), mload(add(transcript, 0x3e00)), f_q))mstore(add(transcript, 0x3e60), mulmod(1, mload(add(transcript, 0x34c0)), f_q)){ let result := mulmod(mload(add(transcript, 0x9a0)), mload(add(transcript, 0x3100)), f_q)result := addmod(mulmod(mload(add(transcript, 0x9c0)), mload(add(transcript, 0x3120)), f_q), result, f_q)mstore(add(transcript, 0x3e80), result) }mstore(add(transcript, 0x3ea0), mulmod(mload(add(transcript, 0x3e80)), mload(add(transcript, 0x36e0)), f_q))mstore(add(transcript, 0x3ec0), mulmod(sub(f_q, mload(add(transcript, 0x3ea0))), 1, f_q))mstore(add(transcript, 0x3ee0), mulmod(mload(add(transcript, 0x3e60)), 1, f_q))mstore(add(transcript, 0x3f00), mulmod(mload(add(transcript, 0x3ec0)), mload(add(transcript, 0x3940)), f_q))mstore(add(transcript, 0x3f20), mulmod(mload(add(transcript, 0x3ee0)), mload(add(transcript, 0x3940)), f_q))mstore(add(transcript, 0x3f40), addmod(mload(add(transcript, 0x3e40)), mload(add(transcript, 0x3f00)), f_q))mstore(add(transcript, 0x3f60), mulmod(1, mload(add(transcript, 0x3500)), f_q)){ let result := mulmod(mload(add(transcript, 0x9e0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x3f80), result) }mstore(add(transcript, 0x3fa0), mulmod(mload(add(transcript, 0x3f80)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x3fc0), mulmod(sub(f_q, mload(add(transcript, 0x3fa0))), 1, f_q))mstore(add(transcript, 0x3fe0), mulmod(mload(add(transcript, 0x3f60)), 1, f_q)){ let result := mulmod(mload(add(transcript, 0x6e0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4000), result) }mstore(add(transcript, 0x4020), mulmod(mload(add(transcript, 0x4000)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4040), mulmod(sub(f_q, mload(add(transcript, 0x4020))), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x4060), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0xa20)), f_q))mstore(add(transcript, 0x4080), addmod(mload(add(transcript, 0x3fc0)), mload(add(transcript, 0x4040)), f_q)){ let result := mulmod(mload(add(transcript, 0x700)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x40a0), result) }mstore(add(transcript, 0x40c0), mulmod(mload(add(transcript, 0x40a0)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x40e0), mulmod(sub(f_q, mload(add(transcript, 0x40c0))), mload(add(transcript, 0x3720)), f_q))mstore(add(transcript, 0x4100), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3720)), f_q))mstore(add(transcript, 0x4120), addmod(mload(add(transcript, 0x4080)), mload(add(transcript, 0x40e0)), f_q)){ let result := mulmod(mload(add(transcript, 0x720)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4140), result) }mstore(add(transcript, 0x4160), mulmod(mload(add(transcript, 0x4140)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4180), mulmod(sub(f_q, mload(add(transcript, 0x4160))), mload(add(transcript, 0x3740)), f_q))mstore(add(transcript, 0x41a0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3740)), f_q))mstore(add(transcript, 0x41c0), addmod(mload(add(transcript, 0x4120)), mload(add(transcript, 0x4180)), f_q)){ let result := mulmod(mload(add(transcript, 0x740)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x41e0), result) }mstore(add(transcript, 0x4200), mulmod(mload(add(transcript, 0x41e0)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4220), mulmod(sub(f_q, mload(add(transcript, 0x4200))), mload(add(transcript, 0x3760)), f_q))mstore(add(transcript, 0x4240), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3760)), f_q))mstore(add(transcript, 0x4260), addmod(mload(add(transcript, 0x41c0)), mload(add(transcript, 0x4220)), f_q)){ let result := mulmod(mload(add(transcript, 0x760)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4280), result) }mstore(add(transcript, 0x42a0), mulmod(mload(add(transcript, 0x4280)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x42c0), mulmod(sub(f_q, mload(add(transcript, 0x42a0))), mload(add(transcript, 0x3780)), f_q))mstore(add(transcript, 0x42e0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3780)), f_q))mstore(add(transcript, 0x4300), addmod(mload(add(transcript, 0x4260)), mload(add(transcript, 0x42c0)), f_q)){ let result := mulmod(mload(add(transcript, 0x780)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4320), result) }mstore(add(transcript, 0x4340), mulmod(mload(add(transcript, 0x4320)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4360), mulmod(sub(f_q, mload(add(transcript, 0x4340))), mload(add(transcript, 0x37a0)), f_q))mstore(add(transcript, 0x4380), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x37a0)), f_q))mstore(add(transcript, 0x43a0), addmod(mload(add(transcript, 0x4300)), mload(add(transcript, 0x4360)), f_q)){ let result := mulmod(mload(add(transcript, 0x7a0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x43c0), result) }mstore(add(transcript, 0x43e0), mulmod(mload(add(transcript, 0x43c0)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4400), mulmod(sub(f_q, mload(add(transcript, 0x43e0))), mload(add(transcript, 0x37c0)), f_q))mstore(add(transcript, 0x4420), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x37c0)), f_q))mstore(add(transcript, 0x4440), addmod(mload(add(transcript, 0x43a0)), mload(add(transcript, 0x4400)), f_q)){ let result := mulmod(mload(add(transcript, 0x7c0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4460), result) }mstore(add(transcript, 0x4480), mulmod(mload(add(transcript, 0x4460)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x44a0), mulmod(sub(f_q, mload(add(transcript, 0x4480))), mload(add(transcript, 0x37e0)), f_q))mstore(add(transcript, 0x44c0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x37e0)), f_q))mstore(add(transcript, 0x44e0), addmod(mload(add(transcript, 0x4440)), mload(add(transcript, 0x44a0)), f_q)){ let result := mulmod(mload(add(transcript, 0x800)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4500), result) }mstore(add(transcript, 0x4520), mulmod(mload(add(transcript, 0x4500)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4540), mulmod(sub(f_q, mload(add(transcript, 0x4520))), mload(add(transcript, 0x3800)), f_q))mstore(add(transcript, 0x4560), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3800)), f_q))mstore(add(transcript, 0x4580), addmod(mload(add(transcript, 0x44e0)), mload(add(transcript, 0x4540)), f_q)){ let result := mulmod(mload(add(transcript, 0x820)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x45a0), result) }mstore(add(transcript, 0x45c0), mulmod(mload(add(transcript, 0x45a0)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x45e0), mulmod(sub(f_q, mload(add(transcript, 0x45c0))), mload(add(transcript, 0x3820)), f_q))mstore(add(transcript, 0x4600), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3820)), f_q))mstore(add(transcript, 0x4620), addmod(mload(add(transcript, 0x4580)), mload(add(transcript, 0x45e0)), f_q)){ let result := mulmod(mload(add(transcript, 0x840)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4640), result) }mstore(add(transcript, 0x4660), mulmod(mload(add(transcript, 0x4640)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4680), mulmod(sub(f_q, mload(add(transcript, 0x4660))), mload(add(transcript, 0x3840)), f_q))mstore(add(transcript, 0x46a0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3840)), f_q))mstore(add(transcript, 0x46c0), addmod(mload(add(transcript, 0x4620)), mload(add(transcript, 0x4680)), f_q)){ let result := mulmod(mload(add(transcript, 0x860)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x46e0), result) }mstore(add(transcript, 0x4700), mulmod(mload(add(transcript, 0x46e0)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4720), mulmod(sub(f_q, mload(add(transcript, 0x4700))), mload(add(transcript, 0x3860)), f_q))mstore(add(transcript, 0x4740), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3860)), f_q))mstore(add(transcript, 0x4760), addmod(mload(add(transcript, 0x46c0)), mload(add(transcript, 0x4720)), f_q)){ let result := mulmod(mload(add(transcript, 0x880)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4780), result) }mstore(add(transcript, 0x47a0), mulmod(mload(add(transcript, 0x4780)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x47c0), mulmod(sub(f_q, mload(add(transcript, 0x47a0))), mload(add(transcript, 0x3880)), f_q))mstore(add(transcript, 0x47e0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x3880)), f_q))mstore(add(transcript, 0x4800), addmod(mload(add(transcript, 0x4760)), mload(add(transcript, 0x47c0)), f_q)){ let result := mulmod(mload(add(transcript, 0x8a0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4820), result) }mstore(add(transcript, 0x4840), mulmod(mload(add(transcript, 0x4820)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4860), mulmod(sub(f_q, mload(add(transcript, 0x4840))), mload(add(transcript, 0x38a0)), f_q))mstore(add(transcript, 0x4880), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x38a0)), f_q))mstore(add(transcript, 0x48a0), addmod(mload(add(transcript, 0x4800)), mload(add(transcript, 0x4860)), f_q))mstore(add(transcript, 0x48c0), mulmod(mload(add(transcript, 0x2dc0)), mload(add(transcript, 0x3500)), f_q))mstore(add(transcript, 0x48e0), mulmod(mload(add(transcript, 0x2de0)), mload(add(transcript, 0x3500)), f_q))mstore(add(transcript, 0x4900), mulmod(mload(add(transcript, 0x2e00)), mload(add(transcript, 0x3500)), f_q))mstore(add(transcript, 0x4920), mulmod(mload(add(transcript, 0x2e20)), mload(add(transcript, 0x3500)), f_q)){ let result := mulmod(mload(add(transcript, 0x2e40)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4940), result) }mstore(add(transcript, 0x4960), mulmod(mload(add(transcript, 0x4940)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4980), mulmod(sub(f_q, mload(add(transcript, 0x4960))), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x49a0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x49c0), mulmod(mload(add(transcript, 0x48c0)), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x49e0), mulmod(mload(add(transcript, 0x48e0)), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x4a00), mulmod(mload(add(transcript, 0x4900)), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x4a20), mulmod(mload(add(transcript, 0x4920)), mload(add(transcript, 0x38c0)), f_q))mstore(add(transcript, 0x4a40), addmod(mload(add(transcript, 0x48a0)), mload(add(transcript, 0x4980)), f_q)){ let result := mulmod(mload(add(transcript, 0x7e0)), mload(add(transcript, 0x3160)), f_q)mstore(add(transcript, 0x4a60), result) }mstore(add(transcript, 0x4a80), mulmod(mload(add(transcript, 0x4a60)), mload(add(transcript, 0x3700)), f_q))mstore(add(transcript, 0x4aa0), mulmod(sub(f_q, mload(add(transcript, 0x4a80))), mload(add(transcript, 0x38e0)), f_q))mstore(add(transcript, 0x4ac0), mulmod(mload(add(transcript, 0x3f60)), mload(add(transcript, 0x38e0)), f_q))mstore(add(transcript, 0x4ae0), addmod(mload(add(transcript, 0x4a40)), mload(add(transcript, 0x4aa0)), f_q))mstore(add(transcript, 0x4b00), mulmod(mload(add(transcript, 0x4ae0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4b20), mulmod(mload(add(transcript, 0x3fe0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4b40), mulmod(mload(add(transcript, 0x4060)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4b60), mulmod(mload(add(transcript, 0x4100)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4b80), mulmod(mload(add(transcript, 0x41a0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4ba0), mulmod(mload(add(transcript, 0x4240)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4bc0), mulmod(mload(add(transcript, 0x42e0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4be0), mulmod(mload(add(transcript, 0x4380)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4c00), mulmod(mload(add(transcript, 0x4420)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4c20), mulmod(mload(add(transcript, 0x44c0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4c40), mulmod(mload(add(transcript, 0x4560)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4c60), mulmod(mload(add(transcript, 0x4600)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4c80), mulmod(mload(add(transcript, 0x46a0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4ca0), mulmod(mload(add(transcript, 0x4740)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4cc0), mulmod(mload(add(transcript, 0x47e0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4ce0), mulmod(mload(add(transcript, 0x4880)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4d00), mulmod(mload(add(transcript, 0x49a0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4d20), mulmod(mload(add(transcript, 0x49c0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4d40), mulmod(mload(add(transcript, 0x49e0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4d60), mulmod(mload(add(transcript, 0x4a00)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4d80), mulmod(mload(add(transcript, 0x4a20)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4da0), mulmod(mload(add(transcript, 0x4ac0)), mload(add(transcript, 0x3960)), f_q))mstore(add(transcript, 0x4dc0), addmod(mload(add(transcript, 0x3f40)), mload(add(transcript, 0x4b00)), f_q))mstore(add(transcript, 0x4de0), mulmod(1, mload(add(transcript, 0x3020)), f_q))mstore(add(transcript, 0x4e00), mulmod(1, mload(add(transcript, 0xb20)), f_q))mstore(add(transcript, 0x4e20), 0x0000000000000000000000000000000000000000000000000000000000000001) mstore(add(transcript, 0x4e40), 0x0000000000000000000000000000000000000000000000000000000000000002)mstore(add(transcript, 0x4e60), mload(add(transcript, 0x4dc0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x4e20), 0x60, add(transcript, 0x4e20), 0x40), 1), success)mstore(add(transcript, 0x4e80), mload(add(transcript, 0x4e20))) mstore(add(transcript, 0x4ea0), mload(add(transcript, 0x4e40)))mstore(add(transcript, 0x4ec0), mload(add(transcript, 0x80))) mstore(add(transcript, 0x4ee0), mload(add(transcript, 0xa0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x4e80), 0x80, add(transcript, 0x4e80), 0x40), 1), success)mstore(add(transcript, 0x4f00), mload(add(transcript, 0xc0))) mstore(add(transcript, 0x4f20), mload(add(transcript, 0xe0)))mstore(add(transcript, 0x4f40), mload(add(transcript, 0x3ac0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x4f00), 0x60, add(transcript, 0x4f00), 0x40), 1), success)mstore(add(transcript, 0x4f60), mload(add(transcript, 0x4e80))) mstore(add(transcript, 0x4f80), mload(add(transcript, 0x4ea0)))mstore(add(transcript, 0x4fa0), mload(add(transcript, 0x4f00))) mstore(add(transcript, 0x4fc0), mload(add(transcript, 0x4f20)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x4f60), 0x80, add(transcript, 0x4f60), 0x40), 1), success)mstore(add(transcript, 0x4fe0), mload(add(transcript, 0x100))) mstore(add(transcript, 0x5000), mload(add(transcript, 0x120)))mstore(add(transcript, 0x5020), mload(add(transcript, 0x3ce0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x4fe0), 0x60, add(transcript, 0x4fe0), 0x40), 1), success)mstore(add(transcript, 0x5040), mload(add(transcript, 0x4f60))) mstore(add(transcript, 0x5060), mload(add(transcript, 0x4f80)))mstore(add(transcript, 0x5080), mload(add(transcript, 0x4fe0))) mstore(add(transcript, 0x50a0), mload(add(transcript, 0x5000)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5040), 0x80, add(transcript, 0x5040), 0x40), 1), success)mstore(add(transcript, 0x50c0), mload(add(transcript, 0x320))) mstore(add(transcript, 0x50e0), mload(add(transcript, 0x340)))mstore(add(transcript, 0x5100), mload(add(transcript, 0x3d00)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x50c0), 0x60, add(transcript, 0x50c0), 0x40), 1), success)mstore(add(transcript, 0x5120), mload(add(transcript, 0x5040))) mstore(add(transcript, 0x5140), mload(add(transcript, 0x5060)))mstore(add(transcript, 0x5160), mload(add(transcript, 0x50c0))) mstore(add(transcript, 0x5180), mload(add(transcript, 0x50e0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5120), 0x80, add(transcript, 0x5120), 0x40), 1), success)mstore(add(transcript, 0x51a0), mload(add(transcript, 0x360))) mstore(add(transcript, 0x51c0), mload(add(transcript, 0x380)))mstore(add(transcript, 0x51e0), mload(add(transcript, 0x3d20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x51a0), 0x60, add(transcript, 0x51a0), 0x40), 1), success)mstore(add(transcript, 0x5200), mload(add(transcript, 0x5120))) mstore(add(transcript, 0x5220), mload(add(transcript, 0x5140)))mstore(add(transcript, 0x5240), mload(add(transcript, 0x51a0))) mstore(add(transcript, 0x5260), mload(add(transcript, 0x51c0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5200), 0x80, add(transcript, 0x5200), 0x40), 1), success)mstore(add(transcript, 0x5280), mload(add(transcript, 0x2e0))) mstore(add(transcript, 0x52a0), mload(add(transcript, 0x300)))mstore(add(transcript, 0x52c0), mload(add(transcript, 0x3e20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5280), 0x60, add(transcript, 0x5280), 0x40), 1), success)mstore(add(transcript, 0x52e0), mload(add(transcript, 0x5200))) mstore(add(transcript, 0x5300), mload(add(transcript, 0x5220)))mstore(add(transcript, 0x5320), mload(add(transcript, 0x5280))) mstore(add(transcript, 0x5340), mload(add(transcript, 0x52a0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x52e0), 0x80, add(transcript, 0x52e0), 0x40), 1), success)mstore(add(transcript, 0x5360), mload(add(transcript, 0x1a0))) mstore(add(transcript, 0x5380), mload(add(transcript, 0x1c0)))mstore(add(transcript, 0x53a0), mload(add(transcript, 0x3f20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5360), 0x60, add(transcript, 0x5360), 0x40), 1), success)mstore(add(transcript, 0x53c0), mload(add(transcript, 0x52e0))) mstore(add(transcript, 0x53e0), mload(add(transcript, 0x5300)))mstore(add(transcript, 0x5400), mload(add(transcript, 0x5360))) mstore(add(transcript, 0x5420), mload(add(transcript, 0x5380)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x53c0), 0x80, add(transcript, 0x53c0), 0x40), 1), success)mstore(add(transcript, 0x5440), mload(add(transcript, 0x1e0))) mstore(add(transcript, 0x5460), mload(add(transcript, 0x200)))mstore(add(transcript, 0x5480), mload(add(transcript, 0x4b20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5440), 0x60, add(transcript, 0x5440), 0x40), 1), success)mstore(add(transcript, 0x54a0), mload(add(transcript, 0x53c0))) mstore(add(transcript, 0x54c0), mload(add(transcript, 0x53e0)))mstore(add(transcript, 0x54e0), mload(add(transcript, 0x5440))) mstore(add(transcript, 0x5500), mload(add(transcript, 0x5460)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x54a0), 0x80, add(transcript, 0x54a0), 0x40), 1), success)mstore(add(transcript, 0x5520), 0x0655d62979dc062dc1e8c15334bf17cf5c7e6352219c0bd0b0cc039598d9a669) mstore(add(transcript, 0x5540), 0x019589d3002f6a0ded46a69053f0c05e7a7ca45339b3d2bae85d00f26ac0f33e)mstore(add(transcript, 0x5560), mload(add(transcript, 0x4b40)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5520), 0x60, add(transcript, 0x5520), 0x40), 1), success)mstore(add(transcript, 0x5580), mload(add(transcript, 0x54a0))) mstore(add(transcript, 0x55a0), mload(add(transcript, 0x54c0)))mstore(add(transcript, 0x55c0), mload(add(transcript, 0x5520))) mstore(add(transcript, 0x55e0), mload(add(transcript, 0x5540)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5580), 0x80, add(transcript, 0x5580), 0x40), 1), success)mstore(add(transcript, 0x5600), 0x1eab999592385208b42a12dcc047763ee5cf12052eb4b0d9a7a286e043f3df9f) mstore(add(transcript, 0x5620), 0x18887eb3c646ffd4961226c91bac9661004798b1fc6a39c43f9a6d1d03767194)mstore(add(transcript, 0x5640), mload(add(transcript, 0x4b60)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5600), 0x60, add(transcript, 0x5600), 0x40), 1), success)mstore(add(transcript, 0x5660), mload(add(transcript, 0x5580))) mstore(add(transcript, 0x5680), mload(add(transcript, 0x55a0)))mstore(add(transcript, 0x56a0), mload(add(transcript, 0x5600))) mstore(add(transcript, 0x56c0), mload(add(transcript, 0x5620)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5660), 0x80, add(transcript, 0x5660), 0x40), 1), success)mstore(add(transcript, 0x56e0), 0x076806058b02e1b5e99b2f2e8eee613194f8df73481659f5938baacd64e4d7b8) mstore(add(transcript, 0x5700), 0x05ae81644b244dceea5350a84a79cbf0a199bbd6c1fad9887423f8c8048e6039)mstore(add(transcript, 0x5720), mload(add(transcript, 0x4b80)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x56e0), 0x60, add(transcript, 0x56e0), 0x40), 1), success)mstore(add(transcript, 0x5740), mload(add(transcript, 0x5660))) mstore(add(transcript, 0x5760), mload(add(transcript, 0x5680)))mstore(add(transcript, 0x5780), mload(add(transcript, 0x56e0))) mstore(add(transcript, 0x57a0), mload(add(transcript, 0x5700)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5740), 0x80, add(transcript, 0x5740), 0x40), 1), success)mstore(add(transcript, 0x57c0), 0x0438873fc00231ae527efcf74d9092f5059dfa05275cbe7381e948fe3b7b61d8) mstore(add(transcript, 0x57e0), 0x03c0f314c93403792ba86ec3841b3080f2f7cd092c6bcb632cdbc2122a13cdef)mstore(add(transcript, 0x5800), mload(add(transcript, 0x4ba0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x57c0), 0x60, add(transcript, 0x57c0), 0x40), 1), success)mstore(add(transcript, 0x5820), mload(add(transcript, 0x5740))) mstore(add(transcript, 0x5840), mload(add(transcript, 0x5760)))mstore(add(transcript, 0x5860), mload(add(transcript, 0x57c0))) mstore(add(transcript, 0x5880), mload(add(transcript, 0x57e0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5820), 0x80, add(transcript, 0x5820), 0x40), 1), success)mstore(add(transcript, 0x58a0), 0x2b12b132a6261ad60249147599cae0d5b3547e510deabba65526d130f04f2402) mstore(add(transcript, 0x58c0), 0x13e3c02ce00f6b7e00d5b099eda5f1155956ae83899a2d59cefcb00dad66a7f6)mstore(add(transcript, 0x58e0), mload(add(transcript, 0x4bc0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x58a0), 0x60, add(transcript, 0x58a0), 0x40), 1), success)mstore(add(transcript, 0x5900), mload(add(transcript, 0x5820))) mstore(add(transcript, 0x5920), mload(add(transcript, 0x5840)))mstore(add(transcript, 0x5940), mload(add(transcript, 0x58a0))) mstore(add(transcript, 0x5960), mload(add(transcript, 0x58c0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5900), 0x80, add(transcript, 0x5900), 0x40), 1), success)mstore(add(transcript, 0x5980), 0x0ed83370277e0fd35e8258dd5630ce0ce3491fdf7e166d293745635b0cc4eba5) mstore(add(transcript, 0x59a0), 0x03994e7e77ad58072b78757700ab0b79247f2e462b0cf6a5a18b607414c095db)mstore(add(transcript, 0x59c0), mload(add(transcript, 0x4be0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5980), 0x60, add(transcript, 0x5980), 0x40), 1), success)mstore(add(transcript, 0x59e0), mload(add(transcript, 0x5900))) mstore(add(transcript, 0x5a00), mload(add(transcript, 0x5920)))mstore(add(transcript, 0x5a20), mload(add(transcript, 0x5980))) mstore(add(transcript, 0x5a40), mload(add(transcript, 0x59a0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x59e0), 0x80, add(transcript, 0x59e0), 0x40), 1), success)mstore(add(transcript, 0x5a60), 0x23ba4bc49baab563e9d5bf07da231a4496d35b6bc782dbbd76135fe44c31cbcf) mstore(add(transcript, 0x5a80), 0x28b88097e7edf1b2904f6c25c1e30ca0e38c74a52125b2995c4cf0a750683854)mstore(add(transcript, 0x5aa0), mload(add(transcript, 0x4c00)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5a60), 0x60, add(transcript, 0x5a60), 0x40), 1), success)mstore(add(transcript, 0x5ac0), mload(add(transcript, 0x59e0))) mstore(add(transcript, 0x5ae0), mload(add(transcript, 0x5a00)))mstore(add(transcript, 0x5b00), mload(add(transcript, 0x5a60))) mstore(add(transcript, 0x5b20), mload(add(transcript, 0x5a80)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5ac0), 0x80, add(transcript, 0x5ac0), 0x40), 1), success)mstore(add(transcript, 0x5b40), 0x17dcbba0bbe2d24566de620998f62ff54ea5302ada6aeb18028b61b4dc19bbd3) mstore(add(transcript, 0x5b60), 0x0e1f908007a5c2cc934426c26de7206c53fa10c79d63ef52ee91bfb568c72fbd)mstore(add(transcript, 0x5b80), mload(add(transcript, 0x4c20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5b40), 0x60, add(transcript, 0x5b40), 0x40), 1), success)mstore(add(transcript, 0x5ba0), mload(add(transcript, 0x5ac0))) mstore(add(transcript, 0x5bc0), mload(add(transcript, 0x5ae0)))mstore(add(transcript, 0x5be0), mload(add(transcript, 0x5b40))) mstore(add(transcript, 0x5c00), mload(add(transcript, 0x5b60)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5ba0), 0x80, add(transcript, 0x5ba0), 0x40), 1), success)mstore(add(transcript, 0x5c20), 0x2c7823f99cb2adb716becb960914ffa1d6e2f257875fdd03c2bee52ef571d41e) mstore(add(transcript, 0x5c40), 0x09ab83ebc6803e65b2e6831c8706d9a134f6b1cf6f6ec5c2697afee095320ee1)mstore(add(transcript, 0x5c60), mload(add(transcript, 0x4c40)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5c20), 0x60, add(transcript, 0x5c20), 0x40), 1), success)mstore(add(transcript, 0x5c80), mload(add(transcript, 0x5ba0))) mstore(add(transcript, 0x5ca0), mload(add(transcript, 0x5bc0)))mstore(add(transcript, 0x5cc0), mload(add(transcript, 0x5c20))) mstore(add(transcript, 0x5ce0), mload(add(transcript, 0x5c40)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5c80), 0x80, add(transcript, 0x5c80), 0x40), 1), success)mstore(add(transcript, 0x5d00), 0x2dc12c205152bfacc354c838225571172c215e01a64de6a2ca6665c70937ac58) mstore(add(transcript, 0x5d20), 0x0449eb529f0038a2bd2f6c0b6213a70488b69b479d90a953579e4c9d45621b85)mstore(add(transcript, 0x5d40), mload(add(transcript, 0x4c60)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5d00), 0x60, add(transcript, 0x5d00), 0x40), 1), success)mstore(add(transcript, 0x5d60), mload(add(transcript, 0x5c80))) mstore(add(transcript, 0x5d80), mload(add(transcript, 0x5ca0)))mstore(add(transcript, 0x5da0), mload(add(transcript, 0x5d00))) mstore(add(transcript, 0x5dc0), mload(add(transcript, 0x5d20)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5d60), 0x80, add(transcript, 0x5d60), 0x40), 1), success)mstore(add(transcript, 0x5de0), 0x09a2ab3913a4770fd50f6ba9ec4ce0b3178b54d7bfca5b42fe7e8e1ce5cf60a9) mstore(add(transcript, 0x5e00), 0x13ec31f94026569c4bb76e2c4ceaa3e6525438ffb4a7a69cde61f6d77b93bad7)mstore(add(transcript, 0x5e20), mload(add(transcript, 0x4c80)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5de0), 0x60, add(transcript, 0x5de0), 0x40), 1), success)mstore(add(transcript, 0x5e40), mload(add(transcript, 0x5d60))) mstore(add(transcript, 0x5e60), mload(add(transcript, 0x5d80)))mstore(add(transcript, 0x5e80), mload(add(transcript, 0x5de0))) mstore(add(transcript, 0x5ea0), mload(add(transcript, 0x5e00)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5e40), 0x80, add(transcript, 0x5e40), 0x40), 1), success)mstore(add(transcript, 0x5ec0), 0x0743ea40f14084db2673217283aa053f986896ee7c181f52118442e99c452974) mstore(add(transcript, 0x5ee0), 0x0203e3493a2594ece57d22cc75dd081ac68271ec7c758153cfd2152bfb5c19e3)mstore(add(transcript, 0x5f00), mload(add(transcript, 0x4ca0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5ec0), 0x60, add(transcript, 0x5ec0), 0x40), 1), success)mstore(add(transcript, 0x5f20), mload(add(transcript, 0x5e40))) mstore(add(transcript, 0x5f40), mload(add(transcript, 0x5e60)))mstore(add(transcript, 0x5f60), mload(add(transcript, 0x5ec0))) mstore(add(transcript, 0x5f80), mload(add(transcript, 0x5ee0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x5f20), 0x80, add(transcript, 0x5f20), 0x40), 1), success)mstore(add(transcript, 0x5fa0), 0x02a9a77d8e6f6fd89f33ba56fe45f6f5c907e50ba28cdd4198acfb562eb21103) mstore(add(transcript, 0x5fc0), 0x23abee68d83c2d6632576e5e95ca01a61e5e3e6d9438c2ac6428c8b6edfe2aba)mstore(add(transcript, 0x5fe0), mload(add(transcript, 0x4cc0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x5fa0), 0x60, add(transcript, 0x5fa0), 0x40), 1), success)mstore(add(transcript, 0x6000), mload(add(transcript, 0x5f20))) mstore(add(transcript, 0x6020), mload(add(transcript, 0x5f40)))mstore(add(transcript, 0x6040), mload(add(transcript, 0x5fa0))) mstore(add(transcript, 0x6060), mload(add(transcript, 0x5fc0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6000), 0x80, add(transcript, 0x6000), 0x40), 1), success)mstore(add(transcript, 0x6080), 0x2cf36d36bfacbe1a8d8c626aefa75ac0feb46b725989a8e6fabed074bf9f6af7) mstore(add(transcript, 0x60a0), 0x060fded3ed5ec56d9e0064d73c472245a4c4b6ec371e9808692bf7f259d3b730)mstore(add(transcript, 0x60c0), mload(add(transcript, 0x4ce0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6080), 0x60, add(transcript, 0x6080), 0x40), 1), success)mstore(add(transcript, 0x60e0), mload(add(transcript, 0x6000))) mstore(add(transcript, 0x6100), mload(add(transcript, 0x6020)))mstore(add(transcript, 0x6120), mload(add(transcript, 0x6080))) mstore(add(transcript, 0x6140), mload(add(transcript, 0x60a0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x60e0), 0x80, add(transcript, 0x60e0), 0x40), 1), success)mstore(add(transcript, 0x6160), mload(add(transcript, 0x440))) mstore(add(transcript, 0x6180), mload(add(transcript, 0x460)))mstore(add(transcript, 0x61a0), mload(add(transcript, 0x4d00)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6160), 0x60, add(transcript, 0x6160), 0x40), 1), success)mstore(add(transcript, 0x61c0), mload(add(transcript, 0x60e0))) mstore(add(transcript, 0x61e0), mload(add(transcript, 0x6100)))mstore(add(transcript, 0x6200), mload(add(transcript, 0x6160))) mstore(add(transcript, 0x6220), mload(add(transcript, 0x6180)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x61c0), 0x80, add(transcript, 0x61c0), 0x40), 1), success)mstore(add(transcript, 0x6240), mload(add(transcript, 0x480))) mstore(add(transcript, 0x6260), mload(add(transcript, 0x4a0)))mstore(add(transcript, 0x6280), mload(add(transcript, 0x4d20)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6240), 0x60, add(transcript, 0x6240), 0x40), 1), success)mstore(add(transcript, 0x62a0), mload(add(transcript, 0x61c0))) mstore(add(transcript, 0x62c0), mload(add(transcript, 0x61e0)))mstore(add(transcript, 0x62e0), mload(add(transcript, 0x6240))) mstore(add(transcript, 0x6300), mload(add(transcript, 0x6260)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x62a0), 0x80, add(transcript, 0x62a0), 0x40), 1), success)mstore(add(transcript, 0x6320), mload(add(transcript, 0x4c0))) mstore(add(transcript, 0x6340), mload(add(transcript, 0x4e0)))mstore(add(transcript, 0x6360), mload(add(transcript, 0x4d40)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6320), 0x60, add(transcript, 0x6320), 0x40), 1), success)mstore(add(transcript, 0x6380), mload(add(transcript, 0x62a0))) mstore(add(transcript, 0x63a0), mload(add(transcript, 0x62c0)))mstore(add(transcript, 0x63c0), mload(add(transcript, 0x6320))) mstore(add(transcript, 0x63e0), mload(add(transcript, 0x6340)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6380), 0x80, add(transcript, 0x6380), 0x40), 1), success)mstore(add(transcript, 0x6400), mload(add(transcript, 0x500))) mstore(add(transcript, 0x6420), mload(add(transcript, 0x520)))mstore(add(transcript, 0x6440), mload(add(transcript, 0x4d60)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6400), 0x60, add(transcript, 0x6400), 0x40), 1), success)mstore(add(transcript, 0x6460), mload(add(transcript, 0x6380))) mstore(add(transcript, 0x6480), mload(add(transcript, 0x63a0)))mstore(add(transcript, 0x64a0), mload(add(transcript, 0x6400))) mstore(add(transcript, 0x64c0), mload(add(transcript, 0x6420)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6460), 0x80, add(transcript, 0x6460), 0x40), 1), success)mstore(add(transcript, 0x64e0), mload(add(transcript, 0x540))) mstore(add(transcript, 0x6500), mload(add(transcript, 0x560)))mstore(add(transcript, 0x6520), mload(add(transcript, 0x4d80)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x64e0), 0x60, add(transcript, 0x64e0), 0x40), 1), success)mstore(add(transcript, 0x6540), mload(add(transcript, 0x6460))) mstore(add(transcript, 0x6560), mload(add(transcript, 0x6480)))mstore(add(transcript, 0x6580), mload(add(transcript, 0x64e0))) mstore(add(transcript, 0x65a0), mload(add(transcript, 0x6500)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6540), 0x80, add(transcript, 0x6540), 0x40), 1), success)mstore(add(transcript, 0x65c0), mload(add(transcript, 0x3a0))) mstore(add(transcript, 0x65e0), mload(add(transcript, 0x3c0)))mstore(add(transcript, 0x6600), mload(add(transcript, 0x4da0)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x65c0), 0x60, add(transcript, 0x65c0), 0x40), 1), success)mstore(add(transcript, 0x6620), mload(add(transcript, 0x6540))) mstore(add(transcript, 0x6640), mload(add(transcript, 0x6560)))mstore(add(transcript, 0x6660), mload(add(transcript, 0x65c0))) mstore(add(transcript, 0x6680), mload(add(transcript, 0x65e0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6620), 0x80, add(transcript, 0x6620), 0x40), 1), success)mstore(add(transcript, 0x66a0), mload(add(transcript, 0xac0))) mstore(add(transcript, 0x66c0), mload(add(transcript, 0xae0)))mstore(add(transcript, 0x66e0), sub(f_q, mload(add(transcript, 0x4de0))))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x66a0), 0x60, add(transcript, 0x66a0), 0x40), 1), success)mstore(add(transcript, 0x6700), mload(add(transcript, 0x6620))) mstore(add(transcript, 0x6720), mload(add(transcript, 0x6640)))mstore(add(transcript, 0x6740), mload(add(transcript, 0x66a0))) mstore(add(transcript, 0x6760), mload(add(transcript, 0x66c0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x6700), 0x80, add(transcript, 0x6700), 0x40), 1), success)mstore(add(transcript, 0x6780), mload(add(transcript, 0xb60))) mstore(add(transcript, 0x67a0), mload(add(transcript, 0xb80)))mstore(add(transcript, 0x67c0), mload(add(transcript, 0x4e00)))success := and(eq(staticcall(gas(), 0x7, add(transcript, 0x6780), 0x60, add(transcript, 0x6780), 0x40), 1), success)mstore(add(transcript, 0x67e0), mload(add(transcript, 0x6700))) mstore(add(transcript, 0x6800), mload(add(transcript, 0x6720)))mstore(add(transcript, 0x6820), mload(add(transcript, 0x6780))) mstore(add(transcript, 0x6840), mload(add(transcript, 0x67a0)))success := and(eq(staticcall(gas(), 0x6, add(transcript, 0x67e0), 0x80, add(transcript, 0x67e0), 0x40), 1), success)mstore(add(transcript, 0x6860), mload(add(transcript, 0x67e0))) mstore(add(transcript, 0x6880), mload(add(transcript, 0x6800)))mstore(add(transcript, 0x68a0), 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2) mstore(add(transcript, 0x68c0), 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed) mstore(add(transcript, 0x68e0), 0x090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b) mstore(add(transcript, 0x6900), 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa)mstore(add(transcript, 0x6920), mload(add(transcript, 0xb60))) mstore(add(transcript, 0x6940), mload(add(transcript, 0xb80)))mstore(add(transcript, 0x6960), 0x26186a2d65ee4d2f9c9a5b91f86597d35f192cd120caf7e935d8443d1938e23d) mstore(add(transcript, 0x6980), 0x30441fd1b5d3370482c42152a8899027716989a6996c2535bc9f7fee8aaef79e) mstore(add(transcript, 0x69a0), 0x16f363f103c80d7bbc8ad3c6867e0822bbc6000be91a4689755c7df40221c145) mstore(add(transcript, 0x69c0), 0x2b1cbb3e521edf5a622d82762a44a5e63f1e50b332d71154a4a7958d6011deff)success := and(eq(staticcall(gas(), 0x8, add(transcript, 0x6860), 0x180, add(transcript, 0x6860), 0x20), 1), success)success := and(eq(mload(add(transcript, 0x6860)), 1), success)} return success; } } diff --git a/contracts/src/SolvencyVerifier.yul b/contracts/src/SolvencyVerifier.yul deleted file mode 100644 index d72d7d0e..00000000 --- a/contracts/src/SolvencyVerifier.yul +++ /dev/null @@ -1,1418 +0,0 @@ - - object "plonk_verifier" { - code { - function allocate(size) -> ptr { - ptr := mload(0x40) - if eq(ptr, 0) { ptr := 0x60 } - mstore(0x40, add(ptr, size)) - } - let size := datasize("Runtime") - let offset := allocate(size) - datacopy(offset, dataoffset("Runtime"), size) - return(offset, size) - } - object "Runtime" { - code { - let success:bool := true - let f_p := 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47 - let f_q := 0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 - function validate_ec_point(x, y) -> valid:bool { - { - let x_lt_p:bool := lt(x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - let y_lt_p:bool := lt(y, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - valid := and(x_lt_p, y_lt_p) - } - { - let y_square := mulmod(y, y, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - let x_square := mulmod(x, x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - let x_cube := mulmod(x_square, x, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - let x_cube_plus_3 := addmod(x_cube, 3, 0x30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47) - let is_affine:bool := eq(x_cube_plus_3, y_square) - valid := and(valid, is_affine) - } - } - mstore(0x20, mod(calldataload(0x0), f_q)) -mstore(0x40, mod(calldataload(0x20), f_q)) -mstore(0x60, mod(calldataload(0x40), f_q)) -mstore(0x0, 308492134225063399814226381520525808113815168934209933683689315739401114858) - - { - let x := calldataload(0x60) - mstore(0x80, x) - let y := calldataload(0x80) - mstore(0xa0, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0xa0) - mstore(0xc0, x) - let y := calldataload(0xc0) - mstore(0xe0, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0xe0) - mstore(0x100, x) - let y := calldataload(0x100) - mstore(0x120, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0x140, keccak256(0x0, 320)) -{ - let hash := mload(0x140) - mstore(0x160, mod(hash, f_q)) - mstore(0x180, hash) - } - - { - let x := calldataload(0x120) - mstore(0x1a0, x) - let y := calldataload(0x140) - mstore(0x1c0, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x160) - mstore(0x1e0, x) - let y := calldataload(0x180) - mstore(0x200, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0x220, keccak256(0x180, 160)) -{ - let hash := mload(0x220) - mstore(0x240, mod(hash, f_q)) - mstore(0x260, hash) - } -mstore8(640, 1) -mstore(0x280, keccak256(0x260, 33)) -{ - let hash := mload(0x280) - mstore(0x2a0, mod(hash, f_q)) - mstore(0x2c0, hash) - } - - { - let x := calldataload(0x1a0) - mstore(0x2e0, x) - let y := calldataload(0x1c0) - mstore(0x300, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x1e0) - mstore(0x320, x) - let y := calldataload(0x200) - mstore(0x340, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x220) - mstore(0x360, x) - let y := calldataload(0x240) - mstore(0x380, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x260) - mstore(0x3a0, x) - let y := calldataload(0x280) - mstore(0x3c0, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0x3e0, keccak256(0x2c0, 288)) -{ - let hash := mload(0x3e0) - mstore(0x400, mod(hash, f_q)) - mstore(0x420, hash) - } - - { - let x := calldataload(0x2a0) - mstore(0x440, x) - let y := calldataload(0x2c0) - mstore(0x460, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x2e0) - mstore(0x480, x) - let y := calldataload(0x300) - mstore(0x4a0, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x320) - mstore(0x4c0, x) - let y := calldataload(0x340) - mstore(0x4e0, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x360) - mstore(0x500, x) - let y := calldataload(0x380) - mstore(0x520, y) - success := and(validate_ec_point(x, y), success) - } - - { - let x := calldataload(0x3a0) - mstore(0x540, x) - let y := calldataload(0x3c0) - mstore(0x560, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0x580, keccak256(0x420, 352)) -{ - let hash := mload(0x580) - mstore(0x5a0, mod(hash, f_q)) - mstore(0x5c0, hash) - } -mstore(0x5e0, mod(calldataload(0x3e0), f_q)) -mstore(0x600, mod(calldataload(0x400), f_q)) -mstore(0x620, mod(calldataload(0x420), f_q)) -mstore(0x640, mod(calldataload(0x440), f_q)) -mstore(0x660, mod(calldataload(0x460), f_q)) -mstore(0x680, mod(calldataload(0x480), f_q)) -mstore(0x6a0, mod(calldataload(0x4a0), f_q)) -mstore(0x6c0, mod(calldataload(0x4c0), f_q)) -mstore(0x6e0, mod(calldataload(0x4e0), f_q)) -mstore(0x700, mod(calldataload(0x500), f_q)) -mstore(0x720, mod(calldataload(0x520), f_q)) -mstore(0x740, mod(calldataload(0x540), f_q)) -mstore(0x760, mod(calldataload(0x560), f_q)) -mstore(0x780, mod(calldataload(0x580), f_q)) -mstore(0x7a0, mod(calldataload(0x5a0), f_q)) -mstore(0x7c0, mod(calldataload(0x5c0), f_q)) -mstore(0x7e0, mod(calldataload(0x5e0), f_q)) -mstore(0x800, mod(calldataload(0x600), f_q)) -mstore(0x820, mod(calldataload(0x620), f_q)) -mstore(0x840, mod(calldataload(0x640), f_q)) -mstore(0x860, mod(calldataload(0x660), f_q)) -mstore(0x880, mod(calldataload(0x680), f_q)) -mstore(0x8a0, mod(calldataload(0x6a0), f_q)) -mstore(0x8c0, mod(calldataload(0x6c0), f_q)) -mstore(0x8e0, mod(calldataload(0x6e0), f_q)) -mstore(0x900, mod(calldataload(0x700), f_q)) -mstore(0x920, mod(calldataload(0x720), f_q)) -mstore(0x940, mod(calldataload(0x740), f_q)) -mstore(0x960, mod(calldataload(0x760), f_q)) -mstore(0x980, mod(calldataload(0x780), f_q)) -mstore(0x9a0, mod(calldataload(0x7a0), f_q)) -mstore(0x9c0, mod(calldataload(0x7c0), f_q)) -mstore(0x9e0, mod(calldataload(0x7e0), f_q)) -mstore(0xa00, keccak256(0x5c0, 1088)) -{ - let hash := mload(0xa00) - mstore(0xa20, mod(hash, f_q)) - mstore(0xa40, hash) - } -mstore8(2656, 1) -mstore(0xa60, keccak256(0xa40, 33)) -{ - let hash := mload(0xa60) - mstore(0xa80, mod(hash, f_q)) - mstore(0xaa0, hash) - } - - { - let x := calldataload(0x800) - mstore(0xac0, x) - let y := calldataload(0x820) - mstore(0xae0, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0xb00, keccak256(0xaa0, 96)) -{ - let hash := mload(0xb00) - mstore(0xb20, mod(hash, f_q)) - mstore(0xb40, hash) - } - - { - let x := calldataload(0x840) - mstore(0xb60, x) - let y := calldataload(0x860) - mstore(0xb80, y) - success := and(validate_ec_point(x, y), success) - } -mstore(0xba0, mulmod(mload(0x5a0), mload(0x5a0), f_q)) -mstore(0xbc0, mulmod(mload(0xba0), mload(0xba0), f_q)) -mstore(0xbe0, mulmod(mload(0xbc0), mload(0xbc0), f_q)) -mstore(0xc00, mulmod(mload(0xbe0), mload(0xbe0), f_q)) -mstore(0xc20, mulmod(mload(0xc00), mload(0xc00), f_q)) -mstore(0xc40, mulmod(mload(0xc20), mload(0xc20), f_q)) -mstore(0xc60, mulmod(mload(0xc40), mload(0xc40), f_q)) -mstore(0xc80, mulmod(mload(0xc60), mload(0xc60), f_q)) -mstore(0xca0, mulmod(mload(0xc80), mload(0xc80), f_q)) -mstore(0xcc0, mulmod(mload(0xca0), mload(0xca0), f_q)) -mstore(0xce0, addmod(mload(0xcc0), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q)) -mstore(0xd00, mulmod(mload(0xce0), 21866867634659744680037180739646672280844703888306253060159436409049855557633, f_q)) -mstore(0xd20, mulmod(mload(0xd00), 9936069627611189518829255670237324269287146421271524553312532036927871056678, f_q)) -mstore(0xd40, addmod(mload(0x5a0), 11952173244228085703417150075019950819261217979144509790385672149647937438939, f_q)) -mstore(0xd60, mulmod(mload(0xd00), 1680739780407307830605919050682431078078760076686599579086116998224280619988, f_q)) -mstore(0xd80, addmod(mload(0x5a0), 20207503091431967391640486694574844010469604323729434764612087188351527875629, f_q)) -mstore(0xda0, mulmod(mload(0xd00), 14158528901797138466244491986759313854666262535363044392173788062030301470987, f_q)) -mstore(0xdc0, addmod(mload(0x5a0), 7729713970042136756001913758497961233882101865052989951524416124545507024630, f_q)) -mstore(0xde0, mulmod(mload(0xd00), 15699029810934084314820646074566828280617789951162923449200398535581206172418, f_q)) -mstore(0xe00, addmod(mload(0x5a0), 6189213060905190907425759670690446807930574449253110894497805650994602323199, f_q)) -mstore(0xe20, mulmod(mload(0xd00), 4260969412351770314333984243767775737437927068151180798236715529158398853173, f_q)) -mstore(0xe40, addmod(mload(0x5a0), 17627273459487504907912421501489499351110437332264853545461488657417409642444, f_q)) -mstore(0xe60, mulmod(mload(0xd00), 4925592601992654644734291590386747644864797672605745962807370354577123815907, f_q)) -mstore(0xe80, addmod(mload(0x5a0), 16962650269846620577512114154870527443683566727810288380890833831998684679710, f_q)) -mstore(0xea0, mulmod(mload(0xd00), 1, f_q)) -mstore(0xec0, addmod(mload(0x5a0), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q)) -mstore(0xee0, mulmod(mload(0xd00), 19380560087801265747114831706136320509424814679569278834391540198888293317501, f_q)) -mstore(0xf00, addmod(mload(0x5a0), 2507682784038009475131574039120954579123549720846755509306663987687515178116, f_q)) -mstore(0xf20, mulmod(mload(0xd00), 6252951856119339508807713076978770803512896272623217303779254502899773638908, f_q)) -mstore(0xf40, addmod(mload(0x5a0), 15635291015719935713438692668278504285035468127792817039918949683676034856709, f_q)) -{ - let prod := mload(0xd40) - - prod := mulmod(mload(0xd80), prod, f_q) - mstore(0xf60, prod) - - prod := mulmod(mload(0xdc0), prod, f_q) - mstore(0xf80, prod) - - prod := mulmod(mload(0xe00), prod, f_q) - mstore(0xfa0, prod) - - prod := mulmod(mload(0xe40), prod, f_q) - mstore(0xfc0, prod) - - prod := mulmod(mload(0xe80), prod, f_q) - mstore(0xfe0, prod) - - prod := mulmod(mload(0xec0), prod, f_q) - mstore(0x1000, prod) - - prod := mulmod(mload(0xf00), prod, f_q) - mstore(0x1020, prod) - - prod := mulmod(mload(0xf40), prod, f_q) - mstore(0x1040, prod) - - prod := mulmod(mload(0xce0), prod, f_q) - mstore(0x1060, prod) - - } -mstore(0x10a0, 32) -mstore(0x10c0, 32) -mstore(0x10e0, 32) -mstore(0x1100, mload(0x1060)) -mstore(0x1120, 21888242871839275222246405745257275088548364400416034343698204186575808495615) -mstore(0x1140, 21888242871839275222246405745257275088548364400416034343698204186575808495617) -success := and(eq(staticcall(gas(), 0x5, 0x10a0, 0xc0, 0x1080, 0x20), 1), success) -{ - - let inv := mload(0x1080) - let v - - v := mload(0xce0) - mstore(3296, mulmod(mload(0x1040), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xf40) - mstore(3904, mulmod(mload(0x1020), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xf00) - mstore(3840, mulmod(mload(0x1000), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xec0) - mstore(3776, mulmod(mload(0xfe0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xe80) - mstore(3712, mulmod(mload(0xfc0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xe40) - mstore(3648, mulmod(mload(0xfa0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xe00) - mstore(3584, mulmod(mload(0xf80), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xdc0) - mstore(3520, mulmod(mload(0xf60), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0xd80) - mstore(3456, mulmod(mload(0xd40), inv, f_q)) - inv := mulmod(v, inv, f_q) - mstore(0xd40, inv) - - } -mstore(0x1160, mulmod(mload(0xd20), mload(0xd40), f_q)) -mstore(0x1180, mulmod(mload(0xd60), mload(0xd80), f_q)) -mstore(0x11a0, mulmod(mload(0xda0), mload(0xdc0), f_q)) -mstore(0x11c0, mulmod(mload(0xde0), mload(0xe00), f_q)) -mstore(0x11e0, mulmod(mload(0xe20), mload(0xe40), f_q)) -mstore(0x1200, mulmod(mload(0xe60), mload(0xe80), f_q)) -mstore(0x1220, mulmod(mload(0xea0), mload(0xec0), f_q)) -mstore(0x1240, mulmod(mload(0xee0), mload(0xf00), f_q)) -mstore(0x1260, mulmod(mload(0xf20), mload(0xf40), f_q)) -{ - let result := mulmod(mload(0x1220), mload(0x20), f_q) -result := addmod(mulmod(mload(0x1240), mload(0x40), f_q), result, f_q) -result := addmod(mulmod(mload(0x1260), mload(0x60), f_q), result, f_q) -mstore(4736, result) - } -mstore(0x12a0, addmod(mload(0x5e0), mload(0x720), f_q)) -mstore(0x12c0, mulmod(mload(0x12a0), mload(0x12a0), f_q)) -mstore(0x12e0, mulmod(mload(0x12c0), mload(0x12c0), f_q)) -mstore(0x1300, mulmod(mload(0x12a0), mload(0x12e0), f_q)) -mstore(0x1320, mulmod(mload(0x1300), 2910766817845651019878574839501801340070030115151021261302834310722729507541, f_q)) -mstore(0x1340, addmod(mload(0x600), mload(0x740), f_q)) -mstore(0x1360, mulmod(mload(0x1340), mload(0x1340), f_q)) -mstore(0x1380, mulmod(mload(0x1360), mload(0x1360), f_q)) -mstore(0x13a0, mulmod(mload(0x1340), mload(0x1380), f_q)) -mstore(0x13c0, mulmod(mload(0x13a0), 19727366863391167538122140361473584127147630672623100827934084310230022599144, f_q)) -mstore(0x13e0, addmod(mload(0x1320), mload(0x13c0), f_q)) -mstore(0x1400, addmod(mload(0x13e0), sub(f_q, mload(0x620)), f_q)) -mstore(0x1420, mulmod(mload(0x1400), mload(0x7a0), f_q)) -mstore(0x1440, mulmod(mload(0x400), mload(0x1420), f_q)) -mstore(0x1460, mulmod(mload(0x1300), 5776684794125549462448597414050232243778680302179439492664047328281728356345, f_q)) -mstore(0x1480, mulmod(mload(0x13a0), 8348174920934122550483593999453880006756108121341067172388445916328941978568, f_q)) -mstore(0x14a0, addmod(mload(0x1460), mload(0x1480), f_q)) -mstore(0x14c0, addmod(mload(0x14a0), sub(f_q, mload(0x640)), f_q)) -mstore(0x14e0, mulmod(mload(0x14c0), mload(0x7a0), f_q)) -mstore(0x1500, addmod(mload(0x1440), mload(0x14e0), f_q)) -mstore(0x1520, mulmod(mload(0x400), mload(0x1500), f_q)) -mstore(0x1540, addmod(mload(0x1300), sub(f_q, mload(0x660)), f_q)) -mstore(0x1560, mulmod(mload(0x1540), mload(0x7c0), f_q)) -mstore(0x1580, addmod(mload(0x1520), mload(0x1560), f_q)) -mstore(0x15a0, mulmod(mload(0x400), mload(0x1580), f_q)) -mstore(0x15c0, mulmod(mload(0x660), 2910766817845651019878574839501801340070030115151021261302834310722729507541, f_q)) -mstore(0x15e0, mulmod(mload(0x1340), 19727366863391167538122140361473584127147630672623100827934084310230022599144, f_q)) -mstore(0x1600, addmod(mload(0x15c0), mload(0x15e0), f_q)) -mstore(0x1620, addmod(mload(0x1600), mload(0x6e0), f_q)) -mstore(0x1640, mulmod(mload(0x1620), mload(0x1620), f_q)) -mstore(0x1660, mulmod(mload(0x1640), mload(0x1640), f_q)) -mstore(0x1680, mulmod(mload(0x1620), mload(0x1660), f_q)) -mstore(0x16a0, mulmod(mload(0x620), 8897705321156975119607866206188469715432233408805434913352778521345836531302, f_q)) -mstore(0x16c0, mulmod(mload(0x640), 13897810991298242824030978581179475767377101082166056046492926701399149797630, f_q)) -mstore(0x16e0, addmod(mload(0x16a0), mload(0x16c0), f_q)) -mstore(0x1700, addmod(mload(0x1680), sub(f_q, mload(0x16e0)), f_q)) -mstore(0x1720, mulmod(mload(0x1700), mload(0x7c0), f_q)) -mstore(0x1740, addmod(mload(0x15a0), mload(0x1720), f_q)) -mstore(0x1760, mulmod(mload(0x400), mload(0x1740), f_q)) -mstore(0x1780, mulmod(mload(0x660), 5776684794125549462448597414050232243778680302179439492664047328281728356345, f_q)) -mstore(0x17a0, mulmod(mload(0x1340), 8348174920934122550483593999453880006756108121341067172388445916328941978568, f_q)) -mstore(0x17c0, addmod(mload(0x1780), mload(0x17a0), f_q)) -mstore(0x17e0, addmod(mload(0x17c0), mload(0x700), f_q)) -mstore(0x1800, mulmod(mload(0x620), 7127083008168878795310303301757642617203533252990949589494537404444738046722, f_q)) -mstore(0x1820, mulmod(mload(0x640), 10251091711782631878897995303436082826711938358699127319815611151510940403902, f_q)) -mstore(0x1840, addmod(mload(0x1800), mload(0x1820), f_q)) -mstore(0x1860, addmod(mload(0x17e0), sub(f_q, mload(0x1840)), f_q)) -mstore(0x1880, mulmod(mload(0x1860), mload(0x7c0), f_q)) -mstore(0x18a0, addmod(mload(0x1760), mload(0x1880), f_q)) -mstore(0x18c0, mulmod(mload(0x400), mload(0x18a0), f_q)) -mstore(0x18e0, addmod(1, sub(f_q, mload(0x780)), f_q)) -mstore(0x1900, mulmod(mload(0x18e0), mload(0x780), f_q)) -mstore(0x1920, addmod(2, sub(f_q, mload(0x780)), f_q)) -mstore(0x1940, mulmod(mload(0x1920), mload(0x1900), f_q)) -mstore(0x1960, addmod(3, sub(f_q, mload(0x780)), f_q)) -mstore(0x1980, mulmod(mload(0x1960), mload(0x1940), f_q)) -mstore(0x19a0, addmod(mload(0x6a0), mload(0x5e0), f_q)) -mstore(0x19c0, addmod(mload(0x19a0), sub(f_q, mload(0x620)), f_q)) -mstore(0x19e0, mulmod(mload(0x19c0), mload(0x1980), f_q)) -mstore(0x1a00, addmod(mload(0x18c0), mload(0x19e0), f_q)) -mstore(0x1a20, mulmod(mload(0x400), mload(0x1a00), f_q)) -mstore(0x1a40, addmod(mload(0x680), sub(f_q, mload(0x640)), f_q)) -mstore(0x1a60, mulmod(mload(0x1a40), mload(0x1980), f_q)) -mstore(0x1a80, addmod(mload(0x1a20), mload(0x1a60), f_q)) -mstore(0x1aa0, mulmod(mload(0x400), mload(0x1a80), f_q)) -mstore(0x1ac0, mulmod(mload(0x1920), mload(0x780), f_q)) -mstore(0x1ae0, mulmod(mload(0x1960), mload(0x1ac0), f_q)) -mstore(0x1b00, addmod(4, sub(f_q, mload(0x780)), f_q)) -mstore(0x1b20, mulmod(mload(0x1b00), mload(0x1ae0), f_q)) -mstore(0x1b40, mulmod(mload(0x660), mload(0x1b20), f_q)) -mstore(0x1b60, addmod(1, sub(f_q, mload(0x660)), f_q)) -mstore(0x1b80, mulmod(mload(0x1b60), mload(0x1b40), f_q)) -mstore(0x1ba0, addmod(mload(0x1aa0), mload(0x1b80), f_q)) -mstore(0x1bc0, mulmod(mload(0x400), mload(0x1ba0), f_q)) -mstore(0x1be0, mulmod(2, mload(0x660), f_q)) -mstore(0x1c00, addmod(mload(0x600), sub(f_q, mload(0x5e0)), f_q)) -mstore(0x1c20, mulmod(mload(0x1c00), mload(0x1be0), f_q)) -mstore(0x1c40, addmod(mload(0x620), sub(f_q, mload(0x5e0)), f_q)) -mstore(0x1c60, addmod(mload(0x1c20), sub(f_q, mload(0x1c40)), f_q)) -mstore(0x1c80, addmod(mload(0x600), sub(f_q, mload(0x640)), f_q)) -mstore(0x1ca0, addmod(mload(0x1c60), sub(f_q, mload(0x1c80)), f_q)) -mstore(0x1cc0, mulmod(mload(0x1ca0), mload(0x1b20), f_q)) -mstore(0x1ce0, addmod(mload(0x1bc0), mload(0x1cc0), f_q)) -mstore(0x1d00, mulmod(mload(0x400), mload(0x1ce0), f_q)) -mstore(0x1d20, mulmod(mload(0x1960), mload(0x1900), f_q)) -mstore(0x1d40, mulmod(mload(0x1b00), mload(0x1d20), f_q)) -mstore(0x1d60, addmod(mload(0x5e0), mload(0x600), f_q)) -mstore(0x1d80, addmod(mload(0x1d60), sub(f_q, mload(0x660)), f_q)) -mstore(0x1da0, mulmod(mload(0x1d80), mload(0x1d40), f_q)) -mstore(0x1dc0, addmod(mload(0x1d00), mload(0x1da0), f_q)) -mstore(0x1de0, mulmod(mload(0x400), mload(0x1dc0), f_q)) -mstore(0x1e00, addmod(mload(0x1de0), mload(0x1da0), f_q)) -mstore(0x1e20, mulmod(mload(0x400), mload(0x1e00), f_q)) -mstore(0x1e40, mulmod(mload(0x1b00), mload(0x1940), f_q)) -mstore(0x1e60, addmod(mload(0x5e0), sub(f_q, mload(0x600)), f_q)) -mstore(0x1e80, addmod(mload(0x1e60), 5192296858534827628530496329220096, f_q)) -mstore(0x1ea0, addmod(mload(0x1e80), sub(f_q, mload(0x660)), f_q)) -mstore(0x1ec0, mulmod(mload(0x1ea0), mload(0x1e40), f_q)) -mstore(0x1ee0, addmod(mload(0x1e20), mload(0x1ec0), f_q)) -mstore(0x1f00, mulmod(mload(0x400), mload(0x1ee0), f_q)) -mstore(0x1f20, addmod(1, sub(f_q, mload(0x8c0)), f_q)) -mstore(0x1f40, mulmod(mload(0x1f20), mload(0x1220), f_q)) -mstore(0x1f60, addmod(mload(0x1f00), mload(0x1f40), f_q)) -mstore(0x1f80, mulmod(mload(0x400), mload(0x1f60), f_q)) -mstore(0x1fa0, mulmod(mload(0x920), mload(0x920), f_q)) -mstore(0x1fc0, addmod(mload(0x1fa0), sub(f_q, mload(0x920)), f_q)) -mstore(0x1fe0, mulmod(mload(0x1fc0), mload(0x1160), f_q)) -mstore(0x2000, addmod(mload(0x1f80), mload(0x1fe0), f_q)) -mstore(0x2020, mulmod(mload(0x400), mload(0x2000), f_q)) -mstore(0x2040, addmod(mload(0x920), sub(f_q, mload(0x900)), f_q)) -mstore(0x2060, mulmod(mload(0x2040), mload(0x1220), f_q)) -mstore(0x2080, addmod(mload(0x2020), mload(0x2060), f_q)) -mstore(0x20a0, mulmod(mload(0x400), mload(0x2080), f_q)) -mstore(0x20c0, addmod(1, sub(f_q, mload(0x1160)), f_q)) -mstore(0x20e0, addmod(mload(0x1180), mload(0x11a0), f_q)) -mstore(0x2100, addmod(mload(0x20e0), mload(0x11c0), f_q)) -mstore(0x2120, addmod(mload(0x2100), mload(0x11e0), f_q)) -mstore(0x2140, addmod(mload(0x2120), mload(0x1200), f_q)) -mstore(0x2160, addmod(mload(0x20c0), sub(f_q, mload(0x2140)), f_q)) -mstore(0x2180, mulmod(mload(0x800), mload(0x240), f_q)) -mstore(0x21a0, addmod(mload(0x6e0), mload(0x2180), f_q)) -mstore(0x21c0, addmod(mload(0x21a0), mload(0x2a0), f_q)) -mstore(0x21e0, mulmod(mload(0x820), mload(0x240), f_q)) -mstore(0x2200, addmod(mload(0x5e0), mload(0x21e0), f_q)) -mstore(0x2220, addmod(mload(0x2200), mload(0x2a0), f_q)) -mstore(0x2240, mulmod(mload(0x2220), mload(0x21c0), f_q)) -mstore(0x2260, mulmod(mload(0x840), mload(0x240), f_q)) -mstore(0x2280, addmod(mload(0x600), mload(0x2260), f_q)) -mstore(0x22a0, addmod(mload(0x2280), mload(0x2a0), f_q)) -mstore(0x22c0, mulmod(mload(0x22a0), mload(0x2240), f_q)) -mstore(0x22e0, mulmod(mload(0x860), mload(0x240), f_q)) -mstore(0x2300, addmod(mload(0x700), mload(0x22e0), f_q)) -mstore(0x2320, addmod(mload(0x2300), mload(0x2a0), f_q)) -mstore(0x2340, mulmod(mload(0x2320), mload(0x22c0), f_q)) -mstore(0x2360, mulmod(mload(0x2340), mload(0x8e0), f_q)) -mstore(0x2380, mulmod(1, mload(0x240), f_q)) -mstore(0x23a0, mulmod(mload(0x5a0), mload(0x2380), f_q)) -mstore(0x23c0, addmod(mload(0x6e0), mload(0x23a0), f_q)) -mstore(0x23e0, addmod(mload(0x23c0), mload(0x2a0), f_q)) -mstore(0x2400, mulmod(4131629893567559867359510883348571134090853742863529169391034518566172092834, mload(0x240), f_q)) -mstore(0x2420, mulmod(mload(0x5a0), mload(0x2400), f_q)) -mstore(0x2440, addmod(mload(0x5e0), mload(0x2420), f_q)) -mstore(0x2460, addmod(mload(0x2440), mload(0x2a0), f_q)) -mstore(0x2480, mulmod(mload(0x2460), mload(0x23e0), f_q)) -mstore(0x24a0, mulmod(8910878055287538404433155982483128285667088683464058436815641868457422632747, mload(0x240), f_q)) -mstore(0x24c0, mulmod(mload(0x5a0), mload(0x24a0), f_q)) -mstore(0x24e0, addmod(mload(0x600), mload(0x24c0), f_q)) -mstore(0x2500, addmod(mload(0x24e0), mload(0x2a0), f_q)) -mstore(0x2520, mulmod(mload(0x2500), mload(0x2480), f_q)) -mstore(0x2540, mulmod(11166246659983828508719468090013646171463329086121580628794302409516816350802, mload(0x240), f_q)) -mstore(0x2560, mulmod(mload(0x5a0), mload(0x2540), f_q)) -mstore(0x2580, addmod(mload(0x700), mload(0x2560), f_q)) -mstore(0x25a0, addmod(mload(0x2580), mload(0x2a0), f_q)) -mstore(0x25c0, mulmod(mload(0x25a0), mload(0x2520), f_q)) -mstore(0x25e0, mulmod(mload(0x25c0), mload(0x8c0), f_q)) -mstore(0x2600, addmod(mload(0x2360), sub(f_q, mload(0x25e0)), f_q)) -mstore(0x2620, mulmod(mload(0x2600), mload(0x2160), f_q)) -mstore(0x2640, addmod(mload(0x20a0), mload(0x2620), f_q)) -mstore(0x2660, mulmod(mload(0x400), mload(0x2640), f_q)) -mstore(0x2680, mulmod(mload(0x880), mload(0x240), f_q)) -mstore(0x26a0, addmod(mload(0x660), mload(0x2680), f_q)) -mstore(0x26c0, addmod(mload(0x26a0), mload(0x2a0), f_q)) -mstore(0x26e0, mulmod(mload(0x8a0), mload(0x240), f_q)) -mstore(0x2700, addmod(mload(0x1280), mload(0x26e0), f_q)) -mstore(0x2720, addmod(mload(0x2700), mload(0x2a0), f_q)) -mstore(0x2740, mulmod(mload(0x2720), mload(0x26c0), f_q)) -mstore(0x2760, mulmod(mload(0x2740), mload(0x940), f_q)) -mstore(0x2780, mulmod(284840088355319032285349970403338060113257071685626700086398481893096618818, mload(0x240), f_q)) -mstore(0x27a0, mulmod(mload(0x5a0), mload(0x2780), f_q)) -mstore(0x27c0, addmod(mload(0x660), mload(0x27a0), f_q)) -mstore(0x27e0, addmod(mload(0x27c0), mload(0x2a0), f_q)) -mstore(0x2800, mulmod(21134065618345176623193549882539580312263652408302468683943992798037078993309, mload(0x240), f_q)) -mstore(0x2820, mulmod(mload(0x5a0), mload(0x2800), f_q)) -mstore(0x2840, addmod(mload(0x1280), mload(0x2820), f_q)) -mstore(0x2860, addmod(mload(0x2840), mload(0x2a0), f_q)) -mstore(0x2880, mulmod(mload(0x2860), mload(0x27e0), f_q)) -mstore(0x28a0, mulmod(mload(0x2880), mload(0x920), f_q)) -mstore(0x28c0, addmod(mload(0x2760), sub(f_q, mload(0x28a0)), f_q)) -mstore(0x28e0, mulmod(mload(0x28c0), mload(0x2160), f_q)) -mstore(0x2900, addmod(mload(0x2660), mload(0x28e0), f_q)) -mstore(0x2920, mulmod(mload(0x400), mload(0x2900), f_q)) -mstore(0x2940, addmod(1, sub(f_q, mload(0x960)), f_q)) -mstore(0x2960, mulmod(mload(0x2940), mload(0x1220), f_q)) -mstore(0x2980, addmod(mload(0x2920), mload(0x2960), f_q)) -mstore(0x29a0, mulmod(mload(0x400), mload(0x2980), f_q)) -mstore(0x29c0, mulmod(mload(0x960), mload(0x960), f_q)) -mstore(0x29e0, addmod(mload(0x29c0), sub(f_q, mload(0x960)), f_q)) -mstore(0x2a00, mulmod(mload(0x29e0), mload(0x1160), f_q)) -mstore(0x2a20, addmod(mload(0x29a0), mload(0x2a00), f_q)) -mstore(0x2a40, mulmod(mload(0x400), mload(0x2a20), f_q)) -mstore(0x2a60, addmod(mload(0x9a0), mload(0x240), f_q)) -mstore(0x2a80, mulmod(mload(0x2a60), mload(0x980), f_q)) -mstore(0x2aa0, addmod(mload(0x9e0), mload(0x2a0), f_q)) -mstore(0x2ac0, mulmod(mload(0x2aa0), mload(0x2a80), f_q)) -mstore(0x2ae0, mulmod(256, mload(0x6c0), f_q)) -mstore(0x2b00, addmod(mload(0x660), sub(f_q, mload(0x2ae0)), f_q)) -mstore(0x2b20, mulmod(mload(0x2b00), mload(0x760), f_q)) -mstore(0x2b40, addmod(mload(0x2b20), mload(0x240), f_q)) -mstore(0x2b60, mulmod(mload(0x2b40), mload(0x960), f_q)) -mstore(0x2b80, addmod(mload(0x720), mload(0x2a0), f_q)) -mstore(0x2ba0, mulmod(mload(0x2b80), mload(0x2b60), f_q)) -mstore(0x2bc0, addmod(mload(0x2ac0), sub(f_q, mload(0x2ba0)), f_q)) -mstore(0x2be0, mulmod(mload(0x2bc0), mload(0x2160), f_q)) -mstore(0x2c00, addmod(mload(0x2a40), mload(0x2be0), f_q)) -mstore(0x2c20, mulmod(mload(0x400), mload(0x2c00), f_q)) -mstore(0x2c40, addmod(mload(0x9a0), sub(f_q, mload(0x9e0)), f_q)) -mstore(0x2c60, mulmod(mload(0x2c40), mload(0x1220), f_q)) -mstore(0x2c80, addmod(mload(0x2c20), mload(0x2c60), f_q)) -mstore(0x2ca0, mulmod(mload(0x400), mload(0x2c80), f_q)) -mstore(0x2cc0, mulmod(mload(0x2c40), mload(0x2160), f_q)) -mstore(0x2ce0, addmod(mload(0x9a0), sub(f_q, mload(0x9c0)), f_q)) -mstore(0x2d00, mulmod(mload(0x2ce0), mload(0x2cc0), f_q)) -mstore(0x2d20, addmod(mload(0x2ca0), mload(0x2d00), f_q)) -mstore(0x2d40, mulmod(mload(0xcc0), mload(0xcc0), f_q)) -mstore(0x2d60, mulmod(mload(0x2d40), mload(0xcc0), f_q)) -mstore(0x2d80, mulmod(mload(0x2d60), mload(0xcc0), f_q)) -mstore(0x2da0, mulmod(mload(0x2d80), mload(0xcc0), f_q)) -mstore(0x2dc0, mulmod(1, mload(0xcc0), f_q)) -mstore(0x2de0, mulmod(1, mload(0x2d40), f_q)) -mstore(0x2e00, mulmod(1, mload(0x2d60), f_q)) -mstore(0x2e20, mulmod(1, mload(0x2d80), f_q)) -mstore(0x2e40, mulmod(mload(0x2d20), mload(0xce0), f_q)) -mstore(0x2e60, mulmod(mload(0xba0), mload(0x5a0), f_q)) -mstore(0x2e80, mulmod(mload(0x5a0), 1, f_q)) -mstore(0x2ea0, addmod(mload(0xb20), sub(f_q, mload(0x2e80)), f_q)) -mstore(0x2ec0, mulmod(mload(0x5a0), 4925592601992654644734291590386747644864797672605745962807370354577123815907, f_q)) -mstore(0x2ee0, addmod(mload(0xb20), sub(f_q, mload(0x2ec0)), f_q)) -mstore(0x2f00, mulmod(mload(0x5a0), 9936069627611189518829255670237324269287146421271524553312532036927871056678, f_q)) -mstore(0x2f20, addmod(mload(0xb20), sub(f_q, mload(0x2f00)), f_q)) -mstore(0x2f40, mulmod(mload(0x5a0), 19380560087801265747114831706136320509424814679569278834391540198888293317501, f_q)) -mstore(0x2f60, addmod(mload(0xb20), sub(f_q, mload(0x2f40)), f_q)) -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 19470333053884630052643688193991482022807116448657043890197497819686199857828, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 2417909817954645169602717551265793065741247951758990453500706366889608637789, f_q), f_q), result, f_q) -mstore(12160, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 13686227242150003628673578706486473027501243666075718775893288845164412632930, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 10079503758141076467065204586507257535549232608832327988764044976944819876346, f_q), f_q), result, f_q) -mstore(12192, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 18715936898160381416714524359517348601997944075114713669820885373469568354766, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 15375775075249615866494035504844970190233299190010037655541891534730124992278, f_q), f_q), result, f_q) -mstore(12224, result) - } -mstore(0x2fe0, mulmod(1, mload(0x2ea0), f_q)) -mstore(0x3000, mulmod(mload(0x2fe0), mload(0x2f60), f_q)) -mstore(0x3020, mulmod(mload(0x3000), mload(0x2ee0), f_q)) -{ - let result := mulmod(mload(0xb20), mulmod(mload(0x5a0), 2507682784038009475131574039120954579123549720846755509306663987687515178117, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0x5a0), 19380560087801265747114831706136320509424814679569278834391540198888293317500, f_q), f_q), result, f_q) -mstore(12352, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0x5a0), 19380560087801265747114831706136320509424814679569278834391540198888293317500, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0x5a0), 13127608231681926238307118629157549705911918406946061530612285695988519678593, f_q), f_q), result, f_q) -mstore(12384, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 16140595808673403009154643164823336476463527776677864878778453135559733237044, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 5747647063165872213091762580433938612084836623738169464919751051016075258573, f_q), f_q), result, f_q) -mstore(12416, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 17015964487361230672162623735654618573844832338054897787312333529290879253714, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 3176732791729641355588945816447819802711920387939493967460175841862547409845, f_q), f_q), result, f_q) -mstore(12448, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0xba0), 19187508498431587163140984396833674282302409422288044257471288693049179355069, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0xba0), 17472297497993506786357772047295541913219081564856233764575529621311665103799, f_q), f_q), result, f_q) -mstore(12480, result) - } -mstore(0x30e0, mulmod(mload(0x3000), mload(0x2f20), f_q)) -{ - let result := mulmod(mload(0xb20), mulmod(mload(0x5a0), 16962650269846620577512114154870527443683566727810288380890833831998684679711, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0x5a0), 4925592601992654644734291590386747644864797672605745962807370354577123815906, f_q), f_q), result, f_q) -mstore(12544, result) - } -{ - let result := mulmod(mload(0xb20), mulmod(mload(0x5a0), 4925592601992654644734291590386747644864797672605745962807370354577123815906, f_q), f_q) -result := addmod(mulmod(mload(0x5a0), mulmod(mload(0x5a0), 664623189640884330400307346618971907426870604454565164570654825418724962734, f_q), f_q), result, f_q) -mstore(12576, result) - } -mstore(0x3140, mulmod(mload(0x2fe0), mload(0x2ee0), f_q)) -{ - let result := mulmod(mload(0xb20), 1, f_q) -result := addmod(mulmod(mload(0x5a0), 21888242871839275222246405745257275088548364400416034343698204186575808495616, f_q), result, f_q) -mstore(12640, result) - } -{ - let prod := mload(0x2f80) - - prod := mulmod(mload(0x2fa0), prod, f_q) - mstore(0x3180, prod) - - prod := mulmod(mload(0x2fc0), prod, f_q) - mstore(0x31a0, prod) - - prod := mulmod(mload(0x3040), prod, f_q) - mstore(0x31c0, prod) - - prod := mulmod(mload(0x3060), prod, f_q) - mstore(0x31e0, prod) - - prod := mulmod(mload(0x3000), prod, f_q) - mstore(0x3200, prod) - - prod := mulmod(mload(0x3080), prod, f_q) - mstore(0x3220, prod) - - prod := mulmod(mload(0x30a0), prod, f_q) - mstore(0x3240, prod) - - prod := mulmod(mload(0x30c0), prod, f_q) - mstore(0x3260, prod) - - prod := mulmod(mload(0x30e0), prod, f_q) - mstore(0x3280, prod) - - prod := mulmod(mload(0x3100), prod, f_q) - mstore(0x32a0, prod) - - prod := mulmod(mload(0x3120), prod, f_q) - mstore(0x32c0, prod) - - prod := mulmod(mload(0x3140), prod, f_q) - mstore(0x32e0, prod) - - prod := mulmod(mload(0x3160), prod, f_q) - mstore(0x3300, prod) - - prod := mulmod(mload(0x2fe0), prod, f_q) - mstore(0x3320, prod) - - } -mstore(0x3360, 32) -mstore(0x3380, 32) -mstore(0x33a0, 32) -mstore(0x33c0, mload(0x3320)) -mstore(0x33e0, 21888242871839275222246405745257275088548364400416034343698204186575808495615) -mstore(0x3400, 21888242871839275222246405745257275088548364400416034343698204186575808495617) -success := and(eq(staticcall(gas(), 0x5, 0x3360, 0xc0, 0x3340, 0x20), 1), success) -{ - - let inv := mload(0x3340) - let v - - v := mload(0x2fe0) - mstore(12256, mulmod(mload(0x3300), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3160) - mstore(12640, mulmod(mload(0x32e0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3140) - mstore(12608, mulmod(mload(0x32c0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3120) - mstore(12576, mulmod(mload(0x32a0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3100) - mstore(12544, mulmod(mload(0x3280), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x30e0) - mstore(12512, mulmod(mload(0x3260), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x30c0) - mstore(12480, mulmod(mload(0x3240), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x30a0) - mstore(12448, mulmod(mload(0x3220), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3080) - mstore(12416, mulmod(mload(0x3200), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3000) - mstore(12288, mulmod(mload(0x31e0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3060) - mstore(12384, mulmod(mload(0x31c0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3040) - mstore(12352, mulmod(mload(0x31a0), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x2fc0) - mstore(12224, mulmod(mload(0x3180), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x2fa0) - mstore(12192, mulmod(mload(0x2f80), inv, f_q)) - inv := mulmod(v, inv, f_q) - mstore(0x2f80, inv) - - } -{ - let result := mload(0x2f80) -result := addmod(mload(0x2fa0), result, f_q) -result := addmod(mload(0x2fc0), result, f_q) -mstore(13344, result) - } -mstore(0x3440, mulmod(mload(0x3020), mload(0x3000), f_q)) -{ - let result := mload(0x3040) -result := addmod(mload(0x3060), result, f_q) -mstore(13408, result) - } -mstore(0x3480, mulmod(mload(0x3020), mload(0x30e0), f_q)) -{ - let result := mload(0x3080) -result := addmod(mload(0x30a0), result, f_q) -result := addmod(mload(0x30c0), result, f_q) -mstore(13472, result) - } -mstore(0x34c0, mulmod(mload(0x3020), mload(0x3140), f_q)) -{ - let result := mload(0x3100) -result := addmod(mload(0x3120), result, f_q) -mstore(13536, result) - } -mstore(0x3500, mulmod(mload(0x3020), mload(0x2fe0), f_q)) -{ - let result := mload(0x3160) -mstore(13600, result) - } -{ - let prod := mload(0x3420) - - prod := mulmod(mload(0x3460), prod, f_q) - mstore(0x3540, prod) - - prod := mulmod(mload(0x34a0), prod, f_q) - mstore(0x3560, prod) - - prod := mulmod(mload(0x34e0), prod, f_q) - mstore(0x3580, prod) - - prod := mulmod(mload(0x3520), prod, f_q) - mstore(0x35a0, prod) - - } -mstore(0x35e0, 32) -mstore(0x3600, 32) -mstore(0x3620, 32) -mstore(0x3640, mload(0x35a0)) -mstore(0x3660, 21888242871839275222246405745257275088548364400416034343698204186575808495615) -mstore(0x3680, 21888242871839275222246405745257275088548364400416034343698204186575808495617) -success := and(eq(staticcall(gas(), 0x5, 0x35e0, 0xc0, 0x35c0, 0x20), 1), success) -{ - - let inv := mload(0x35c0) - let v - - v := mload(0x3520) - mstore(13600, mulmod(mload(0x3580), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x34e0) - mstore(13536, mulmod(mload(0x3560), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x34a0) - mstore(13472, mulmod(mload(0x3540), inv, f_q)) - inv := mulmod(v, inv, f_q) - - v := mload(0x3460) - mstore(13408, mulmod(mload(0x3420), inv, f_q)) - inv := mulmod(v, inv, f_q) - mstore(0x3420, inv) - - } -mstore(0x36a0, mulmod(mload(0x3440), mload(0x3460), f_q)) -mstore(0x36c0, mulmod(mload(0x3480), mload(0x34a0), f_q)) -mstore(0x36e0, mulmod(mload(0x34c0), mload(0x34e0), f_q)) -mstore(0x3700, mulmod(mload(0x3500), mload(0x3520), f_q)) -mstore(0x3720, mulmod(mload(0xa20), mload(0xa20), f_q)) -mstore(0x3740, mulmod(mload(0x3720), mload(0xa20), f_q)) -mstore(0x3760, mulmod(mload(0x3740), mload(0xa20), f_q)) -mstore(0x3780, mulmod(mload(0x3760), mload(0xa20), f_q)) -mstore(0x37a0, mulmod(mload(0x3780), mload(0xa20), f_q)) -mstore(0x37c0, mulmod(mload(0x37a0), mload(0xa20), f_q)) -mstore(0x37e0, mulmod(mload(0x37c0), mload(0xa20), f_q)) -mstore(0x3800, mulmod(mload(0x37e0), mload(0xa20), f_q)) -mstore(0x3820, mulmod(mload(0x3800), mload(0xa20), f_q)) -mstore(0x3840, mulmod(mload(0x3820), mload(0xa20), f_q)) -mstore(0x3860, mulmod(mload(0x3840), mload(0xa20), f_q)) -mstore(0x3880, mulmod(mload(0x3860), mload(0xa20), f_q)) -mstore(0x38a0, mulmod(mload(0x3880), mload(0xa20), f_q)) -mstore(0x38c0, mulmod(mload(0x38a0), mload(0xa20), f_q)) -mstore(0x38e0, mulmod(mload(0x38c0), mload(0xa20), f_q)) -mstore(0x3900, mulmod(mload(0x38e0), mload(0xa20), f_q)) -mstore(0x3920, mulmod(mload(0xa80), mload(0xa80), f_q)) -mstore(0x3940, mulmod(mload(0x3920), mload(0xa80), f_q)) -mstore(0x3960, mulmod(mload(0x3940), mload(0xa80), f_q)) -mstore(0x3980, mulmod(mload(0x3960), mload(0xa80), f_q)) -{ - let result := mulmod(mload(0x5e0), mload(0x2f80), f_q) -result := addmod(mulmod(mload(0x620), mload(0x2fa0), f_q), result, f_q) -result := addmod(mulmod(mload(0x6a0), mload(0x2fc0), f_q), result, f_q) -mstore(14752, result) - } -mstore(0x39c0, mulmod(mload(0x39a0), mload(0x3420), f_q)) -mstore(0x39e0, mulmod(sub(f_q, mload(0x39c0)), 1, f_q)) -{ - let result := mulmod(mload(0x600), mload(0x2f80), f_q) -result := addmod(mulmod(mload(0x640), mload(0x2fa0), f_q), result, f_q) -result := addmod(mulmod(mload(0x680), mload(0x2fc0), f_q), result, f_q) -mstore(14848, result) - } -mstore(0x3a20, mulmod(mload(0x3a00), mload(0x3420), f_q)) -mstore(0x3a40, mulmod(sub(f_q, mload(0x3a20)), mload(0xa20), f_q)) -mstore(0x3a60, mulmod(1, mload(0xa20), f_q)) -mstore(0x3a80, addmod(mload(0x39e0), mload(0x3a40), f_q)) -mstore(0x3aa0, mulmod(mload(0x3a80), 1, f_q)) -mstore(0x3ac0, mulmod(mload(0x3a60), 1, f_q)) -mstore(0x3ae0, mulmod(1, mload(0x3440), f_q)) -{ - let result := mulmod(mload(0x660), mload(0x3040), f_q) -result := addmod(mulmod(mload(0x6c0), mload(0x3060), f_q), result, f_q) -mstore(15104, result) - } -mstore(0x3b20, mulmod(mload(0x3b00), mload(0x36a0), f_q)) -mstore(0x3b40, mulmod(sub(f_q, mload(0x3b20)), 1, f_q)) -mstore(0x3b60, mulmod(mload(0x3ae0), 1, f_q)) -{ - let result := mulmod(mload(0x920), mload(0x3040), f_q) -result := addmod(mulmod(mload(0x940), mload(0x3060), f_q), result, f_q) -mstore(15232, result) - } -mstore(0x3ba0, mulmod(mload(0x3b80), mload(0x36a0), f_q)) -mstore(0x3bc0, mulmod(sub(f_q, mload(0x3ba0)), mload(0xa20), f_q)) -mstore(0x3be0, mulmod(mload(0x3ae0), mload(0xa20), f_q)) -mstore(0x3c00, addmod(mload(0x3b40), mload(0x3bc0), f_q)) -{ - let result := mulmod(mload(0x960), mload(0x3040), f_q) -result := addmod(mulmod(mload(0x980), mload(0x3060), f_q), result, f_q) -mstore(15392, result) - } -mstore(0x3c40, mulmod(mload(0x3c20), mload(0x36a0), f_q)) -mstore(0x3c60, mulmod(sub(f_q, mload(0x3c40)), mload(0x3720), f_q)) -mstore(0x3c80, mulmod(mload(0x3ae0), mload(0x3720), f_q)) -mstore(0x3ca0, addmod(mload(0x3c00), mload(0x3c60), f_q)) -mstore(0x3cc0, mulmod(mload(0x3ca0), mload(0xa80), f_q)) -mstore(0x3ce0, mulmod(mload(0x3b60), mload(0xa80), f_q)) -mstore(0x3d00, mulmod(mload(0x3be0), mload(0xa80), f_q)) -mstore(0x3d20, mulmod(mload(0x3c80), mload(0xa80), f_q)) -mstore(0x3d40, addmod(mload(0x3aa0), mload(0x3cc0), f_q)) -mstore(0x3d60, mulmod(1, mload(0x3480), f_q)) -{ - let result := mulmod(mload(0x8c0), mload(0x3080), f_q) -result := addmod(mulmod(mload(0x8e0), mload(0x30a0), f_q), result, f_q) -result := addmod(mulmod(mload(0x900), mload(0x30c0), f_q), result, f_q) -mstore(15744, result) - } -mstore(0x3da0, mulmod(mload(0x3d80), mload(0x36c0), f_q)) -mstore(0x3dc0, mulmod(sub(f_q, mload(0x3da0)), 1, f_q)) -mstore(0x3de0, mulmod(mload(0x3d60), 1, f_q)) -mstore(0x3e00, mulmod(mload(0x3dc0), mload(0x3920), f_q)) -mstore(0x3e20, mulmod(mload(0x3de0), mload(0x3920), f_q)) -mstore(0x3e40, addmod(mload(0x3d40), mload(0x3e00), f_q)) -mstore(0x3e60, mulmod(1, mload(0x34c0), f_q)) -{ - let result := mulmod(mload(0x9a0), mload(0x3100), f_q) -result := addmod(mulmod(mload(0x9c0), mload(0x3120), f_q), result, f_q) -mstore(16000, result) - } -mstore(0x3ea0, mulmod(mload(0x3e80), mload(0x36e0), f_q)) -mstore(0x3ec0, mulmod(sub(f_q, mload(0x3ea0)), 1, f_q)) -mstore(0x3ee0, mulmod(mload(0x3e60), 1, f_q)) -mstore(0x3f00, mulmod(mload(0x3ec0), mload(0x3940), f_q)) -mstore(0x3f20, mulmod(mload(0x3ee0), mload(0x3940), f_q)) -mstore(0x3f40, addmod(mload(0x3e40), mload(0x3f00), f_q)) -mstore(0x3f60, mulmod(1, mload(0x3500), f_q)) -{ - let result := mulmod(mload(0x9e0), mload(0x3160), f_q) -mstore(16256, result) - } -mstore(0x3fa0, mulmod(mload(0x3f80), mload(0x3700), f_q)) -mstore(0x3fc0, mulmod(sub(f_q, mload(0x3fa0)), 1, f_q)) -mstore(0x3fe0, mulmod(mload(0x3f60), 1, f_q)) -{ - let result := mulmod(mload(0x6e0), mload(0x3160), f_q) -mstore(16384, result) - } -mstore(0x4020, mulmod(mload(0x4000), mload(0x3700), f_q)) -mstore(0x4040, mulmod(sub(f_q, mload(0x4020)), mload(0xa20), f_q)) -mstore(0x4060, mulmod(mload(0x3f60), mload(0xa20), f_q)) -mstore(0x4080, addmod(mload(0x3fc0), mload(0x4040), f_q)) -{ - let result := mulmod(mload(0x700), mload(0x3160), f_q) -mstore(16544, result) - } -mstore(0x40c0, mulmod(mload(0x40a0), mload(0x3700), f_q)) -mstore(0x40e0, mulmod(sub(f_q, mload(0x40c0)), mload(0x3720), f_q)) -mstore(0x4100, mulmod(mload(0x3f60), mload(0x3720), f_q)) -mstore(0x4120, addmod(mload(0x4080), mload(0x40e0), f_q)) -{ - let result := mulmod(mload(0x720), mload(0x3160), f_q) -mstore(16704, result) - } -mstore(0x4160, mulmod(mload(0x4140), mload(0x3700), f_q)) -mstore(0x4180, mulmod(sub(f_q, mload(0x4160)), mload(0x3740), f_q)) -mstore(0x41a0, mulmod(mload(0x3f60), mload(0x3740), f_q)) -mstore(0x41c0, addmod(mload(0x4120), mload(0x4180), f_q)) -{ - let result := mulmod(mload(0x740), mload(0x3160), f_q) -mstore(16864, result) - } -mstore(0x4200, mulmod(mload(0x41e0), mload(0x3700), f_q)) -mstore(0x4220, mulmod(sub(f_q, mload(0x4200)), mload(0x3760), f_q)) -mstore(0x4240, mulmod(mload(0x3f60), mload(0x3760), f_q)) -mstore(0x4260, addmod(mload(0x41c0), mload(0x4220), f_q)) -{ - let result := mulmod(mload(0x760), mload(0x3160), f_q) -mstore(17024, result) - } -mstore(0x42a0, mulmod(mload(0x4280), mload(0x3700), f_q)) -mstore(0x42c0, mulmod(sub(f_q, mload(0x42a0)), mload(0x3780), f_q)) -mstore(0x42e0, mulmod(mload(0x3f60), mload(0x3780), f_q)) -mstore(0x4300, addmod(mload(0x4260), mload(0x42c0), f_q)) -{ - let result := mulmod(mload(0x780), mload(0x3160), f_q) -mstore(17184, result) - } -mstore(0x4340, mulmod(mload(0x4320), mload(0x3700), f_q)) -mstore(0x4360, mulmod(sub(f_q, mload(0x4340)), mload(0x37a0), f_q)) -mstore(0x4380, mulmod(mload(0x3f60), mload(0x37a0), f_q)) -mstore(0x43a0, addmod(mload(0x4300), mload(0x4360), f_q)) -{ - let result := mulmod(mload(0x7a0), mload(0x3160), f_q) -mstore(17344, result) - } -mstore(0x43e0, mulmod(mload(0x43c0), mload(0x3700), f_q)) -mstore(0x4400, mulmod(sub(f_q, mload(0x43e0)), mload(0x37c0), f_q)) -mstore(0x4420, mulmod(mload(0x3f60), mload(0x37c0), f_q)) -mstore(0x4440, addmod(mload(0x43a0), mload(0x4400), f_q)) -{ - let result := mulmod(mload(0x7c0), mload(0x3160), f_q) -mstore(17504, result) - } -mstore(0x4480, mulmod(mload(0x4460), mload(0x3700), f_q)) -mstore(0x44a0, mulmod(sub(f_q, mload(0x4480)), mload(0x37e0), f_q)) -mstore(0x44c0, mulmod(mload(0x3f60), mload(0x37e0), f_q)) -mstore(0x44e0, addmod(mload(0x4440), mload(0x44a0), f_q)) -{ - let result := mulmod(mload(0x800), mload(0x3160), f_q) -mstore(17664, result) - } -mstore(0x4520, mulmod(mload(0x4500), mload(0x3700), f_q)) -mstore(0x4540, mulmod(sub(f_q, mload(0x4520)), mload(0x3800), f_q)) -mstore(0x4560, mulmod(mload(0x3f60), mload(0x3800), f_q)) -mstore(0x4580, addmod(mload(0x44e0), mload(0x4540), f_q)) -{ - let result := mulmod(mload(0x820), mload(0x3160), f_q) -mstore(17824, result) - } -mstore(0x45c0, mulmod(mload(0x45a0), mload(0x3700), f_q)) -mstore(0x45e0, mulmod(sub(f_q, mload(0x45c0)), mload(0x3820), f_q)) -mstore(0x4600, mulmod(mload(0x3f60), mload(0x3820), f_q)) -mstore(0x4620, addmod(mload(0x4580), mload(0x45e0), f_q)) -{ - let result := mulmod(mload(0x840), mload(0x3160), f_q) -mstore(17984, result) - } -mstore(0x4660, mulmod(mload(0x4640), mload(0x3700), f_q)) -mstore(0x4680, mulmod(sub(f_q, mload(0x4660)), mload(0x3840), f_q)) -mstore(0x46a0, mulmod(mload(0x3f60), mload(0x3840), f_q)) -mstore(0x46c0, addmod(mload(0x4620), mload(0x4680), f_q)) -{ - let result := mulmod(mload(0x860), mload(0x3160), f_q) -mstore(18144, result) - } -mstore(0x4700, mulmod(mload(0x46e0), mload(0x3700), f_q)) -mstore(0x4720, mulmod(sub(f_q, mload(0x4700)), mload(0x3860), f_q)) -mstore(0x4740, mulmod(mload(0x3f60), mload(0x3860), f_q)) -mstore(0x4760, addmod(mload(0x46c0), mload(0x4720), f_q)) -{ - let result := mulmod(mload(0x880), mload(0x3160), f_q) -mstore(18304, result) - } -mstore(0x47a0, mulmod(mload(0x4780), mload(0x3700), f_q)) -mstore(0x47c0, mulmod(sub(f_q, mload(0x47a0)), mload(0x3880), f_q)) -mstore(0x47e0, mulmod(mload(0x3f60), mload(0x3880), f_q)) -mstore(0x4800, addmod(mload(0x4760), mload(0x47c0), f_q)) -{ - let result := mulmod(mload(0x8a0), mload(0x3160), f_q) -mstore(18464, result) - } -mstore(0x4840, mulmod(mload(0x4820), mload(0x3700), f_q)) -mstore(0x4860, mulmod(sub(f_q, mload(0x4840)), mload(0x38a0), f_q)) -mstore(0x4880, mulmod(mload(0x3f60), mload(0x38a0), f_q)) -mstore(0x48a0, addmod(mload(0x4800), mload(0x4860), f_q)) -mstore(0x48c0, mulmod(mload(0x2dc0), mload(0x3500), f_q)) -mstore(0x48e0, mulmod(mload(0x2de0), mload(0x3500), f_q)) -mstore(0x4900, mulmod(mload(0x2e00), mload(0x3500), f_q)) -mstore(0x4920, mulmod(mload(0x2e20), mload(0x3500), f_q)) -{ - let result := mulmod(mload(0x2e40), mload(0x3160), f_q) -mstore(18752, result) - } -mstore(0x4960, mulmod(mload(0x4940), mload(0x3700), f_q)) -mstore(0x4980, mulmod(sub(f_q, mload(0x4960)), mload(0x38c0), f_q)) -mstore(0x49a0, mulmod(mload(0x3f60), mload(0x38c0), f_q)) -mstore(0x49c0, mulmod(mload(0x48c0), mload(0x38c0), f_q)) -mstore(0x49e0, mulmod(mload(0x48e0), mload(0x38c0), f_q)) -mstore(0x4a00, mulmod(mload(0x4900), mload(0x38c0), f_q)) -mstore(0x4a20, mulmod(mload(0x4920), mload(0x38c0), f_q)) -mstore(0x4a40, addmod(mload(0x48a0), mload(0x4980), f_q)) -{ - let result := mulmod(mload(0x7e0), mload(0x3160), f_q) -mstore(19040, result) - } -mstore(0x4a80, mulmod(mload(0x4a60), mload(0x3700), f_q)) -mstore(0x4aa0, mulmod(sub(f_q, mload(0x4a80)), mload(0x38e0), f_q)) -mstore(0x4ac0, mulmod(mload(0x3f60), mload(0x38e0), f_q)) -mstore(0x4ae0, addmod(mload(0x4a40), mload(0x4aa0), f_q)) -mstore(0x4b00, mulmod(mload(0x4ae0), mload(0x3960), f_q)) -mstore(0x4b20, mulmod(mload(0x3fe0), mload(0x3960), f_q)) -mstore(0x4b40, mulmod(mload(0x4060), mload(0x3960), f_q)) -mstore(0x4b60, mulmod(mload(0x4100), mload(0x3960), f_q)) -mstore(0x4b80, mulmod(mload(0x41a0), mload(0x3960), f_q)) -mstore(0x4ba0, mulmod(mload(0x4240), mload(0x3960), f_q)) -mstore(0x4bc0, mulmod(mload(0x42e0), mload(0x3960), f_q)) -mstore(0x4be0, mulmod(mload(0x4380), mload(0x3960), f_q)) -mstore(0x4c00, mulmod(mload(0x4420), mload(0x3960), f_q)) -mstore(0x4c20, mulmod(mload(0x44c0), mload(0x3960), f_q)) -mstore(0x4c40, mulmod(mload(0x4560), mload(0x3960), f_q)) -mstore(0x4c60, mulmod(mload(0x4600), mload(0x3960), f_q)) -mstore(0x4c80, mulmod(mload(0x46a0), mload(0x3960), f_q)) -mstore(0x4ca0, mulmod(mload(0x4740), mload(0x3960), f_q)) -mstore(0x4cc0, mulmod(mload(0x47e0), mload(0x3960), f_q)) -mstore(0x4ce0, mulmod(mload(0x4880), mload(0x3960), f_q)) -mstore(0x4d00, mulmod(mload(0x49a0), mload(0x3960), f_q)) -mstore(0x4d20, mulmod(mload(0x49c0), mload(0x3960), f_q)) -mstore(0x4d40, mulmod(mload(0x49e0), mload(0x3960), f_q)) -mstore(0x4d60, mulmod(mload(0x4a00), mload(0x3960), f_q)) -mstore(0x4d80, mulmod(mload(0x4a20), mload(0x3960), f_q)) -mstore(0x4da0, mulmod(mload(0x4ac0), mload(0x3960), f_q)) -mstore(0x4dc0, addmod(mload(0x3f40), mload(0x4b00), f_q)) -mstore(0x4de0, mulmod(1, mload(0x3020), f_q)) -mstore(0x4e00, mulmod(1, mload(0xb20), f_q)) -mstore(0x4e20, 0x0000000000000000000000000000000000000000000000000000000000000001) - mstore(0x4e40, 0x0000000000000000000000000000000000000000000000000000000000000002) -mstore(0x4e60, mload(0x4dc0)) -success := and(eq(staticcall(gas(), 0x7, 0x4e20, 0x60, 0x4e20, 0x40), 1), success) -mstore(0x4e80, mload(0x4e20)) - mstore(0x4ea0, mload(0x4e40)) -mstore(0x4ec0, mload(0x80)) - mstore(0x4ee0, mload(0xa0)) -success := and(eq(staticcall(gas(), 0x6, 0x4e80, 0x80, 0x4e80, 0x40), 1), success) -mstore(0x4f00, mload(0xc0)) - mstore(0x4f20, mload(0xe0)) -mstore(0x4f40, mload(0x3ac0)) -success := and(eq(staticcall(gas(), 0x7, 0x4f00, 0x60, 0x4f00, 0x40), 1), success) -mstore(0x4f60, mload(0x4e80)) - mstore(0x4f80, mload(0x4ea0)) -mstore(0x4fa0, mload(0x4f00)) - mstore(0x4fc0, mload(0x4f20)) -success := and(eq(staticcall(gas(), 0x6, 0x4f60, 0x80, 0x4f60, 0x40), 1), success) -mstore(0x4fe0, mload(0x100)) - mstore(0x5000, mload(0x120)) -mstore(0x5020, mload(0x3ce0)) -success := and(eq(staticcall(gas(), 0x7, 0x4fe0, 0x60, 0x4fe0, 0x40), 1), success) -mstore(0x5040, mload(0x4f60)) - mstore(0x5060, mload(0x4f80)) -mstore(0x5080, mload(0x4fe0)) - mstore(0x50a0, mload(0x5000)) -success := and(eq(staticcall(gas(), 0x6, 0x5040, 0x80, 0x5040, 0x40), 1), success) -mstore(0x50c0, mload(0x320)) - mstore(0x50e0, mload(0x340)) -mstore(0x5100, mload(0x3d00)) -success := and(eq(staticcall(gas(), 0x7, 0x50c0, 0x60, 0x50c0, 0x40), 1), success) -mstore(0x5120, mload(0x5040)) - mstore(0x5140, mload(0x5060)) -mstore(0x5160, mload(0x50c0)) - mstore(0x5180, mload(0x50e0)) -success := and(eq(staticcall(gas(), 0x6, 0x5120, 0x80, 0x5120, 0x40), 1), success) -mstore(0x51a0, mload(0x360)) - mstore(0x51c0, mload(0x380)) -mstore(0x51e0, mload(0x3d20)) -success := and(eq(staticcall(gas(), 0x7, 0x51a0, 0x60, 0x51a0, 0x40), 1), success) -mstore(0x5200, mload(0x5120)) - mstore(0x5220, mload(0x5140)) -mstore(0x5240, mload(0x51a0)) - mstore(0x5260, mload(0x51c0)) -success := and(eq(staticcall(gas(), 0x6, 0x5200, 0x80, 0x5200, 0x40), 1), success) -mstore(0x5280, mload(0x2e0)) - mstore(0x52a0, mload(0x300)) -mstore(0x52c0, mload(0x3e20)) -success := and(eq(staticcall(gas(), 0x7, 0x5280, 0x60, 0x5280, 0x40), 1), success) -mstore(0x52e0, mload(0x5200)) - mstore(0x5300, mload(0x5220)) -mstore(0x5320, mload(0x5280)) - mstore(0x5340, mload(0x52a0)) -success := and(eq(staticcall(gas(), 0x6, 0x52e0, 0x80, 0x52e0, 0x40), 1), success) -mstore(0x5360, mload(0x1a0)) - mstore(0x5380, mload(0x1c0)) -mstore(0x53a0, mload(0x3f20)) -success := and(eq(staticcall(gas(), 0x7, 0x5360, 0x60, 0x5360, 0x40), 1), success) -mstore(0x53c0, mload(0x52e0)) - mstore(0x53e0, mload(0x5300)) -mstore(0x5400, mload(0x5360)) - mstore(0x5420, mload(0x5380)) -success := and(eq(staticcall(gas(), 0x6, 0x53c0, 0x80, 0x53c0, 0x40), 1), success) -mstore(0x5440, mload(0x1e0)) - mstore(0x5460, mload(0x200)) -mstore(0x5480, mload(0x4b20)) -success := and(eq(staticcall(gas(), 0x7, 0x5440, 0x60, 0x5440, 0x40), 1), success) -mstore(0x54a0, mload(0x53c0)) - mstore(0x54c0, mload(0x53e0)) -mstore(0x54e0, mload(0x5440)) - mstore(0x5500, mload(0x5460)) -success := and(eq(staticcall(gas(), 0x6, 0x54a0, 0x80, 0x54a0, 0x40), 1), success) -mstore(0x5520, 0x0655d62979dc062dc1e8c15334bf17cf5c7e6352219c0bd0b0cc039598d9a669) - mstore(0x5540, 0x019589d3002f6a0ded46a69053f0c05e7a7ca45339b3d2bae85d00f26ac0f33e) -mstore(0x5560, mload(0x4b40)) -success := and(eq(staticcall(gas(), 0x7, 0x5520, 0x60, 0x5520, 0x40), 1), success) -mstore(0x5580, mload(0x54a0)) - mstore(0x55a0, mload(0x54c0)) -mstore(0x55c0, mload(0x5520)) - mstore(0x55e0, mload(0x5540)) -success := and(eq(staticcall(gas(), 0x6, 0x5580, 0x80, 0x5580, 0x40), 1), success) -mstore(0x5600, 0x1eab999592385208b42a12dcc047763ee5cf12052eb4b0d9a7a286e043f3df9f) - mstore(0x5620, 0x18887eb3c646ffd4961226c91bac9661004798b1fc6a39c43f9a6d1d03767194) -mstore(0x5640, mload(0x4b60)) -success := and(eq(staticcall(gas(), 0x7, 0x5600, 0x60, 0x5600, 0x40), 1), success) -mstore(0x5660, mload(0x5580)) - mstore(0x5680, mload(0x55a0)) -mstore(0x56a0, mload(0x5600)) - mstore(0x56c0, mload(0x5620)) -success := and(eq(staticcall(gas(), 0x6, 0x5660, 0x80, 0x5660, 0x40), 1), success) -mstore(0x56e0, 0x076806058b02e1b5e99b2f2e8eee613194f8df73481659f5938baacd64e4d7b8) - mstore(0x5700, 0x05ae81644b244dceea5350a84a79cbf0a199bbd6c1fad9887423f8c8048e6039) -mstore(0x5720, mload(0x4b80)) -success := and(eq(staticcall(gas(), 0x7, 0x56e0, 0x60, 0x56e0, 0x40), 1), success) -mstore(0x5740, mload(0x5660)) - mstore(0x5760, mload(0x5680)) -mstore(0x5780, mload(0x56e0)) - mstore(0x57a0, mload(0x5700)) -success := and(eq(staticcall(gas(), 0x6, 0x5740, 0x80, 0x5740, 0x40), 1), success) -mstore(0x57c0, 0x0438873fc00231ae527efcf74d9092f5059dfa05275cbe7381e948fe3b7b61d8) - mstore(0x57e0, 0x03c0f314c93403792ba86ec3841b3080f2f7cd092c6bcb632cdbc2122a13cdef) -mstore(0x5800, mload(0x4ba0)) -success := and(eq(staticcall(gas(), 0x7, 0x57c0, 0x60, 0x57c0, 0x40), 1), success) -mstore(0x5820, mload(0x5740)) - mstore(0x5840, mload(0x5760)) -mstore(0x5860, mload(0x57c0)) - mstore(0x5880, mload(0x57e0)) -success := and(eq(staticcall(gas(), 0x6, 0x5820, 0x80, 0x5820, 0x40), 1), success) -mstore(0x58a0, 0x2b12b132a6261ad60249147599cae0d5b3547e510deabba65526d130f04f2402) - mstore(0x58c0, 0x13e3c02ce00f6b7e00d5b099eda5f1155956ae83899a2d59cefcb00dad66a7f6) -mstore(0x58e0, mload(0x4bc0)) -success := and(eq(staticcall(gas(), 0x7, 0x58a0, 0x60, 0x58a0, 0x40), 1), success) -mstore(0x5900, mload(0x5820)) - mstore(0x5920, mload(0x5840)) -mstore(0x5940, mload(0x58a0)) - mstore(0x5960, mload(0x58c0)) -success := and(eq(staticcall(gas(), 0x6, 0x5900, 0x80, 0x5900, 0x40), 1), success) -mstore(0x5980, 0x0ed83370277e0fd35e8258dd5630ce0ce3491fdf7e166d293745635b0cc4eba5) - mstore(0x59a0, 0x03994e7e77ad58072b78757700ab0b79247f2e462b0cf6a5a18b607414c095db) -mstore(0x59c0, mload(0x4be0)) -success := and(eq(staticcall(gas(), 0x7, 0x5980, 0x60, 0x5980, 0x40), 1), success) -mstore(0x59e0, mload(0x5900)) - mstore(0x5a00, mload(0x5920)) -mstore(0x5a20, mload(0x5980)) - mstore(0x5a40, mload(0x59a0)) -success := and(eq(staticcall(gas(), 0x6, 0x59e0, 0x80, 0x59e0, 0x40), 1), success) -mstore(0x5a60, 0x23ba4bc49baab563e9d5bf07da231a4496d35b6bc782dbbd76135fe44c31cbcf) - mstore(0x5a80, 0x28b88097e7edf1b2904f6c25c1e30ca0e38c74a52125b2995c4cf0a750683854) -mstore(0x5aa0, mload(0x4c00)) -success := and(eq(staticcall(gas(), 0x7, 0x5a60, 0x60, 0x5a60, 0x40), 1), success) -mstore(0x5ac0, mload(0x59e0)) - mstore(0x5ae0, mload(0x5a00)) -mstore(0x5b00, mload(0x5a60)) - mstore(0x5b20, mload(0x5a80)) -success := and(eq(staticcall(gas(), 0x6, 0x5ac0, 0x80, 0x5ac0, 0x40), 1), success) -mstore(0x5b40, 0x17dcbba0bbe2d24566de620998f62ff54ea5302ada6aeb18028b61b4dc19bbd3) - mstore(0x5b60, 0x0e1f908007a5c2cc934426c26de7206c53fa10c79d63ef52ee91bfb568c72fbd) -mstore(0x5b80, mload(0x4c20)) -success := and(eq(staticcall(gas(), 0x7, 0x5b40, 0x60, 0x5b40, 0x40), 1), success) -mstore(0x5ba0, mload(0x5ac0)) - mstore(0x5bc0, mload(0x5ae0)) -mstore(0x5be0, mload(0x5b40)) - mstore(0x5c00, mload(0x5b60)) -success := and(eq(staticcall(gas(), 0x6, 0x5ba0, 0x80, 0x5ba0, 0x40), 1), success) -mstore(0x5c20, 0x2c7823f99cb2adb716becb960914ffa1d6e2f257875fdd03c2bee52ef571d41e) - mstore(0x5c40, 0x09ab83ebc6803e65b2e6831c8706d9a134f6b1cf6f6ec5c2697afee095320ee1) -mstore(0x5c60, mload(0x4c40)) -success := and(eq(staticcall(gas(), 0x7, 0x5c20, 0x60, 0x5c20, 0x40), 1), success) -mstore(0x5c80, mload(0x5ba0)) - mstore(0x5ca0, mload(0x5bc0)) -mstore(0x5cc0, mload(0x5c20)) - mstore(0x5ce0, mload(0x5c40)) -success := and(eq(staticcall(gas(), 0x6, 0x5c80, 0x80, 0x5c80, 0x40), 1), success) -mstore(0x5d00, 0x2dc12c205152bfacc354c838225571172c215e01a64de6a2ca6665c70937ac58) - mstore(0x5d20, 0x0449eb529f0038a2bd2f6c0b6213a70488b69b479d90a953579e4c9d45621b85) -mstore(0x5d40, mload(0x4c60)) -success := and(eq(staticcall(gas(), 0x7, 0x5d00, 0x60, 0x5d00, 0x40), 1), success) -mstore(0x5d60, mload(0x5c80)) - mstore(0x5d80, mload(0x5ca0)) -mstore(0x5da0, mload(0x5d00)) - mstore(0x5dc0, mload(0x5d20)) -success := and(eq(staticcall(gas(), 0x6, 0x5d60, 0x80, 0x5d60, 0x40), 1), success) -mstore(0x5de0, 0x09a2ab3913a4770fd50f6ba9ec4ce0b3178b54d7bfca5b42fe7e8e1ce5cf60a9) - mstore(0x5e00, 0x13ec31f94026569c4bb76e2c4ceaa3e6525438ffb4a7a69cde61f6d77b93bad7) -mstore(0x5e20, mload(0x4c80)) -success := and(eq(staticcall(gas(), 0x7, 0x5de0, 0x60, 0x5de0, 0x40), 1), success) -mstore(0x5e40, mload(0x5d60)) - mstore(0x5e60, mload(0x5d80)) -mstore(0x5e80, mload(0x5de0)) - mstore(0x5ea0, mload(0x5e00)) -success := and(eq(staticcall(gas(), 0x6, 0x5e40, 0x80, 0x5e40, 0x40), 1), success) -mstore(0x5ec0, 0x0743ea40f14084db2673217283aa053f986896ee7c181f52118442e99c452974) - mstore(0x5ee0, 0x0203e3493a2594ece57d22cc75dd081ac68271ec7c758153cfd2152bfb5c19e3) -mstore(0x5f00, mload(0x4ca0)) -success := and(eq(staticcall(gas(), 0x7, 0x5ec0, 0x60, 0x5ec0, 0x40), 1), success) -mstore(0x5f20, mload(0x5e40)) - mstore(0x5f40, mload(0x5e60)) -mstore(0x5f60, mload(0x5ec0)) - mstore(0x5f80, mload(0x5ee0)) -success := and(eq(staticcall(gas(), 0x6, 0x5f20, 0x80, 0x5f20, 0x40), 1), success) -mstore(0x5fa0, 0x02a9a77d8e6f6fd89f33ba56fe45f6f5c907e50ba28cdd4198acfb562eb21103) - mstore(0x5fc0, 0x23abee68d83c2d6632576e5e95ca01a61e5e3e6d9438c2ac6428c8b6edfe2aba) -mstore(0x5fe0, mload(0x4cc0)) -success := and(eq(staticcall(gas(), 0x7, 0x5fa0, 0x60, 0x5fa0, 0x40), 1), success) -mstore(0x6000, mload(0x5f20)) - mstore(0x6020, mload(0x5f40)) -mstore(0x6040, mload(0x5fa0)) - mstore(0x6060, mload(0x5fc0)) -success := and(eq(staticcall(gas(), 0x6, 0x6000, 0x80, 0x6000, 0x40), 1), success) -mstore(0x6080, 0x2cf36d36bfacbe1a8d8c626aefa75ac0feb46b725989a8e6fabed074bf9f6af7) - mstore(0x60a0, 0x060fded3ed5ec56d9e0064d73c472245a4c4b6ec371e9808692bf7f259d3b730) -mstore(0x60c0, mload(0x4ce0)) -success := and(eq(staticcall(gas(), 0x7, 0x6080, 0x60, 0x6080, 0x40), 1), success) -mstore(0x60e0, mload(0x6000)) - mstore(0x6100, mload(0x6020)) -mstore(0x6120, mload(0x6080)) - mstore(0x6140, mload(0x60a0)) -success := and(eq(staticcall(gas(), 0x6, 0x60e0, 0x80, 0x60e0, 0x40), 1), success) -mstore(0x6160, mload(0x440)) - mstore(0x6180, mload(0x460)) -mstore(0x61a0, mload(0x4d00)) -success := and(eq(staticcall(gas(), 0x7, 0x6160, 0x60, 0x6160, 0x40), 1), success) -mstore(0x61c0, mload(0x60e0)) - mstore(0x61e0, mload(0x6100)) -mstore(0x6200, mload(0x6160)) - mstore(0x6220, mload(0x6180)) -success := and(eq(staticcall(gas(), 0x6, 0x61c0, 0x80, 0x61c0, 0x40), 1), success) -mstore(0x6240, mload(0x480)) - mstore(0x6260, mload(0x4a0)) -mstore(0x6280, mload(0x4d20)) -success := and(eq(staticcall(gas(), 0x7, 0x6240, 0x60, 0x6240, 0x40), 1), success) -mstore(0x62a0, mload(0x61c0)) - mstore(0x62c0, mload(0x61e0)) -mstore(0x62e0, mload(0x6240)) - mstore(0x6300, mload(0x6260)) -success := and(eq(staticcall(gas(), 0x6, 0x62a0, 0x80, 0x62a0, 0x40), 1), success) -mstore(0x6320, mload(0x4c0)) - mstore(0x6340, mload(0x4e0)) -mstore(0x6360, mload(0x4d40)) -success := and(eq(staticcall(gas(), 0x7, 0x6320, 0x60, 0x6320, 0x40), 1), success) -mstore(0x6380, mload(0x62a0)) - mstore(0x63a0, mload(0x62c0)) -mstore(0x63c0, mload(0x6320)) - mstore(0x63e0, mload(0x6340)) -success := and(eq(staticcall(gas(), 0x6, 0x6380, 0x80, 0x6380, 0x40), 1), success) -mstore(0x6400, mload(0x500)) - mstore(0x6420, mload(0x520)) -mstore(0x6440, mload(0x4d60)) -success := and(eq(staticcall(gas(), 0x7, 0x6400, 0x60, 0x6400, 0x40), 1), success) -mstore(0x6460, mload(0x6380)) - mstore(0x6480, mload(0x63a0)) -mstore(0x64a0, mload(0x6400)) - mstore(0x64c0, mload(0x6420)) -success := and(eq(staticcall(gas(), 0x6, 0x6460, 0x80, 0x6460, 0x40), 1), success) -mstore(0x64e0, mload(0x540)) - mstore(0x6500, mload(0x560)) -mstore(0x6520, mload(0x4d80)) -success := and(eq(staticcall(gas(), 0x7, 0x64e0, 0x60, 0x64e0, 0x40), 1), success) -mstore(0x6540, mload(0x6460)) - mstore(0x6560, mload(0x6480)) -mstore(0x6580, mload(0x64e0)) - mstore(0x65a0, mload(0x6500)) -success := and(eq(staticcall(gas(), 0x6, 0x6540, 0x80, 0x6540, 0x40), 1), success) -mstore(0x65c0, mload(0x3a0)) - mstore(0x65e0, mload(0x3c0)) -mstore(0x6600, mload(0x4da0)) -success := and(eq(staticcall(gas(), 0x7, 0x65c0, 0x60, 0x65c0, 0x40), 1), success) -mstore(0x6620, mload(0x6540)) - mstore(0x6640, mload(0x6560)) -mstore(0x6660, mload(0x65c0)) - mstore(0x6680, mload(0x65e0)) -success := and(eq(staticcall(gas(), 0x6, 0x6620, 0x80, 0x6620, 0x40), 1), success) -mstore(0x66a0, mload(0xac0)) - mstore(0x66c0, mload(0xae0)) -mstore(0x66e0, sub(f_q, mload(0x4de0))) -success := and(eq(staticcall(gas(), 0x7, 0x66a0, 0x60, 0x66a0, 0x40), 1), success) -mstore(0x6700, mload(0x6620)) - mstore(0x6720, mload(0x6640)) -mstore(0x6740, mload(0x66a0)) - mstore(0x6760, mload(0x66c0)) -success := and(eq(staticcall(gas(), 0x6, 0x6700, 0x80, 0x6700, 0x40), 1), success) -mstore(0x6780, mload(0xb60)) - mstore(0x67a0, mload(0xb80)) -mstore(0x67c0, mload(0x4e00)) -success := and(eq(staticcall(gas(), 0x7, 0x6780, 0x60, 0x6780, 0x40), 1), success) -mstore(0x67e0, mload(0x6700)) - mstore(0x6800, mload(0x6720)) -mstore(0x6820, mload(0x6780)) - mstore(0x6840, mload(0x67a0)) -success := and(eq(staticcall(gas(), 0x6, 0x67e0, 0x80, 0x67e0, 0x40), 1), success) -mstore(0x6860, mload(0x67e0)) - mstore(0x6880, mload(0x6800)) -mstore(0x68a0, 0x198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c2) - mstore(0x68c0, 0x1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed) - mstore(0x68e0, 0x090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b) - mstore(0x6900, 0x12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa) -mstore(0x6920, mload(0xb60)) - mstore(0x6940, mload(0xb80)) -mstore(0x6960, 0x26186a2d65ee4d2f9c9a5b91f86597d35f192cd120caf7e935d8443d1938e23d) - mstore(0x6980, 0x30441fd1b5d3370482c42152a8899027716989a6996c2535bc9f7fee8aaef79e) - mstore(0x69a0, 0x16f363f103c80d7bbc8ad3c6867e0822bbc6000be91a4689755c7df40221c145) - mstore(0x69c0, 0x2b1cbb3e521edf5a622d82762a44a5e63f1e50b332d71154a4a7958d6011deff) -success := and(eq(staticcall(gas(), 0x8, 0x6860, 0x180, 0x6860, 0x20), 1), success) -success := and(eq(mload(0x6860), 1), success) - - if not(success) { revert(0, 0) } - return(0, 0) - - } - } - } diff --git a/contracts/src/Summa.sol b/contracts/src/Summa.sol index 82159afc..67a00963 100644 --- a/contracts/src/Summa.sol +++ b/contracts/src/Summa.sol @@ -37,8 +37,18 @@ contract Summa is Ownable { uint256 amount; } - // Verifier contracts - IVerifier private immutable solvencyVerifier; + /** + * @dev Struct representing a commitment submitted by the CEX + * @param mstRoot Merkle sum tree root of the CEX's liabilities + * @param rootSum The total sum of the tree asset + */ + struct Commitment { + uint256 mstRoot; + uint256 rootSum; + Asset asset; + } + + //User inclusion proof verifier IVerifier private immutable inclusionVerifier; // All address ownership proofs submitted by the CEX @@ -50,8 +60,8 @@ contract Summa is Ownable { */ mapping(bytes32 => uint256) public ownershipProofByAddress; - // MST roots corresponding to successfully verified solvency proofs by timestamp - mapping(uint256 => uint256) public mstRoots; + // Solvency commitments by timestamp submitted by the CEX + mapping(uint256 => Commitment) public commitments; event AddressOwnershipProofSubmitted( AddressOwnershipProof[] addressOwnershipProofs @@ -59,25 +69,16 @@ contract Summa is Ownable { event SolvencyProofSubmitted( uint256 indexed timestamp, uint256 mstRoot, - Asset[] assets + uint256 rootSum, + Asset assets ); - constructor(IVerifier _solvencyVerifier, IVerifier _inclusionVerifier) { - solvencyVerifier = _solvencyVerifier; + constructor(IVerifier _inclusionVerifier) { inclusionVerifier = _inclusionVerifier; } - /* - // While this duplicate method might elevate deployment costs, the trade-off is a reduction in usage and maintenance costs. - function submitProofOfAddressOwnership( - AddressOwnershipProof memory _addressOwnershipProof - ) public onlyOwner { - ... - } - */ - /** - * @dev Submit an optimistic proof of address ownership for a CEX. The proof is subject to an off-chain verification as it's not feasible to verify the signatures of non-EVM chains in an Ethereum smart contract. + * @dev Submit an optimistic proof of multiple address ownership for a CEX. The proof is subject to an off-chain verification as it's not feasible to verify the signatures of non-EVM chains in an Ethereum smart contract. * @param _addressOwnershipProofs The list of address ownership proofs */ function submitProofOfAddressOwnership( @@ -89,9 +90,7 @@ contract Summa is Ownable { ); uint256 index = ownershipProofByAddress[addressHash]; require(index == 0, "Address already verified"); - /* - Is there any reason to assign value `i + 1` to `ownershipProofByAddress[addressHash]`? - */ + //Offsetting the index by 1 to distinguish with the case when the proof hasn't been submitted (the storage slot would be zero) ownershipProofByAddress[addressHash] = i + 1; addressOwnershipProofs.push(_addressOwnershipProofs[i]); require( @@ -109,51 +108,31 @@ contract Summa is Ownable { /** * @dev Submit proof of solvency for a CEX * @param mstRoot Merkle sum tree root of the CEX's liabilities - * @param assets The list of assets owned by the CEX - * @param proof The ZK proof + * @param rootSum The total sum of the given asset across all the CEX liabilities + * @param asset The assets owned by the CEX * @param timestamp The timestamp at which the CEX took the snapshot of its assets and liabilities */ - function submitProofOfSolvency( + function submitCommitment( uint256 mstRoot, - Asset[] memory assets, - bytes memory proof, + uint256 rootSum, + Asset memory asset, uint256 timestamp ) public onlyOwner { require( addressOwnershipProofs.length != 0, "The CEX has not submitted any address ownership proofs" ); - uint256[] memory inputs = new uint256[](assets.length + 1); - inputs[0] = mstRoot; - for (uint i = 0; i < assets.length; i++) { - require( - bytes(assets[i].chain).length != 0 && - bytes(assets[i].assetName).length != 0, - "Invalid asset" - ); - inputs[i + 1] = assets[i].amount; - } - require(verifySolvencyProof(proof, inputs), "Invalid ZK proof"); - - mstRoots[timestamp] = mstRoot; - emit SolvencyProofSubmitted(timestamp, inputs[0], assets); - } + require( + bytes(asset.chain).length != 0 && + bytes(asset.assetName).length != 0, + "Invalid asset" + ); + require(rootSum != 0, "Root sum should be greater than zero"); - /* - It would be helpful to provide a description of the public inputs for the `verifySolvencyProof` and `verifyInclusionProof` methods. - */ + commitments[timestamp] = Commitment(mstRoot, rootSum, asset); - /** - * Verify the proof of CEX solvency - * @param proof ZK proof - * @param publicInputs proof inputs - */ - function verifySolvencyProof( - bytes memory proof, - uint256[] memory publicInputs - ) public view returns (bool) { - return solvencyVerifier.verify(publicInputs, proof); + emit SolvencyProofSubmitted(timestamp, mstRoot, rootSum, asset); } /** @@ -166,7 +145,10 @@ contract Summa is Ownable { uint256[] memory publicInputs, uint256 timestamp ) public view returns (bool) { - require(mstRoots[timestamp] == publicInputs[1], "Invalid MST root"); + require( + commitments[timestamp].mstRoot == publicInputs[1], + "Invalid MST root" + ); return inclusionVerifier.verify(publicInputs, proof); } } diff --git a/contracts/test/Summa.ts b/contracts/test/Summa.ts index 2ab793f1..e01c498d 100644 --- a/contracts/test/Summa.ts +++ b/contracts/test/Summa.ts @@ -9,27 +9,20 @@ import * as fs from "fs"; import * as path from "path"; describe("Summa Contract", () => { - function submitProofOfSolvency( + function submitCommitment( summa: Summa, mstRoot: BigNumber, - proof: string, - assets = [ - { - chain: "ETH", - assetName: "ETH", - amount: BigNumber.from(556863), - }, - { - chain: "ETH", - assetName: "USDT", - amount: BigNumber.from(556863), - }, - ] + rootSum: BigNumber, + asset = { + chain: "ETH", + assetName: "ETH", + amount: BigNumber.from(556863), + } ): any { - return summa.submitProofOfSolvency( + return summa.submitCommitment( mstRoot, - assets, - proof, + rootSum, + asset, BigNumber.from(1693559255) ); } @@ -52,18 +45,12 @@ describe("Summa Contract", () => { const [owner, addr1, addr2, addr3]: SignerWithAddress[] = await ethers.getSigners(); - const solvencyVerifier = await ethers.deployContract( - "src/SolvencyVerifier.sol:Verifier" - ); - await solvencyVerifier.deployed(); - const inclusionVerifier = await ethers.deployContract( "src/InclusionVerifier.sol:Verifier" ); await inclusionVerifier.deployed(); const summa = await ethers.deployContract("Summa", [ - solvencyVerifier.address, inclusionVerifier.address, ]); await summa.deployed(); @@ -211,10 +198,10 @@ describe("Summa Contract", () => { describe("verify proof of solvency", () => { let mstRoot: BigNumber; + let rootSum: BigNumber; let summa: Summa; let account1: SignerWithAddress; let account2: SignerWithAddress; - let proof: string; //let ethAccount3; let ownedAddresses: Summa.AddressOwnershipProofStruct[]; const message = ethers.utils.defaultAbiCoder.encode( @@ -255,25 +242,23 @@ describe("Summa Contract", () => { const calldata: any = JSON.parse(jsonData); mstRoot = calldata.public_inputs[0]; - proof = calldata.proof; + rootSum = BigNumber.from(10000000); }); it("should verify the proof of solvency for the given public input", async () => { await summa.submitProofOfAddressOwnership(ownedAddresses); - await expect(submitProofOfSolvency(summa, mstRoot, proof)) + await expect(submitCommitment(summa, mstRoot, rootSum)) .to.emit(summa, "SolvencyProofSubmitted") .withArgs( BigNumber.from(1693559255), mstRoot, - (assets: Summa.AssetStruct[]) => { + rootSum, + (asset: Summa.AssetStruct) => { return ( - assets[0].chain == "ETH" && - assets[0].assetName == "ETH" && - BigNumber.from(556863).eq(assets[0].amount as BigNumber) && - assets[1].chain == "ETH" && - assets[1].assetName == "USDT" && - BigNumber.from(556863).eq(assets[1].amount as BigNumber) + asset.chain == "ETH" && + asset.assetName == "ETH" && + BigNumber.from(556863).eq(asset.amount as BigNumber) ); } ); @@ -281,21 +266,14 @@ describe("Summa Contract", () => { it("should revert if the caller is not the owner", async () => { await expect( - summa.connect(account2).submitProofOfSolvency( + summa.connect(account2).submitCommitment( mstRoot, - [ - { - chain: "ETH", - assetName: "ETH", - amount: BigNumber.from(556863), - }, - { - chain: "ETH", - assetName: "USDT", - amount: BigNumber.from(556863), - }, - ], - proof, + BigNumber.from(1000000000), + { + chain: "ETH", + assetName: "ETH", + amount: BigNumber.from(556863), + }, BigNumber.from(1693559255) ) ).to.be.revertedWith("Ownable: caller is not the owner"); @@ -303,65 +281,46 @@ describe("Summa Contract", () => { it("should not verify the proof of solvency if the CEX hasn't proven the address ownership", async () => { await expect( - submitProofOfSolvency(summa, mstRoot, proof) + submitCommitment(summa, mstRoot, rootSum) ).to.be.revertedWith( "The CEX has not submitted any address ownership proofs" ); }); - it("should revert with invalid MST root", async () => { - mstRoot = BigNumber.from(0); + it("should revert with invalid root sum", async () => { + rootSum = BigNumber.from(0); await summa.submitProofOfAddressOwnership(ownedAddresses); await expect( - submitProofOfSolvency(summa, mstRoot, proof) - ).to.be.revertedWith("Invalid ZK proof"); + submitCommitment(summa, mstRoot, rootSum) + ).to.be.revertedWith("Root sum should be greater than zero"); }); it("should revert with invalid assets", async () => { await summa.submitProofOfAddressOwnership(ownedAddresses); await expect( - submitProofOfSolvency(summa, mstRoot, proof, [ - { - chain: "", - assetName: "ETH", - amount: BigNumber.from(556863), - }, - ]) + submitCommitment(summa, mstRoot, rootSum, { + chain: "", + assetName: "ETH", + amount: BigNumber.from(556863), + }) ).to.be.revertedWith("Invalid asset"); await expect( - submitProofOfSolvency(summa, mstRoot, proof, [ - { - chain: "ETH", - assetName: "", - amount: BigNumber.from(556863), - }, - ]) + submitCommitment(summa, mstRoot, rootSum, { + chain: "ETH", + assetName: "", + amount: BigNumber.from(556863), + }) ).to.be.revertedWith("Invalid asset"); }); - - it("should revert with invalid proof", async () => { - await summa.submitProofOfAddressOwnership(ownedAddresses); - - proof = proof.replace("1", "2"); - - await expect( - submitProofOfSolvency(summa, mstRoot, proof) - ).to.be.revertedWith("Invalid ZK proof"); - - proof = "0x000000"; - - await expect( - submitProofOfSolvency(summa, mstRoot, proof) - ).to.be.revertedWithoutReason(); - }); }); describe("verify proof of inclusion", () => { let mstRoot: BigNumber; + let rootSum: BigNumber; let leafHash: BigNumber; let summa: Summa; let account1: SignerWithAddress; @@ -421,11 +380,12 @@ describe("Summa Contract", () => { leafHash = inclusionCalldata.public_inputs[0]; mstRoot = inclusionCalldata.public_inputs[1]; inclusionProof = inclusionCalldata.proof; + rootSum = BigNumber.from(10000000); }); it("should verify the proof of inclusion for the given public input", async () => { await summa.submitProofOfAddressOwnership(ownedAddresses); - await submitProofOfSolvency(summa, mstRoot, solvencyProof); + await submitCommitment(summa, mstRoot, rootSum); expect( await verifyInclusionProof(summa, inclusionProof, leafHash, mstRoot) ).to.be.equal(true); @@ -433,7 +393,7 @@ describe("Summa Contract", () => { it("should not verify with invalid MST root", async () => { await summa.submitProofOfAddressOwnership(ownedAddresses); - await submitProofOfSolvency(summa, mstRoot, solvencyProof); + await submitCommitment(summa, mstRoot, rootSum); mstRoot = BigNumber.from(0); await expect( verifyInclusionProof(summa, inclusionProof, leafHash, mstRoot) @@ -451,7 +411,7 @@ describe("Summa Contract", () => { leafHash = BigNumber.from(0); await summa.submitProofOfAddressOwnership(ownedAddresses); - await submitProofOfSolvency(summa, mstRoot, solvencyProof); + await submitCommitment(summa, mstRoot, rootSum); expect( await verifyInclusionProof(summa, inclusionProof, leafHash, mstRoot) ).to.be.equal(false); @@ -461,7 +421,7 @@ describe("Summa Contract", () => { inclusionProof = inclusionProof.replace("1", "2"); await summa.submitProofOfAddressOwnership(ownedAddresses); - await submitProofOfSolvency(summa, mstRoot, solvencyProof); + await submitCommitment(summa, mstRoot, rootSum); expect( await verifyInclusionProof(summa, inclusionProof, leafHash, mstRoot) ).to.be.equal(false);