diff --git a/contracts/PoseidonT2.sol b/contracts/PoseidonT2.sol index 05008a6..5dfd4cd 100644 --- a/contracts/PoseidonT2.sol +++ b/contracts/PoseidonT2.sol @@ -57,6 +57,7 @@ library PoseidonT2 { { // load the inputs from memory let state1 := addmod(mload(0x80), 0x0c0356530896eec42a97ed937f3135cfc5142b3ae405b8343c1d83ffa604cb81, F) + mstore(0x20, addmod(mload(0xa0), 0x1e28a1d935698ad1142e51182bb54cf4a00ea5aabd6268bd317ea977cc154a30, F)) p := mulmod(state1, state1, F) state1 := mulmod(mulmod(p, p, F), state1, F) @@ -200,7 +201,7 @@ library PoseidonT2 { p := mulmod(state1, state1, F) state1 := mulmod(mulmod(p, p, F), state1, F) - mstore(0, addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F)) + mstore(0x0, addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F)) return(0, 0x20) } } diff --git a/contracts/PoseidonT3.sol b/contracts/PoseidonT3.sol index 25e9a41..54f58a9 100644 --- a/contracts/PoseidonT3.sol +++ b/contracts/PoseidonT3.sol @@ -69,6 +69,7 @@ library PoseidonT3 { // load the inputs from memory let state1 := addmod(mload(0x80), 0x00f1445235f2148c5986587169fc1bcd887b08d4d00868df5696fff40956e864, F) let state2 := addmod(mload(0xa0), 0x08dff3487e8ac99e1f29a058d0fa80b930c728730b7ab36ce879f3890ecf73f5, F) + mstore(0x60, addmod(mload(0xc0), 0x2f27be690fdaee46c3ce28f7532b13c856c35342c84bda6e20966310fadc01d0, F)) p := mulmod(state1, state1, F) state1 := mulmod(mulmod(p, p, F), state1, F) @@ -472,7 +473,7 @@ library PoseidonT3 { p := mulmod(state2, state2, F) state2 := mulmod(mulmod(p, p, F), state2, F) - mstore(0, addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F)) + mstore(0x0, addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F)) return(0, 0x20) } } diff --git a/contracts/PoseidonT4.sol b/contracts/PoseidonT4.sol index 850b2f1..f3d9c24 100644 --- a/contracts/PoseidonT4.sol +++ b/contracts/PoseidonT4.sol @@ -83,6 +83,7 @@ library PoseidonT4 { let state1 := addmod(mload(0x80), 0x265ddfe127dd51bd7239347b758f0a1320eb2cc7450acc1dad47f80c8dcf34d6, F) let state2 := addmod(mload(0xa0), 0x199750ec472f1809e0f66a545e1e51624108ac845015c2aa3dfc36bab497d8aa, F) let state3 := addmod(mload(0xc0), 0x157ff3fe65ac7208110f06a5f74302b14d743ea25067f0ffd032f787c7f1cdf8, F) + mstore(0xa0, addmod(mload(0xe0), 0x2e49c43c4569dd9c5fd35ac45fca33f10b15c590692f8beefe18f4896ac94902, F)) p := mulmod(state1, state1, F) state1 := mulmod(mulmod(p, p, F), state1, F) @@ -576,7 +577,7 @@ library PoseidonT4 { p := mulmod(state3, state3, F) state3 := mulmod(mulmod(p, p, F), state3, F) - mstore(0, addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F)) + mstore(0x0, addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F)) return(0, 0x20) } } diff --git a/contracts/PoseidonT5.sol b/contracts/PoseidonT5.sol index 0e715ad..7a33ab4 100644 --- a/contracts/PoseidonT5.sol +++ b/contracts/PoseidonT5.sol @@ -129,6 +129,7 @@ library PoseidonT5 { let state2 := addmod(mload(0xa0), 0x2f83b9df259b2b68bcd748056307c37754907df0c0fb0035f5087c58d5e8c2d4, F) let state3 := addmod(mload(0xc0), 0x2ca70e2e8d7f39a12447ac83052451b461f15f8b41a75ef31915208f5aba9683, F) let state4 := addmod(mload(0xe0), 0x1cb5f9319be6a45e91b04d7222271c94994196f12ed22c5d4ec719cb83ecfea9, F) + mstore(0xe0, addmod(mload(0x100), 0x2eb4f99c69f966ebf8a42192de7ff61621c7bb47b93750c2b9ea08d18446c122, F)) p := mulmod(state1, state1, F) state1 := mulmod(mulmod(p, p, F), state1, F) @@ -750,7 +751,7 @@ library PoseidonT5 { state4 := mulmod(mulmod(p, p, F), state4, F) mstore( - 0, + 0x0, addmod(addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F), mulmod(state4, M40, F), F) ) return(0, 0x20) diff --git a/contracts/PoseidonT6.sol b/contracts/PoseidonT6.sol new file mode 100644 index 0000000..2f010d4 --- /dev/null +++ b/contracts/PoseidonT6.sol @@ -0,0 +1,875 @@ +/// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0; + +library PoseidonT6 { + uint constant F = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + + uint constant M00 = 0x124666f80561ed5916f2f070b1bd248c6d53f44d273d956a0c87b917692a4d18; + uint constant M01 = 0x0a514a5c227f4cec95dfa029e8dd124c34895aa46bb27c0911f3780d5015540a; + uint constant M02 = 0x278bb49a7b4e44aea46eb0f882cb692801a6e60fdd5b5c23c63cd65ccce4fe0a; + uint constant M03 = 0x0c399e9f67aa40707a203feefb0b958bbdadcec5ca34901d253d026a2419f6a2; + uint constant M04 = 0x1d6b3d5f6ea369c26f825d2362933eaa31ea35ec0a77c1fbd9e01ca1523e4432; + uint constant M05 = 0x24be510095436206dd0abd0b0cbb95c883ab304aa52598b1a69306ec981a688d; + uint constant M10 = 0x11924f02fd19b09255aaa1cf46ea0518e3d7bfeef47421609491011db0bd0b02; + uint constant M11 = 0x192e16d17d956b257b85a652eefdf2ee09589eac5be80915775723d2cb1da06d; + uint constant M12 = 0x063edec1bed831f506af8db648d6fdea145345887e8bdcff109035a1d9b674d7; + uint constant M13 = 0x083f0df3f1a0351d0330ec3ff602ca8cc353b7f6e762c7107184cd7b423449f6; + uint constant M14 = 0x119ef188bb3dd0d32306976c19941e8664be687e7a69692da27da215a6f06d40; + uint constant M15 = 0x211610e2ad4a377426fadf7068b0c1a6c299a164c1c1a603eaed944870d0b9b9; + uint constant M20 = 0x247fa7f022304a1994ff505456c2201ef9b717369498d3ffce446601ed9df845; + uint constant M21 = 0x298ce0c1e3113bb935c7058e7772b533b1aa9db0c0926bdc8917e5605ca3ac10; + uint constant M22 = 0x1baef1cb5509b526a42061fb53657f99b3232500e855192cbe8c940e068c475f; + uint constant M23 = 0x1a6764d5943fc4a720b4c0a19fdb8c711984307287a58b9b5f9f5d58212cb263; + uint constant M24 = 0x2d9e0ab5c06893dfdfd03481381ba86b6e6292df5609d71f2c64b2d9a79f809e; + uint constant M25 = 0x15a67d981041b1f6f09f3f9ebefd864e779d3af08157786ac077505e50ec79fc; + uint constant M30 = 0x03fd7b19ef2c861f22f77ff810f54e277bc94eb76c02d79d986be3dcdf051c3f; + uint constant M31 = 0x094cb4e83621afd271e41bc71727f0158ebd612239ac9d698b17fe4be05b7fc8; + uint constant M32 = 0x1324564ac7bdf9e22164e9858d7fa8e368b165eaea3daf4eb67ee59c0df2e5d4; + uint constant M33 = 0x011a63a26feabf87fa66bde66cc25a922c96382d76c6a7ff48f1537beaed683a; + uint constant M34 = 0x25f16631bf77060f7ea34087c025bf135784319ef08cda2e31419ee0a529e658; + uint constant M35 = 0x049327fa79d28c12a2c82406947f77f06775b0287468b3136877701dbe7c9598; + uint constant M40 = 0x18bd41239c3e71579a677443ecffbd555a81eeeea69352a68b67c8563c0c2a06; + uint constant M41 = 0x03d880395be93c27d649af5fd142e76b33918cb8841d5a28173bd5cf7d328791; + uint constant M42 = 0x005761b8c6aecb1a8ca4ea4dfc2c8376064a4a8004ceeda210a55240562ddc13; + uint constant M43 = 0x08ca7b64657c3548f32bef5b63ad24288a41c0b251099ad27f9434307e3e64d4; + uint constant M44 = 0x144c7a11da5a7c5dabae3f33fbd03cad86d18bc594c79a497ecb9894edb554f1; + uint constant M45 = 0x230940dcc5232658ff9c29697a3fd416d170e8c998f1aa85dea0c42d79f951aa; + uint constant M50 = 0x2d78c3a5d28de9ff35bf0a257635196e5730ca7f40493277078cd75da8b4ebdc; + uint constant M51 = 0x28eeae6b5866ad68e443bbaf91680db7d7e2b3037e38fef61b42cbccffceca81; + uint constant M52 = 0x10c9e283159d58cb4cb2e35fde83a3ba1fdc28002ed9963d2a99f186178a148d; + uint constant M53 = 0x01998270471e9361955446b0cdb8bea915ec0675f1cd648ddcb04303507a4489; + uint constant M54 = 0x0f971162627723f3feadacb28b0c104cb8f74de508752fa8d7c0db2af13de8ee; + uint constant M55 = 0x1b121c049cd1159e289007e0c9da9995cc4bab4c26fb888ec3972a8a2e656964; + + // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40 + // Based on: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js + function hash(uint[5] memory inputs) public pure returns (uint) { + assembly { + // memory 0x00 to 0x3f (64 bytes) is scratch space for hash algos + // we can use it in inline assembly because we're not calling e.g. keccak + // + // memory 0x80 is the default offset for free memory + // we take inputs as a memory argument so we simply write over + // that memory after loading it + + // we have the following variables at memory offsets + // state0 - 0x00 + // state1 - 0x20 + // state2 - 0x80 + // state3 - 0xa0 + // state4 - ... + + function pRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x100, addmod(mload(0xe0), mload(0x100), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x100), M50, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore(0x20, addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x100), M51, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore(0x80, addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x100), M52, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore(0xa0, addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x100), M53, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore(0xc0, addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x100), M54, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore(0xe0, addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x100), M55, F), F), p, F)) + } + + function fRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x100, addmod(mload(0xe0), mload(0x100), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + c0 := mload(0x100) + p := mulmod(c0, c0, F) + mstore(0x100, mulmod(mulmod(p, p, F), c0, F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x100), M50, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore(0x20, addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x100), M51, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore(0x80, addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x100), M52, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore(0xa0, addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x100), M53, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore(0xc0, addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x100), M54, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore(0xe0, addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x100), M55, F), F), p, F)) + } + + // scratch variable for exponentiation + let p + + { + // load the inputs from memory + let state1 := addmod(mload(0x80), 0x0ab7b291388e5c9e43c0dc1f591fb83ecdb65022e1b70af43b8a7b40c1dff7c3, F) + let state2 := addmod(mload(0xa0), 0x2b7cbb217896f52c9a8c088e654af21e84cde754a3cef5b15c4d5466612d6adf, F) + let state3 := addmod(mload(0xc0), 0x2bc6b0ddbe1d701b6570428bdc1ca1bf0da59ff3bbbb95fc2bc71c0c6e67a65c, F) + let state4 := addmod(mload(0xe0), 0x123a55a31980384f3d20b2cecbc44ed60c38c11f7d20e9271efab9a905eefd3c, F) + mstore(0x120, addmod(mload(0x120), 0x1c2116e47e03a86bb11695b0a5f6dab6b9a460b1eb951ab01c259eca3fd47d51, F)) + mstore(0x100, addmod(mload(0x100), 0x037501cc8c9dc819309a769f4df098e588b01858bc8eb7e279e2883be9fb8c53, F)) + + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x100) + p := mulmod(p, p, F) + mstore(0x100, mulmod(mulmod(p, p, F), mload(0x100), F)) + + // state0 pow5mod and M[] multiplications are pre-calculated + + p := addmod( + addmod(addmod(0x1c75a58d854d4821d299acc8b5bf528d82545baa1fccd11b4af481536dd42d76, mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), + mulmod(state3, M30, F), + F + ) + mstore(0x0, addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x100), M50, F), F), p, F)) + p := addmod( + addmod(addmod(0x2c64e4fd7d22b7941e97b236fac1a6979275c4dbb22f9707238fb478316e73d9, mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), + mulmod(state3, M31, F), + F + ) + mstore(0x20, addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x100), M51, F), F), p, F)) + p := addmod( + addmod(addmod(0x213c4e421d44e697cd674a6d377a752d9bc2ebf497165ce792643bf39fc034f7, mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), + mulmod(state3, M32, F), + F + ) + mstore(0x80, addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x100), M52, F), F), p, F)) + p := addmod( + addmod(addmod(0x2435ad434d1117db1f271503cd65ce1c5c2ac1900e1cd74ae1c6e490593a934, mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), + mulmod(state3, M33, F), + F + ) + mstore(0xa0, addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x100), M53, F), F), p, F)) + p := addmod( + addmod(addmod(0x36a710abf9f57bb09aa288687ad8dcbcb9dc74c200d89d83d8e3c41f28e6b2e, mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), + mulmod(state3, M34, F), + F + ) + mstore(0xc0, addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x100), M54, F), F), p, F)) + p := addmod( + addmod(addmod(0x201541d8be11e6a050f6aea51e645577db6ab8ed6d672de377d108c0fc4dad04, mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), + mulmod(state3, M35, F), + F + ) + mstore(0xe0, addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x100), M55, F), F), p, F)) + } + + mstore(0x100, 0x1c21d92bef197e73b234e4777b60db14e642a56cee71515d54e1ac71cde72bd3) + + fRound( + 0x1c2116e47e03a86bb11695b0a5f6dab6b9a460b1eb951ab01c259eca3fd47d51, + 0x2c18213489032e85a9c8cb8e9a65839bfaed13e57bc0fae49dbdaebf54f56f93, + 0x2ee8fed3d4d2c71a0429eafd8e5db1718f29e2227985fdf2ad8703c835b9e031, + 0x28c64d8f5ed7aac004c92029d9e9bf91ba9436d1cce94b9316d111c70a0c1714, + 0x18a01d9ffb747ae0de3e83c707f8b24f682c84f15abf571b34254a03478665e0 + ) + + mstore(0x100, 0x06bbcb8e8e180201293e712f4950f1b0bbee808c9d64263c84d9d8ae155cb892) + + fRound( + 0x0ad404ccbcb1e195897cb60c80981ebb9d66a6677dbbedad8b6455fe62d807b1, + 0x0a9b6de833064f93b6adb99af6c005945cb654cb7bd14c8b97af8b60cc1fb387, + 0x13129e3f930aed6d47690331ff09dc5160efa58ddce2c3e6180d45bec3aa3a6f, + 0x0d7a614c8991508ab1ce4895813bb1c82f18bf7bfc9e280ccca18079839387f1, + 0x0532f7ec36e30041b0486986875c913a49bddf2f5af5febe8c31f2f4094ffea5 + ) + + mstore(0x100, 0x2f1bdc5254f9220c1a731fc5276964dab26b385fa40b6b04bed9960e2543ba08) + + fRound( + 0x0f558a4db1a3ac07f61e2e6bee947f73586bf40f211ceb4f687ca5678a9dcb33, + 0x2be140a60b5b5f2f8edd78a818a969b20c643e419bcf0b577c24a0d0e7acfe98, + 0x1c49c4b9a9f09f7b9ad5f74ebacc710512b8e867bace27cb0dea06e89b96f631, + 0x170c1a732721b12cde7f33e476a39a1aa77a81c06e2eac503847b00d597652db, + 0x19c27d0e52f65ca34f4e31a068e49331c6bfc39d9241f9d4c302041615cf27f1 + ) + + mstore(0x100, 0x17f02dab745fbe3c081321fe5cef845e7b8d070b2514d29b2a7b7d89cc0815da) + + pRound( + 0x05b42d2fbccbf4d39d2be9339cabe9d0dc6d921e855cd91154b639d28d4a1cf0, + 0x1220040715a41ad59f4f410e0c05a42c5fd32ac52fe9d06f88188d71f61e0935, + 0x25f9526526155b83946609f7bb9507dd4925ef871dee916d9144ebb4ece1343c, + 0x017bfe4284299ae7740b6d0e204951e314a8a5d0452419147978a95b34742444, + 0x2a5d4764021ca71d78a9674cb6708f1588d2ceaf3578c4111cf8b359eef089cf + ) + + mstore(0x100, 0x129fe7fc3efac6a8ab23dba6d886f394da11f5953cf98e28269a0dba2a745dd3) + + pRound( + 0x19da62626db7199b65f4adcf57fa4a3dbaa1764a7bd155708ee6f378c89ef013, + 0x0f88e295fa2ed81b426c91fa69366a73edf75f39bf18634cd266ec4038829e05, + 0x1fe31c5548546c7948fe4ee1bd7412e3280eff7d20cb09aa85f49f2766148017, + 0x10fdc1613bdbf67f38bdde561b2f91e4cc48b59f98d643638fdc0afadbfe126e, + 0x1f2618c2ebe9574508b9c52f0000e33ebfddad1a03fdd6bca6ef7f0093127bef + ) + + mstore(0x100, 0x0091f96400e4297ea85bb186c17b304e82638e57fd631ff6315976e1a5dd8b86) + + pRound( + 0x15afd4cdf1e4f820c1631d4ab85ca4ba3bafcfee72beade9fae60523102448e3, + 0x1f2c74ba5c367e370d728e71e15b268851a7bb8b45528cb734956079ac99b012, + 0x1130e1872d76f2f9369cf59b95edf9ce19f01fa89c9c36b26e09def6786dad3c, + 0x13523d173f7e6badb73b63fc1c9bbdbee242c61bc68656493327533a5c1b1dca, + 0x14da40d0af427a65f1841b5adc96538653368f7254cb5667ddadbbad7a574cd4 + ) + + mstore(0x100, 0x1f8bd2ab8aa840664c4eee198c4684dc4b05772bb2a0869da6722b15f447a133) + + pRound( + 0x303329bf9031c5515b9a34d49a64bb6a0267bc7b54a0deca5c450277a002cdcb, + 0x14ed47e55c1da1c2f05d3c1a1b2e6c18509fc8336ecfe9db737916e283fa821b, + 0x1161f10b357775d810ad53bcc4a20d5add2b03251c747deb04ee94c565e58d6b, + 0x17a8a50ae72ce707f22bc070eb992851ca914eb94cc68eafbb8a96a714eb8221, + 0x1a6c61d795dbaf62f99250b37ec5df88645a1c153791db6312b932dc250e4f62 + ) + + mstore(0x100, 0x14bf7889457b20b7a1367b34a3a538217d693b52426aff40a4bb72893b1784ca) + + pRound( + 0x1ffcb852a4f0027a9799f131cd74b98ccfb8cbc06349d8fefcc62f10c8fb3e2f, + 0x035e742ec52f19b36d489c720f467ffad77cd53bc2db5dddb246b23021f79f18, + 0x1dfaaee41bdf94d783aa29fc62b7ec7b55673aa818d305fd42d175a05f2e3d86, + 0x2821378477a02e995005a5635088540945bd333f2d1455f038a219b8c4796b3a, + 0x1db4a4d0f238a570b1061c6eec81c02f31ffdd4a7c19e763174f238d04897421 + ) + + mstore(0x100, 0x250932e7b0adcf2c84ed4bfb60a36b6b82e55aa94751157b1d45794b081c8aad) + + pRound( + 0x2ced52c2bf296f87e57410c3ec9a9483a796d164f6049127109ff0d3a9c08465, + 0x1ddeac5805a7f4ada4d0441ed108e3149d4ce6584f49ae5bdfd46d6766eea334, + 0x2e36b4e5e9c97b462304e8e2b5f9dc88e1c9f2161ba040673f911123f042ae70, + 0x0c6840d1cb0666dc59e89b1865275d8a164b447c5ed64347caee63502c238d5e, + 0x137e2e3e89e71d461f4c9bc3e8f12183262a4d1db55c589b2caeaac01238f58c + ) + + mstore(0x100, 0x1632308688c25e790f57d68a5350241242a56305347de4a5009ce46b8cdcb91f) + + pRound( + 0x170a7292f5634c06dd3bf09ab5c9c4ecd4b00d5ce2f35f972b4555391f16b42d, + 0x0d68cbbe77289e78d5cbf51d70f1b75ba215df4e7bd0149d10b2c50f2a4f3b81, + 0x0caf74563b90525f645a6d2036ecd1306fa1dc680b49d9ce4ed24c9749973178, + 0x20a7d1c0a27fcce78ffe372f4c58306b166f9456ed46cdeb255e395b7d30d42a, + 0x0623f3226b5470b2789b8a53040e44443385e96b9cfa0be4d35015158a468465 + ) + + mstore(0x100, 0x2cf4890650d27240e195f60a4f698eda249b8dd614b23376b50178d2df6d2b8f) + + pRound( + 0x2de4793a6f99cd14e3f6642211f4d0b7bcfa361597c544ffcb5a567e9076f47f, + 0x1d4d06d19ea1b09cad79086d51bde11725a554fa99559ca2f09f3bb73d728c66, + 0x0480e7479a66a7cd9ea61c8b28974389908350abc4aafc18cd75e33dd130c144, + 0x30430b03368ebcaa91246960490bcf917d78681463e2e7d744bfb44335dac24d, + 0x0b57b37320127d4c50f269124b0dbdcb2b1f1352241a5d12103283e089c0c742 + ) + + mstore(0x100, 0x25e8da9ae0e42e840e04b230370e782bdb67534844325ba36fc7e5e160c66a74) + + pRound( + 0x1e221c5526898bfd12de86851a0d9703751a2f239008ab5f9b7d3b6911c64184, + 0x28e07485ad7d992ed1a58f329ca12adce4ec693ebddbb2952e54d339f2eebda5, + 0x2f44d64f84de16dc67bd5ead51efb1dc8381c84520c12854dd5ef3a079acd4e0, + 0x050a76bc32ebd1dfe2be330f304edc7ace7167ab7ba1516f4021c62cf0d4fac2, + 0x2f58c45e5d659a67d781367241f6c35d8cb46361d97b28947d29421c270594a9 + ) + + mstore(0x100, 0x0b1d7cecf3a79b2ad3fa298f6cea7ae95d80c0299ecc918e9f8c9c3d38d59d40) + + pRound( + 0x2fec734da20fe32003ea04f127f844724f38a368ba10c29544252be796040f7f, + 0x288a6778f3a83988a8ed1727f15e93b4cb14f4e3a3bbb91dd6d1facafffd5eef, + 0x20dcc6c75fd89259be7f406750b3db679a25a8cd2715d245b9175390ac922c84, + 0x17f42ba10942df25cb8a541782a18b6fd31cf965d11178c7b04ac45b4dea5dd3, + 0x028eeb85d115a904020e0c6148eec6603e9cedabc664abee764aafd455986ba5 + ) + + mstore(0x100, 0x0df7ca7278a13650b919d85497b2ebb0f71035a7c20430d4131d903ab7f57521) + + pRound( + 0x0440339c9764cec79c16efdb834a26261db8e3f12ce1cf722d23c0e11ff4cf07, + 0x06ca647c29727c1962a002177da2d504f4b07a5f7eb57c79b88e6b7abbbdad5c, + 0x2ea120a864f5c4093dd1a962e8f013c7b8ef778b04d2ba5bfc3cab28619ba9e3, + 0x2bb737546c4aee7c0cc2ba87c1157e2a77c479ebfb5dc76adbb39cf8697633fd, + 0x0e30da6490625d33e79cd50176f568f9a2c28c2f449a2bd51a25d15686803a93 + ) + + mstore(0x100, 0x2e52328483cb5b7ff2eb4e45b12e51b26232c9bc17b7292954c0a9f6bfa51bb9) + + pRound( + 0x27cc589f5bf585794abace589fb8a74a2f784c0990b80fcaa6944097f870e2d5, + 0x2255c36a38c8735de45cedf452afa842332d33042f78e60c43c7455421b325bf, + 0x133d9602bd3378d69f681c27b05bdffc98b7d86cca63d73a60caed485784d087, + 0x0e1548e942ae9d3e26860699b93727c817a9948616c93ef4accd981b1dc3d78a, + 0x0f20f0e55d93689fe09ec312f6af47627482e4bde0a1602a8e2c8d6e84e8a6ae + ) + + mstore(0x100, 0x23dac8ea54082fc131e173ae55e4630cd4ca7c871b2a0a479c1e74e7f191e62c) + + pRound( + 0x02b2162d533e059a6eda2abb74712edb3a7860beea95dd8a4abfc957660804f4, + 0x19e0927715d1cc6d389429947fb3737dad733974c6b2e13e5b3d432519516c74, + 0x0d3a800457d77785636303b8b94f17dcffcb46048872ac9f74ef7f27ee573705, + 0x2c974d1952557a1aac5f7bae4996616da619b73f441c4e504dc8fe9cfb559e32, + 0x0766bfeeede2ccf3708e1b4ff30714c22c1d434cdbe8f55514babc2dd5d97bef + ) + + mstore(0x100, 0x1f1b2078b60b0fce07824e2a2bc8cae8ee673514b0070a8b45710cc78cbb9942) + + pRound( + 0x17d5fb6c2cb37010e3e358ab2d575376870ed33186b8eae49ad3b47e340a8d7f, + 0x175dcac76d8a8126139b583ae38853290246e43e783fa6903ec8007f178c0023, + 0x0c4fd08fede5d221adb7abf549898c91e5be7e85bf1fd2a611bf182cc2e71655, + 0x277934b909e72d3a3475bb1ec766ab7a38ad59b128303fc5002f02a65bdfe729, + 0x0e88349998dfe703f1b184524f9c394d6004ccacf9cb952896e8cfdb0b078b68 + ) + + mstore(0x100, 0x0815fb8591fe01038cd3a3b38b236f9efca77c618d3bfc6c2a7fa89296c7e64f) + + pRound( + 0x2eb1559566c536ddbc316f6482d51fa340557657700f5b8a846e812a0ed334d1, + 0x1c4dbdc335cf6764355208b4c9d243d34541d623c669dec2c3ba066bbeaf6773, + 0x2374a6b2da6f8cab8e5cfe8d805dd3a2dfca1e8b7eba5dc8574021fd1241e3b4, + 0x19dd342533ccc603a99738e3fb5a569b94ef71b3e49f90fb874f6161733072f4, + 0x217d66db6c7fb3effa508800587d2eb3c6d03d8385132f2fcce7f35f2705cccf + ) + + mstore(0x100, 0x05b58a3dce57b281a271d69895052d887458a715783e8317e024a61a35ec10bc) + + pRound( + 0x2bb943b40c2bd456a6c17853b1ca88eb0ff36f5974b2ff9a5f5093e9bf63a16f, + 0x11a5153fce659513ee7cb9974ae6cba581e3b4cd14570c5709fec3d8d3fc82e9, + 0x1b72bfd07635d8501b2eff8785a2495bae74c7653cf90e6d5c9f144426836df4, + 0x14902c0700eec897ae178ba8caf850d793f1d87512bea0ecea39cf6b1fee233d, + 0x09c138c6e0a616a49ff90d43a6b043f3b745b78865856dc4c1a45e2fd84cb3f4 + ) + + mstore(0x100, 0x004d303b2dea627b2731be83f93ac34e7d14d178a13800558ca7396395eb118f) + + pRound( + 0x2be8d29525c0cfdd5e6b3125e3bde3bf558e55fbe867f024457a96765474d037, + 0x061d72f78f1ba9dc6b4d7f7784225d6a81bdfc1b5ad6c24369f9c0560523d9ad, + 0x0bf18aefcacffabdf4112eddadca6145738b4803b36145bb9516db501a0692e9, + 0x2e73dd105fa8b2ec931d8cdf29ec679e3a9801a93071a7d5ea30659255f03bc6, + 0x0f8440ef667c9ae81337ba5d8c927a5347de7296860b211cad1ecbfb5d3598ef + ) + + mstore(0x100, 0x2862b41374f89b695274b33b773f2554916e2bff9ff672545fc2f49563f62767) + + pRound( + 0x234541ad72040a70da2996a35269230c94699eef313a4d480508008cbc3d37c1, + 0x0d123f1e72d26b92bdd8fd73d14286c312ad4c23acb46b2e08c157104409e174, + 0x2fb360776f0de79d7098ee7aa4123c05ee6b05a8be460a774f3a048e138545bb, + 0x03685c079434e167276c57d3cc79703b7dfdc41c156ea1e8b7f99b6956a55326, + 0x260af0e0fffcc9772c1631b179344566b47aaada3681eb9034c6f75c3705c1c7 + ) + + mstore(0x100, 0x1a84d56a67bfdd3d965abdcd329aa78d4fe93434496f2d103861fd19d66d7260) + + pRound( + 0x02a9912fe170310227189ea1e691d0362f18b38b400b0eff192ca59513eba8d5, + 0x08e513ade694a0d8ac1f3ebf1a96440d32c713d5058e1224e070348c281f4a6f, + 0x140a4a431e2ee79400ed7465978d84773213c628264ff80f21ac7a6b673d09ab, + 0x296af4d019cb5df7d959b29d549c3f071202b4eba8b53dc5ee979ed143377927, + 0x01832e284a7f4c81614882b6939fc0f185573bd2023e3e505765470bb812b349 + ) + + mstore(0x100, 0x23a27809583bd1ea51f436de5443e108f69d44cdf51dc1f03e21948b4980b876) + + pRound( + 0x040cb82847773927d2aefdc07489037a9d1f7631eca75c9fb0dda0cb9dbde143, + 0x010dcf084cc29cb7caecf26aa633bce4ed2b019f2887cee7b1a78f89d3fabe2f, + 0x07edc22a0911ea214425ef542b776db23b0fe5817810d40c72ca98aabd9afa83, + 0x2eea4ab08aec775f2148479ea36fbb96936da58ba48bd1d2d3acd48173aaabe7, + 0x1e40c0e8257fe4a61005cdcfad148cf7f47d1b5cfddfaa082738695518245f19 + ) + + mstore(0x100, 0x2dcb5cf8896de39f228e157c0c5593f4626fb9bc225206383db20360abf0c925) + + pRound( + 0x2e4652b044dbfe40e63b6b232fcd5f3f39abfbd2051ee68adc754080d49250a9, + 0x11e7abdb6ecbafc2e7d8cdefe9c7b9c50475eb475db3c2caf7f7d67f485775f2, + 0x199d52350cc30e8c73821f802096f0e547a13551b27bf6b899396f63ac5cf8e7, + 0x0f575d6ee67cbecd98345624e032a37c859a7cbef30b3fddc949cd0978484101, + 0x1c4b6f9a2ae2b418e6265acba9c96b06184d07028e5fb784f3475ae7772ff057 + ) + + mstore(0x100, 0x0be843ae5f9b07e52572178af7dae8ed05d36b12c0607862929355ea74023d9e) + + pRound( + 0x1340abb9f4e113186bdc26cbdf4bcca50b531a107f863ca544575e3cf870f8e1, + 0x2368e692b72787cb8870ea888e714e006f59d2b4460cfb74c48a8cc73b1d1a5b, + 0x1fab9add9baa4a4f56f23165775c6f2d922a7632a94f96374b7dc852756f54b6, + 0x0c7f7b82300d3c6ce3f8957ba1e4add54c4c015e20d9765d220571c16ab8680f, + 0x15d63e86beacd93c6083688e5d9c8f3c6947929f9f1f99ab578a4c3a922eff03 + ) + + mstore(0x100, 0x253420007083f1aa863ad4760905c1039ed4111c9f053f27710452f83ce36a90) + + pRound( + 0x1332749c523694cb6935e0963a07e81b05967ce1d950c0b731058ec92a7a0c9a, + 0x25439408810e074c0bdd4598b9815fee892bb95ca51029ecf009bffa5b9b9682, + 0x057e8d19dd999a918da29b0940b383ba9fd15db0b0f64996dff67feb55f9a742, + 0x1e014e37e9b117cf3b4870d999f2b55d3534d0a6be98e9e357fa43f01e70a29d, + 0x1a4ed24e6e03aebcd6bdb100533dc966597afe15c851b4b863f6e889084c6479 + ) + + mstore(0x100, 0x060283d2fe7f23dff513d9110b3dc62448bc48f531ce0c1eab5920bf23290a40) + + pRound( + 0x2276a1441971709affe6d2a99320001ec45ec72155c575ddeecac0e32759ab06, + 0x28957dd1218ea799fd3411eb19325853adf7ae8ae1281f753302fe7d31dfa7b0, + 0x2fd925726ab794c88bd75796aa3e7f1e6692f2914cf802267ddf01e37902a008, + 0x1cf8a5c9c76a84b147c8238d9253cd55b47c0c43d82966c4636a28674705fd9a, + 0x0373cbbc306e1bab9e7077368715e6230b4b2e2e4a1db9c674b8c359a41e9108 + ) + + mstore(0x100, 0x01b098c91e7b0cbb5c34588077c0ddf95300ddf614935630c0ce3a2627245308) + + pRound( + 0x0dab465d6d910740f33ef6cc0eadc71bf8119bdfd5a3527dc8bbfadfaa40263c, + 0x0cba7bcbc8224b2a8e4aba17977230a686cd6421dc0ca5346f3446b62439c4c3, + 0x1e4365db0790c9c4f445b0653c466ff21db96c38b4076ba8bd68bcb4dea6911d, + 0x1bb2dba2199a9ab3bc86ef5f9de7f6c5ca13d60eab42ced68de98fc643800a8d, + 0x0ad3c1870c6d6ef40eebad52123cd1a2913d9d62e80bfbacae812e082021f9ca + ) + + mstore(0x100, 0x2e3497e4d35fda596c06afa63bc3a0f2e55d4eeba4aceb60e65081ad63aa8b8a) + + pRound( + 0x19fd5c0eac14fae7598bd4ceea3b1e2998b0c168493b6d72ae41b576e55b9c3f, + 0x0d4749d79cc163f17110a404a46fe427c6434f3fe67b7e7b4ccfa6ab95bd7e18, + 0x1ebbfe8114a41bb809e0b33399241232eb940ad8728c8a516d40ada440dbfdcf, + 0x2704e5b6133d9764d6d3f17d49d833223e3937f80eb9faeabbfba9baf4b4c1b8, + 0x2165e1c8027305b1ae0e323571635e5d540d13d710c3f9a390b6913f14d035e3 + ) + + mstore(0x100, 0x0e970c19d19748d8c465104d8f02200363f9a41786f02f1827742b20dc0d1727) + + pRound( + 0x031da4345eecd6db6c0f7b07c7815d7add1fe0546d738f4d79ab5c57aa841edf, + 0x089ece54e47aa5c908e43e5f08737c1436967089006acab1c9cd19eac4a20876, + 0x2f53c15e2aded33c47f55a070483e6cc7f3821fbf8aa40677d0552ed9d10d847, + 0x142aa34f4b2e8ad0df7a21b3e39c00c8b0aa2857094801eaafd72befed077f93, + 0x17aea4da4c7bcf0d7588b014eb8b40979dd2725eda4e6ace331982467c7ff2bf + ) + + mstore(0x100, 0x0816be42745b7dbb4ceffe5b8e24ea60fd8b719deba50037ac7b75948745c6bc) + + pRound( + 0x04bcad9e553795642f59baf714a6bdb432fc45a0a0b77f1aba3a9823476df9b9, + 0x242c0bfbcdaa76f715dbd4ba825c71fcfed671c1b1901fa484c87f810315d0ce, + 0x25db1343c24104071023fb6ed34d9909078311e1efe85af0a11b19114fa9e790, + 0x2ffe4d9c420a59e9cdc7c31ab2bf35187ca147cb898a3942deb3677786036a80, + 0x125bb03af3e2cf18bbe6f5b590eb3bf8d0d1ba63be696483e98f283bc7cd07a3 + ) + + mstore(0x100, 0x1cdf8710995f5e03412b4a7f699532f9fd01f0ea167a8dfc1ddf37e2805addef) + + pRound( + 0x111160f9acf6ec360d1b6a712313a0dbcbe23e64420055471d2ee4c5dedb35d4, + 0x1377978e1b1f6a8925fa8e7b7941bdf8fb59ab9542342419283d8203435c9391, + 0x0defc1d8882166ef3ccde53a4f236fba83d384621937cee57e421a513d0d3397, + 0x2f8fa5c78c706e3a5d4a03f2a7a3953046d7e94cb88a7ef350e67b5ba0f0debf, + 0x1a2a957ec0a723da61c2134bab0bf17beb00e6dcd84690c230dcb9e58da94827 + ) + + mstore(0x100, 0x0271a863a280a32641ffa33510b2edd278c98630359532f3e506b275fd5d20ce) + + pRound( + 0x26fd31471828c36ae36c27b748054b0c0c4fe5239b301699e3765eebecc18946, + 0x0775d996cc2c4456f303a2c1f9007647e11a921d9fea3f7b926143b99d2fa0be, + 0x016fb9337708ca638cdfda91bd0daea6b97224ef7b2062672addd1bd18bb8900, + 0x2c392fbe7d3fde42fca4f9478bb439331258255356f184af6f76f119054117d7, + 0x187a2a3bf79a69fa3e5089ef9f1fd56fdb47c55eece77aa228aa3de1b486bcb1 + ) + + mstore(0x100, 0x2636e0973c865c1bd974dd78daaa8d0a84cdaf6be1ad47ecf2a0d18f117318f2) + + pRound( + 0x1557459c9c74c94aa00e5af69a1e3112fb69537ce897ec0c718958d96516f2ab, + 0x2a8e26ca8d647d9a6388516ea9dcff89083d539e58168c2a50c6dae30f109f21, + 0x21cb752194cf43f3b51942eb0040eba9de2bcfb1c2a3fae97924b710f26832cd, + 0x2c26daf996be247acd6dd4acad60d38b5a471e6322188d02c137e7cb484377ec, + 0x0240176ee0e7982eebe92a68d3e3a38c26821acc0f5d058cf8c137bca2d26f1b + ) + + mstore(0x100, 0x24d40f462114fe9ee02aafcf74b4fca24e1ae365dc75c3b52bb13cbbb2f21edd) + + pRound( + 0x19e84f4f25a799496041661dc5d975b681f6e06744cee89b7be5d9fde1744ac0, + 0x0ebf89064a3af247ca1f36f6f3570188e271e0b326c4fb26664e89e1454ca110, + 0x25c7e97b475be00e8b559a38c452364f4c9c531fecb8ac698f7fd73ce22e71ec, + 0x0444c99e592353e5aecaa302add901c14d8c55270a160afed4429ef5598ad74f, + 0x138db8887830565f2693d0e0f02e4e79e144967f0ba53b03519aba764b5c994a + ) + + mstore(0x100, 0x0e1eca5df88ee5f60cfa7e1fe5befbb719fad8211fa9b2d02fcc233190c17f12) + + pRound( + 0x21e65d6d8ee43760bca40e730b5df4c4cf3a8a732db148f4b2951b4c61d68e8c, + 0x248dd79669ec09dbf0350a15d6c75c6a9bdaacefca14d51300978f13d1ab6d1c, + 0x2b8238c1548f9cbe29fd35cf91e7b48f0ebda7e639edf69fe8d5aba7924d5362, + 0x2439fd239257f38181c7be3cf513f1bf7235eba94f6b8942a94cbddecf6f62f7, + 0x200958235281a61ba2c4be0aa3282a18c74b6d262f5de7c2e33d2bb3e893dfec + ) + + mstore(0x100, 0x03a35aa3123911cdb4535baed3359f5f6a5205b9c93ef31d35323a47807b8bc9) + + pRound( + 0x26b53427f9b3ea2c769d9c660fc60881a169c12732d001b7158ee4b1b842ca24, + 0x20f3b3f4acafe9f8af3e06661b3a8f778fa2812522b9d70a67402cff8db2b1b4, + 0x211e5d2b39d62520a7a627ece8cacbac9f97506def4ec286928ba6c27d463b17, + 0x0bb743ee34802129c556731aed9d302dcd085313ce572f6242d13832e536b4b4, + 0x23cb2661b488ee71e4c753ff23ae4bd25d8a44094f66b6532977e22140eba5cb + ) + + mstore(0x100, 0x180b11b720622a156849dc6f7f6e7f571659be69682230c5ed9ac339700a7cde) + + pRound( + 0x27803848a0aed96a93fa943b6635e450217e137f4ade74a62d7917322714b697, + 0x0cb37839c2c9a7ff79884cbec75f41e9be5e47c76d61538231bd8162996d6f67, + 0x1f0026d0bf1f8e1dd5423cc2fec1fb5cdaa1ecdc4c3cb218dbceef77c00d2f93, + 0x02a7d7bb970b8a6ed2ee66fabbba956b6da3b100f5b5fb928eef42f9708273c9, + 0x0cfd7f4215e434c8da17ec3258b0bc605ad1ab2e90aa494351e4ee40bbc491fa + ) + + mstore(0x100, 0x2350bf35477656899151ad7dde96ea7857e15501447008dab6b3d27c8ffa274f) + + pRound( + 0x04e96a965bce3d3a0a24a4a457c951582c871349ce7eee1aabfe578a94c65011, + 0x15931f782b45f7fb656f2cdbd1f7705c353a23fe1d30a5a46a1522ed160df3ad, + 0x2e296e57c97a5309acd26febf55ac963a5444c1c5f703ad88a0d7b97b9dd38b1, + 0x26157bceb78e846bbb262f9a1e06d4271bde5a5bce8f0419952f97ffd13eaca8, + 0x2194eb89847d6b0f1897f675f19c0c56b61b13248eff3ca36e34fb9d1c79ee43 + ) + + mstore(0x100, 0x0473ddbd52e737e527364e8eb63207975c38d5fd6cc32b272102b082cd1518fb) + + pRound( + 0x1a486f0ae591cacdaf09c58a49c4d1795405435340819e003f0469d110b7752b, + 0x1b56dcf76fb23cc4a834d455a4065e133571402b7df309d59bc3105d42a8c301, + 0x1a749d7964af0b7202913ef204c653f2b4bfb65ceab7b685233ab59ce3bb6925, + 0x18ae590073f969696af762ffa4e8f0ebbf97f8cc787e37cddd1f321be3beadbb, + 0x21c47b275d82dde6460d5e769a99421144b1c5a9da59294ade9cbb317103f249 + ) + + mstore(0x100, 0x241dcc51ac37808a415dd1e3c281f05aff11789dc0cafdd77a35484e0993f9a4) + + pRound( + 0x0b12fac95b6d3a881d892657c8424e645ac4e6b00515f902d594574302b26e02, + 0x08ae7616a260cf6657f8f73ac284588d2c5f07ff425d837aa7cdcef63e3e2103, + 0x039daf6876280b80e873bf2a32fd2834a83c69757badd58a888ef819e926ce28, + 0x25e7b1d7470a3c75f13f0b56546c8e09f2d8efeff06ef766f9c783ca869d130d, + 0x1e8fd3634c3ff764184d03435f98584b11b5b15aeb9c75262da3f1ea2c2a9e7a + ) + + mstore(0x100, 0x1fa195f834a69e62372f60eb497da167646eae14153d803b39dc5d11f5d7800b) + + pRound( + 0x1ffc3153c56ef9755932cea2be0573749bdafe1c4fa0781a4b8b4078ce9d7547, + 0x17630d62d9a3e510c88a4d43c360f92bc0fa00b66031adec29bd9543fd3a17ee, + 0x2980400edd1d74e3d69db5458d2ccd5fabdb236ec16a82a4301a0ab59ea4a6e9, + 0x3034fb24366123ec6dcafcad35726dbfb16194c036dcd648fa69439bfcd00cd4, + 0x1aa7e8f4189ca9dff3db2ab7648be0a2392995ce46041e04680dca8ad7232df0 + ) + + mstore(0x100, 0x1e4a8aace15abc1d5b76a9e848431d2c06a78f72b6bebb1293e6c58e5185696d) + + pRound( + 0x0f23f1c74d5fbf6195ad5a6aee5e56993c5477e8453f5b93a0d7bafd333036d3, + 0x016556fac9348a735ab50aa089c97151b3caaf0a20a34fb9d9370505a1515729, + 0x23d92b793648110fc5aeef0633f0c77cacb0dbbca1879b8a6f6e5df445e5f70b, + 0x2e4c10ec5e65e2f239bbc43c13031df2686ab40fd79a304b05d611b823f23b73, + 0x12418bbfd77b63ad5e16864ad9c32ffbfc5a3dd9b78ec2b79329fe5e0a8d2953 + ) + + mstore(0x100, 0x188c926255f5b7af3da96355729c2a8670ab4c2c70400481b2ac903740e0c5ab) + + pRound( + 0x0f3e96107decdbd6872c20ea09acf92cdf17a3ee1d1331488092d96176deb755, + 0x012c3780207f395cc21deb0abd951681eea32498ddba6ce897a8f9f0c2357067, + 0x13eab1b4e672ba1b1c1bb901769301f1e5659d03ea10c61de2477ff0ac221421, + 0x20dc664abb20b7456c06629ce37a1ecb1a27a4e8b24e31b48b9c4635aa30323e, + 0x2c6b1e2cfea78e2c36785e76a8cfb1b057e9471f24f5b391175c3decb01e000f + ) + + mstore(0x100, 0x233031847b476bead0118d3db338e89133ec420d673e504ad647259df655571e) + + pRound( + 0x2f9913208e09e3d6e9e6fba6384fd076ab89f2662976e3e30e0870bb30eb54f2, + 0x2b33803d90889706e714f720b5628d26fb60b545a1f3e9ce49a6ae912b024086, + 0x26ccabc10eb04327cb5cc3dde2abb36f097086c97e738c133c9f57077e748b09, + 0x1b16ae0d7c54408cb75fd931f246751f2b0c3dc20d79e82a2531b76c22b4d5df, + 0x11d0bb461bd8af2844f49f0f840c94ef9518b2511344742d1f5438fe3d415ae4 + ) + + mstore(0x100, 0x217bef2f4f12c6dcc91c2058a23391cb77de53ca6e44dcdc6ea3d36fea326ea6) + + pRound( + 0x1f84e97895bee438eb3c92dc9b1846c9ad29c164387b06aeb6ed1841ed8c4dca, + 0x277f7f9b542f0c2bb5f45bed054f09624536010c3cf9452d2273193327f801d6, + 0x1efc9c9069e5068baac13d2e6645641b7d27e80fc23077161535c44682ee57a9, + 0x0d6ec477761e2efbac4f14b3bf3d5257a99e64c3f25fe104faf988b20fe5ff44, + 0x0e0e7d7c5501999b7d16173b59b7cae1f203bef21aebf00251881439ccf93013 + ) + + mstore(0x100, 0x226bac7050166e5f6db78cd0b12d36f305b6e8c9a055114ad7709e6f57245b6b) + + pRound( + 0x05780c88adf01531b50f817e3fe44447d29b35aa8a389c71e8cf1226acef68ba, + 0x18733887a6b2b3b4c90d8e4990196e23445e47d7ea5939ebfb89a3ee3d67b4bd, + 0x20bace63acfcae0b1c9f2bee24b8e9da85ba597d37b0905720c4f15db231b07a, + 0x166ea595375a6786ac527ee9eced73ed6bf550876abcaf3ac92b42c808b00d8f, + 0x304262a9eff4040acf43e322d6f52676ae2f853ec2e7a80db00c488cf917c74e + ) + + mstore(0x100, 0x1980077457995712c44da7e17713258e3f8eb354bfd80ed9eaf3ecbaf6960105) + + pRound( + 0x26b2f539c573829f6aca91baa954505bc5c3eb4e1df1d638582717fbdf2388cc, + 0x06a0fbf4cd52e93ba5e4c6c4af65db02ee96297f8ad200f2f1cff252e769b551, + 0x2cb9c24112d35341aceac88360fb528924e58b6ecac321b9fb29e6aa3368ff23, + 0x20e88a4d607526dd07fe08a3552a44669129eb87fcc0b13aac8fe8afd9301521, + 0x1544649a2bd73e3ba72f396df91dd65401dd8faf51de325fbaedb9d536ad94fc + ) + + mstore(0x100, 0x1f93a532917394c7e22fd17abeea6389c66fd7ae2dd9f02f860f6d96947f0edd) + + pRound( + 0x25d1d22ff13e7705d3c085f97fc4e4f6914b82ffaa5d2091ec64dac423765ef7, + 0x2fec990ef556efe1035a464ff5581e74067445cd54abcaf6b8c0399fe0d24cfc, + 0x1bd9563506d9544ef3e4830e13545012c579379c2dcc1330416c4ae49bc4ec61, + 0x00affcd17ba6003c56dfa85571fc29737b225a80d480e7dd7edec01f14f23010, + 0x23670dbaef966881f07f919a2d883128c7b23cf767a477b2b2e0762bc0dbc18b + ) + + mstore(0x100, 0x08a2c18ba41381348c1acfbf9617716806b462a1691bc2e343b79b8085e376b0) + + pRound( + 0x2de42e9f537b7d61b0213771c0e74f555512be07b6a50934734e2c5beb40be37, + 0x25c557f45b99781cd37d3bb22931662a67f78b37782c885b456bb96d55e88404, + 0x2074c8b709705c9888538a7f8a3c4aff647731bd16f8e254fa74ea9f2be7662c, + 0x2738355956298138949e442171d6a4e4b74ef2065740db7cfc3a0b60fd573acb, + 0x13d36ad0a4ebeb81969778649659c65cb7d0c41cc519871fdb71a9ea6a0caa56 + ) + + mstore(0x100, 0x277c4de2363d8b5b456cfc5a7ff8e46ff2ec8daa59855f5ad64bc0521f3ac567) + + pRound( + 0x059092fc395aed285807bbf557ad9a1041f59c079822b1088457882fee7b612c, + 0x161924151b5a5ad2d8cac119522a991a906f15e8531dc70567f6b28371cc24e3, + 0x1c68ca8f7aa17659075405ef6341b8e69a298b9a4d72f3bb854b309e4ba87a1b, + 0x27f5d03bca1c8207f7239a4b2cf73ae559a15aa37e7bdddf3aab05eec5ce5592, + 0x0ecbff4846962a975d347ea9a8fc465fb46861557622f2c2564a7e639833c169 + ) + + mstore(0x100, 0x2667349978401362f6b17939eeb0e64ff55607ebdb35c7071db46bb3e7ba4778) + + pRound( + 0x1b11862c52acd351b7a464793f4fbb57fec99f832b63226f95d175c8d2fc08b2, + 0x06a719c584c74ffbdd7218eb565cb4c8bd86c92e3dfb3c73e1527201aa51234e, + 0x230e4adeecb799877f7ce9a58c836b99d533584a195c1d77a313abe1c7d126bd, + 0x10b109b864809c4767a133cce6cbad6c88628173b8ea51e8cca85830ca7de522, + 0x0e21117970dcfbd4b1526b253636f377538d3b4faaeb5a8b24bf6200d14cc591 + ) + + mstore(0x100, 0x2bcb0b0db8b9e3e02b7e9c1c9460fdd9c6cd98562332e648d8a3e0ab94597520) + + pRound( + 0x05000fa5fda505e029a13bfe304c267b0d86c72c039babf6d3ff02ee246be02e, + 0x264d9e094aed5f41a60242220a34a284089087b2436a9bfce8174cc9be8c2e20, + 0x08076f9c4743de6130ff622cf401edd2c92f24bfe114f3c5e724891746315c47, + 0x132370abddbb0b1dd57f2a520c25336bd7cede94b95bbf5c2151d6d88e641b64, + 0x08ff1116b7a227bfdfd4465a67890882b615c8c4c17f28d8d24958edf602ddcb + ) + + mstore(0x100, 0x2683b425e85a508f96852f14b4220fcfe9f7ad8b17bfefc0e348c47ca78bb57f) + + pRound( + 0x12ea68ce6881becad7f8a6b117b03ab976f7abd597f903b0bf230d20d21a943a, + 0x27439c98a76688067a097b19b6fdd7d78d5f88e274e0d8fea5ea6b7406fdda7f, + 0x02f40d0ad05f5652e31ef9440ad71ebc8419e393493937f05f00499d02a99e36, + 0x2fbf04284327ee4f680f06bd390e309d0d13acc74b9c5b14b63059b8cc7abff5, + 0x1be686d53e2a8ad57a828b0651425cfc6978c7027edbf247f6b6723c21df86e7 + ) + + mstore(0x100, 0x0e2155a545fe5f3cbb6397606589eac19cd92639339c6b017298a4ad3408b4b9) + + pRound( + 0x16dace9b2e8012e31db1c7ebe672d86bbe61a1aa3e1693e0eddfc0de0a9dd951, + 0x27a321f8c7d3c9022e962f7fef2e3c848b4539dbb75aa139f30430fe545bcedb, + 0x06ccd7210dee1d6b0e22b79e12d19082d8078b788d71007b95e7a774ed86a651, + 0x0a41dd42221653752bef350f6d74a917b6cbb1fd76a3a12166f4d0be978e4026, + 0x220a02881e4d47ac94d950cdf8386274d1782e27cbd0d845978deec91298f165 + ) + + mstore(0x100, 0x2901d946addc94b040fd58004d9a5f8cd1926540c7a8612cec1c58cb60c2b3a5) + + pRound( + 0x0f0f19c6291e51546a267c60cc774e5fb9d088bac530782d891ec1af4b847073, + 0x0e925bcd1c6ddb4a3a1c67ec8deefbd40c53c0d33e7aeef1b46795aed5943c9d, + 0x2ad000b1748abb812cd6e5411286b9ff3ef0a5bd3d259a36e45ef05b9eb5beeb, + 0x0a65aa232d32ed6e8de63d1cdffebc2f3fa616465c27aaf97e8cd3dcff648652, + 0x0263d8470ab4b1c61d74d8e896242f4f261dcb167a3a06923893d7cb2c93d6a1 + ) + + mstore(0x100, 0x08e2b8273bfa30c1ac850306d91e468a9e8d05092aee4cbc80c687248463ba30) + + pRound( + 0x1889cfa8209f4952df9022db9dc583b5717a0696da41cee64937d0cd6321e693, + 0x236064d71cb6c64c84747ac25fcf8d881502e5f03bff87561b85a116b1f39aca, + 0x2ff7a174ffcec29862e04f5dbdc73ebf3661570033576290c0c1f6cd8ced27ae, + 0x19e724a1d742cab103455f0040edf745a2696a71084c93e322715450dd4d6f5b, + 0x03eed3892b6f0e6c5da1059c5f3793985835aa283500a8129904a94c87f161bf + ) + + mstore(0x100, 0x29c61184ed9d460f337558a1af639aa7e3c0975e4014ed8ebcad4a25d51eabf3) + + pRound( + 0x07adcca76d8337728839a1b6ac3b3ed42afb87d72af98f52f416f2ec58b28cec, + 0x171ef37896bae2b1020a0a5839bd51784ce11bb4237d548c171169d32fa19b40, + 0x20ffdfcb86f4d005064edbc296918c332d32fbeff1729de5056a26abbc3a35fa, + 0x08ecd7a6f1735eed86baa094e608f488f38dbb398fcfed4b994383a0ca8e4647, + 0x1c3f5d86e5921fde9890189f1d8c618754288600e6928bc182ac4d5e4c9f0ccb + ) + + mstore(0x100, 0x261db25e7cff5a9fb72f276b1f9260b667300fb7d361b50fd5c0e8b6995b05f9) + + pRound( + 0x0defd45b28958728228adbb2dbdaef6a5e9b1a64902a734f402b8cefb8ab3b56, + 0x0a74ea22d8a09336060610179ac1d82fffa9492df76deed4ea60e0133b0811a8, + 0x03a37bf12daf1400d297ac4ac13ba24c17dc262db16c8523deee4e0ccde9a680, + 0x11fe1790d5abbf5935ff22318e4f7ffe69966ada2f9136b54f830eacb0a65368, + 0x018165842f406375f2346686915afb14bf1fe0564c8858ee3bde0aba3de5f68f + ) + + mstore(0x100, 0x1ea210f2001a334d3e801f4e53270d42da7aaf317a553b4282aa78eaa2282e6d) + + pRound( + 0x2a3ac3314b2b66e796fbe36df778c5e46972320cc43ec807048826b6704ba7c4, + 0x23caa4b80ecfa99e9d3fea2bbc1dbbf369d1bfc8937d03d074061c30fd8cd76b, + 0x27db260085e224898df145f23f635f2066d8e4e124e581e8c6261929b1dfe107, + 0x274f6c5fd34a784d6b915ef05d424ee6c0babbf369e79ab138b8167b5618ec7f, + 0x2c3a29e13a84d26a0911c9289daf1aa4cf5840aada0701d57e23dfc796da6da1 + ) + + mstore(0x100, 0x285745a90a7fe3d09af5a808704bc69c6f1701e573912df5cc1e265d596c4141) + + pRound( + 0x254dbeb52884b699c1ba7fa0d6e80d610903b18a3e509c36351ccc3b024946e3, + 0x059e781d65896ebe0e4ba26dc2f29907f47bcdeda4a2ca2c713d8505ea31fd5d, + 0x0b5b1cec63d42d5e615dc269b885a24cef303ec78c972dd17cdbb3e915cc4ffb, + 0x2a7c015e9c3b2c57ca8b7d26d39a1bcc85d6ffacb7d9fbd66d2a8f1d64ed0c92, + 0x29b736b911d71a79cf63d8a6f786f11bd5abee24161dc567a7c851eae1e43b51 + ) + + mstore(0x100, 0x2cd055ebb7ee4686365dea450f046ff62405fae1b1afc9fb01707cf81da0e3b9) + + pRound( + 0x2d901b8195c3c96c8c36eb99fec0134ec2b8304ae810bd30da554e3080826715, + 0x1905d3518355eaba7859b591ed7b8c9c253980f0450dbdf54d7a7782ba058392, + 0x23e813026fc0b80064d19b5c5428942fdf7efea80bfa8ec4095272bfdb7b4c9f, + 0x23c0a19a252c87e6b1c1c21b1a79800200c3fbff3e3300e7e5568071de9efb81, + 0x11c4ae607bae492413bf62cdaa2c2868ed1fec6dc0631b067ca60fab125b9e2a + ) + + mstore(0x100, 0x282b37020c0890d751c3fd76950d8068668e1dfeae621dd552d2de887da2ea75) + + pRound( + 0x053c9fef2e021fa9a20fada22fdea1505b58a3159bbb47337dbf791b215b1452, + 0x0a35bd74e87cbabaabe89ad1319d2c9e863b4c631c21938c9a5395bf97872a9f, + 0x1c115056539ce20cd5a04d1a5c43e2b00fbe83b25901be36f5ddc4666fc383fe, + 0x242954047e5772fd3bded590ec8beb4c542f2e264c8c3e284cdc473505c51a90, + 0x0e2abd315b47c0dc93849c0cdf267e811cbdbdb200a6e7c2b67edf7cb0174214 + ) + + mstore(0x100, 0x225be36ed0ee85e1f845ada84e5748a56699152113ff61b5056b6d8bde60c19d) + + fRound( + 0x28933852266b52d9ea6b5bb923d9d94f2e5a5be5c778e75e07942c234b643bd9, + 0x099ab6765505ba1198ef140e77b7954d4fbe79a056ce72bace39c048c00da3cf, + 0x2af211d8e0ac2d8fda7f849b8f229a225c6186b55762c7a7b2ae2d1dd85c57cb, + 0x0cd070f234014a2809ab90c71c1da61e98a96322fedd99b6aaae1ca104f3facf, + 0x26793e2abc8d3c30c60626fbaa158f263587d6bd15833d448b116264b930256a + ) + + mstore(0x100, 0x0ab4773f150c3f8ad3bc9538f43cec395a7e3731ae973fefeb623a09217e64c7) + + fRound( + 0x02174f49edb02d5154d2beca2dc92b9cc595383da1fde8f09e4b5ee3ea5a065e, + 0x0f64891c2c8b020e46c3594cb758f0bddcdbd09bd0308816fb41734a869872c3, + 0x192a84ca2f99d36991e2d2b1deff3989d1c156c239e10e9f56140e1854576067, + 0x29dfcd7b63f05abf2753a8c341d6b7a60c6243b04c9a1b8b3320bba04a4d4787, + 0x1ee27ad6b9b5a867733afc61a2b3e76a52ba3e4bd5e657ade91fc038819dba5b + ) + + mstore(0x100, 0x2d9e32a7c90556fe108d255ac01e75df338fcd63b2bf84c19280d427298863fc) + + fRound( + 0x13c352a02f595186202cb0b99fa58c5542ab67f9b6d3a0afd103deeff6d80f41, + 0x2a97cf2c10c4bfbfd299f67c52a169f92c05b7dac56a41c4dd4fe87c8246ce14, + 0x00becbb47042bd7f8c9f6bb422162d1aed089a28482f7fd16ab06a13285fe702, + 0x008e44da21d738691b881757ef37ed29c5bd9f7a4450fcf53290a92cc2ca2176, + 0x2b205a8b6d4b7063d931f3bb5d3464053843fe7fbe4b83c17883f86527882a18 + ) + + { + let state0 := addmod(mload(0x0), 0x29a322a84c25bd2ddf6e2e4200228d95abd6349a02266ac1dbba520738ceca97, F) + let state1 := addmod(mload(0x20), 0x0678c9bfc6f2df012f4fe55e33bb68ac14ced1df0d02152792089d046d828c43, F) + let state2 := addmod(mload(0x80), 0x0faff3a5e7425794fe20a7e0eb615b8b1760394b7f2304286a3ae4009124db23, F) + let state3 := addmod(mload(0xa0), 0x1f8f5b611af9feb9cea86c084058120553e404103aee213f5a41d1d02541c0d3, F) + let state4 := addmod(mload(0xc0), 0x160875d8479602f96f40acc2d042ee52c1588b6a29de4284965a6dc6c930ea07, F) + mstore(0x100, addmod(mload(0xe0), 0x16d87a5183a316a1d70afc951efe2cd667c77328fcfda458cbf5fe3045f46d9e, F)) + + p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x100) + p := mulmod(p, p, F) + mstore(0x100, mulmod(mulmod(p, p, F), mload(0x100), F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x100), M50, F), F), p, F)) + return(0, 0x20) + } + } + } +} diff --git a/contracts/PoseidonT7.sol b/contracts/PoseidonT7.sol new file mode 100644 index 0000000..340ffc4 --- /dev/null +++ b/contracts/PoseidonT7.sol @@ -0,0 +1,1079 @@ +/// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0; + +library PoseidonT7 { + uint constant F = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + + uint constant M00 = 0x2abd9e16b7b48289aa19cdfec726fa3fa15cc1625102ae511bca45f39d337e9d; + uint constant M01 = 0x1fe9feb5c7f7c7a426bff032cd6a3158278b6c6b2cc57a871213fcafd6427989; + uint constant M02 = 0x00cdb2db9e4f9d732d217c5e3114821165d49e5a2d41556bcd53d0c4d433224c; + uint constant M03 = 0x09664216ca565c1a44fc2b98347ea8b36904b3877f2159dcc999895adeb4d70b; + uint constant M04 = 0x1463f51d4a4cb1eba16dbc115566aa48fe77b43c244c9988a3c658d2f56493d6; + uint constant M05 = 0x214e41788bd2b990347c7f2a8f47612d4dfceb1a1e6da38165873df66ce51f59; + uint constant M06 = 0x0548541724f64e20128260899abe8fbcdff184a1957a9385fb715923bf0fc79d; + uint constant M10 = 0x1b4bc5885d1cfc8eb691875300db5a0c7362ae381898acaf8b63cad04ecb36c6; + uint constant M11 = 0x0cc7eabb154aa7955eac47a19f6437a2b8dec0fe9e5686150ff6e88b1a7b4bc4; + uint constant M12 = 0x012f3bb29c972793182123f5c49306e16a3a787c4bcd9c798a131b70856d1cbe; + uint constant M13 = 0x111fd8dfce2bd3b7ba0cfa93e20fb685abf76d77305857b8df30914e4849ecef; + uint constant M14 = 0x16afd8f4c39038b8006a59d292aea84731c0f83832a61b82250ed90118e8fec2; + uint constant M15 = 0x03fba82d3f783620873da94e9f4e84c8b529d76f54e4b5d7d4805272af9b9775; + uint constant M16 = 0x21c5e25a6991364e59a205e5b01c811deeb095680a72928369cfd2de71b14f98; + uint constant M20 = 0x08a72fbb55dde3e93c5818571a424a54953695029eedbcf91eaeb012751c7f83; + uint constant M21 = 0x0393efd96399aa0726ef9af79be8b6c715e429906ca0d15076b5a990fea75ace; + uint constant M22 = 0x0bba9006404c5ede82b527677daf444ed43fd1e0dbdc5528dd2cd1f17ad73481; + uint constant M23 = 0x19f53c0a592b3ea93497a511e56f66753598265b1ab6774da48eec04e4d93426; + uint constant M24 = 0x2296361f3bf154efbab996921936e9b1dff8352711f958638172055333e07579; + uint constant M25 = 0x066782fe3e869de2cebd7ebbf60fb435785329dfb12ad9bd1b4e46ed36289511; + uint constant M26 = 0x11c5cc53f6338c825817aff7792a2efbce8fff171300d41455a2edac37663d02; + uint constant M30 = 0x0f95359a1f6845d4921892f83e500bbb1b3d3763d8fc762400af039b0abb83f5; + uint constant M31 = 0x0871233835b752ea030cf8a4f43771296eeb33f697d1b0825db47d39ac9e5955; + uint constant M32 = 0x17e4e73bf701f88d219acf1ca6390cc1e17c9f84b1713820837ca070be84a2dc; + uint constant M33 = 0x19b683c39d3b002fc3523b7bee5a60148b1dbdf18dd1c318e6a541e8cf66a174; + uint constant M34 = 0x1c3160ebaeb10f809f69843cf8d5bbaca198d1f8e3439be29beb92d909ec891c; + uint constant M35 = 0x1c5cd6b23ef336be01efa37a27e6b7aae5d1643fceeb212cdff51588835fb537; + uint constant M36 = 0x27a0949fdc9f10495c4ee7214aa0edd2ad8eef68f577da8b96f9d87a39504bf9; + uint constant M40 = 0x16f01751ce985328afde34d81619defb43e6c7b5dadf52d0f82472fbce7770d9; + uint constant M41 = 0x1a02798f047a51baaea34fcfb26ca6afe96a5fad1d2db4270497b6e6504891cb; + uint constant M42 = 0x234b8a077ef52b53a343b8da5b20cc358ad60760dd60276d485015f73d53d207; + uint constant M43 = 0x2547113a818779f13e3448719c7ef100b8036bb3e882dd5e6456c35311c1bd5b; + uint constant M44 = 0x094c66bdcff54382cd9213abe43312edb5b4d414c6e09acca24912a7635404c6; + uint constant M45 = 0x2f3b4bf0f105f88e27248af094e29feed9ff3fad9a794e15830bd2b311539453; + uint constant M46 = 0x1c7fc68f3fbde4a23c455ef0d0dbce0ce556a0194e6d552c0455cbb5b0c230e2; + uint constant M50 = 0x1c391626328457fcafa629f3e6d33e2555e8d885e3c07cecc8af1f4d56596417; + uint constant M51 = 0x055665d76df3cd0fcb713c234ea79d06a31d6e3e4c3bcc657dba4c664d5a0da0; + uint constant M52 = 0x2dc3fd77394b7b5ac1cbd1b46e6ded5b835d7217a4c50a487ae9a35a7fd45d9d; + uint constant M53 = 0x00cf148f8045cdbe7bb1013f72ebd4126a3e35cba9a970441ba8d5bc76943b0b; + uint constant M54 = 0x2e883bd408c4c826d004ff777d7c0938434ab5bb84f3420e5d94b853b1746f89; + uint constant M55 = 0x2f4085eaa9f80a69b739fc23f2fe4057f64729b311783fcfab3a0a36fc1ff432; + uint constant M56 = 0x11d0f56fc00e7d85b3a2939fd33991dc8abc1ced0c3f3c530cbfb4500d63de9c; + uint constant M60 = 0x00970f671b9ba35e3e3c642d1e0b8032023ed5bac91c2c1056f03965a42c5297; + uint constant M61 = 0x26ee9691a638edc7c91887e302fc55e8e7758286a44845ad88fd7de3bb1052c1; + uint constant M62 = 0x1668477640fab14c72b1c16ff0192e48cf882f12276bd12f97f82c6ee2e61e48; + uint constant M63 = 0x3008421eed767a093322a09c3733973a038168cb28cd2e1f709076c00b869599; + uint constant M64 = 0x228af6d425e91a783dd18fd89a6b38bda053f2f23c094b875f27cb3abba2030b; + uint constant M65 = 0x2363603349e94f520fa1f98fe2507f6aae361934078aa59a16214c088185638b; + uint constant M66 = 0x01b2e9d20d9b55deb048cabe1636f0e96363bec886679cbd91f332fb2bade44f; + + // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40 + // Based on: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js + function hash(uint[6] memory inputs) public pure returns (uint) { + assembly { + // memory 0x00 to 0x3f (64 bytes) is scratch space for hash algos + // we can use it in inline assembly because we're not calling e.g. keccak + // + // memory 0x80 is the default offset for free memory + // we take inputs as a memory argument so we simply write over + // that memory after loading it + + // we have the following variables at memory offsets + // state0 - 0x00 + // state1 - 0x20 + // state2 - 0x80 + // state3 - 0xa0 + // state4 - ... + + function pRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x120, addmod(mload(0xe0), mload(0x120), F)) + mstore(0x140, addmod(mload(0x100), mload(0x140), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x120), M50, F), F), mulmod(mload(0x140), M60, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore(0x20, addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x120), M51, F), F), mulmod(mload(0x140), M61, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore(0x80, addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x120), M52, F), F), mulmod(mload(0x140), M62, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore(0xa0, addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x120), M53, F), F), mulmod(mload(0x140), M63, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore(0xc0, addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x120), M54, F), F), mulmod(mload(0x140), M64, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore(0xe0, addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x120), M55, F), F), mulmod(mload(0x140), M65, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore(0x100, addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x120), M56, F), F), mulmod(mload(0x140), M66, F), F), p, F)) + } + + function fRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x120, addmod(mload(0xe0), mload(0x120), F)) + mstore(0x140, addmod(mload(0x100), mload(0x140), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + c0 := mload(0x120) + p := mulmod(c0, c0, F) + mstore(0x120, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x140) + p := mulmod(c0, c0, F) + mstore(0x140, mulmod(mulmod(p, p, F), c0, F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x120), M50, F), F), mulmod(mload(0x140), M60, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore(0x20, addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x120), M51, F), F), mulmod(mload(0x140), M61, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore(0x80, addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x120), M52, F), F), mulmod(mload(0x140), M62, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore(0xa0, addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x120), M53, F), F), mulmod(mload(0x140), M63, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore(0xc0, addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x120), M54, F), F), mulmod(mload(0x140), M64, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore(0xe0, addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x120), M55, F), F), mulmod(mload(0x140), M65, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore(0x100, addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x120), M56, F), F), mulmod(mload(0x140), M66, F), F), p, F)) + } + + // scratch variable for exponentiation + let p + + { + // load the inputs from memory + let state1 := addmod(mload(0x80), 0x1322f0fffc7e4854bd8b5fc23e7106b51f59bd5061d8b565aca2fd3efe512f79, F) + let state2 := addmod(mload(0xa0), 0x19e414f80380aa2d222133118c337d82a8c5894c2f88861ee46f448fa9d61359, F) + let state3 := addmod(mload(0xc0), 0x22241199a4df9cb7d65249d9562cad6c65f16460e79a7939cbfdd6d7b9209d9a, F) + let state4 := addmod(mload(0xe0), 0x0301061735384dfcecf9a311c22ade327b51c78b211615f41c77f6d85e8a41b6, F) + mstore(0x160, addmod(mload(0x140), 0x222c7318ebe96306c9d79ac11237263c6b8eb25272eb88407e8c29a358b40f2a, F)) + mstore(0x140, addmod(mload(0x120), 0x0e31dcf9c53209a817eeb292e989727c3f56bff65883afe5fdc28ac3dfbea675, F)) + mstore(0x120, addmod(mload(0x100), 0x229e1d86c1f2810f4a2633b7b4b5bb61b7dc5d19ac95fd8d379548ff2b6850ee, F)) + + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x120) + p := mulmod(p, p, F) + mstore(0x120, mulmod(mulmod(p, p, F), mload(0x120), F)) + p := mload(0x140) + p := mulmod(p, p, F) + mstore(0x140, mulmod(mulmod(p, p, F), mload(0x140), F)) + + // state0 pow5mod and M[] multiplications are pre-calculated + + p := addmod( + addmod(addmod(0x2fa29bace00ac0dfacfd79691e1410a3a9544aeeefd8e467c188804a9216b8ca, mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), + mulmod(state3, M30, F), + F + ) + mstore(0x0, addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x120), M50, F), F), mulmod(mload(0x140), M60, F), F), p, F)) + p := addmod( + addmod(addmod(0x116bc44ec89691494126707cf0635682b39ff964c3c8aeb2c5814e0d16aa6d12, mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), + mulmod(state3, M31, F), + F + ) + mstore(0x20, addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x120), M51, F), F), mulmod(mload(0x140), M61, F), F), p, F)) + p := addmod( + addmod(addmod(0x1da55d8c9b9732ccafbf0050e362abb55c5ffb273ecee39e3e420385ca779922, mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), + mulmod(state3, M32, F), + F + ) + mstore(0x80, addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x120), M52, F), F), mulmod(mload(0x140), M62, F), F), p, F)) + p := addmod( + addmod(addmod(0x121540b4722a5beae6a95f858d78899b1727df4f887f48f06cf90bc90fb3a795, mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), + mulmod(state3, M33, F), + F + ) + mstore(0xa0, addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x120), M53, F), F), mulmod(mload(0x140), M63, F), F), p, F)) + p := addmod( + addmod(addmod(0x3404a8f0340239753291f19b5f680a76f95bd3039fc47c23b5598cca873a03e, mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), + mulmod(state3, M34, F), + F + ) + mstore(0xc0, addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x120), M54, F), F), mulmod(mload(0x140), M64, F), F), p, F)) + p := addmod( + addmod(addmod(0x18893102b09655522ee1664290108b9522823061c33663036bbf541f8ce2a2ae, mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), + mulmod(state3, M35, F), + F + ) + mstore(0xe0, addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x120), M55, F), F), mulmod(mload(0x140), M65, F), F), p, F)) + p := addmod( + addmod(addmod(0xb694c6db328f9a5c78933ba3048632f45e33c7c0a5ab9b29750108a6f3a0993, mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), + mulmod(state3, M36, F), + F + ) + mstore(0x100, addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x120), M56, F), F), mulmod(mload(0x140), M66, F), F), p, F)) + } + + mstore(0x120, 0x21bee2b8ed54b726ef17f77366b1dcfbda7ccf1e487f9916e5f963e814c57312) + + mstore(0x140, 0x300e1b28dabebdc0d4bdbc19be29a3dee4eda8425dd0c7c6e82fec147cb070ba) + + fRound( + 0x222c7318ebe96306c9d79ac11237263c6b8eb25272eb88407e8c29a358b40f2a, + 0x0cb416b42c53a829cf4fc823be8f4fedd12593394cd529053ff4e3604974a2c6, + 0x0892729d09594a8d8b1adfbf2e2ed75399dee612842b6db3d2d2c2aaddb6c0aa, + 0x18e39e9ae45f14ba97a15bd672711ae124375d9f482a4487a0e334dee2d27c71, + 0x2560c9ff672e6ea69dbb33844d0d22870461d18eaf0f8992d4d7ac649edd6610 + ) + + mstore(0x120, 0x06cc48ed882405595b34d39138f50bb5b31a963a0dba66aef17c19ad622e29b1) + + mstore(0x140, 0x2a67f3ba6d15949932ac5622cf9e2b493801bf16a50336a4518258bcc6867c95) + + fRound( + 0x2c44a5ff45deea69dd2961d67011af4982b9405f9fe38de4a732d2aeae88cc23, + 0x0c8d59fe1b7f55095e6aaad9e3b4e7b1c93d876ba3234dd1ac5ec64108291bfd, + 0x06cf82bc5fd115d348a30b0c45378d90cca1660446ba049759fa53103fcd78b5, + 0x2f80ed01a2118d02e2145111c3fe6ca70efdf95d8abeaee8829293347dc9061c, + 0x0bdfe7f6803e4dee7b026e079075908cb8414e3d651dd12fda67df08dded9e42 + ) + + mstore(0x120, 0x23cf40693f52abf0ed3d842f7bc85d1a2111d0abecfc18acd0fe3991ee5fd33d) + + mstore(0x140, 0x1daaa926528f3368f4e4cf924166b8bd3ff8daefbcf900e6dcc4ee63c4099698) + + fRound( + 0x2572725a67c60718df656934aa78fbeb80c8f395aeb6a20cd833c4b14fef412a, + 0x03bb7f6ca43545b11f19721265b416166579cb753330b1879b79685d1df0bfa7, + 0x2412815e863f8f3bc28bfcbb957faa5f393300b25133e9221b8eb3156ed5c12b, + 0x0dbf64d58df212e4307871966de097a5db09a93e5bc305cebdcd0630f433af45, + 0x274c06c01158e047ff4a791e25b7bb3db190529df8f50b6386273f810f15c6ab + ) + + mstore(0x120, 0x0084a0b87e0b336c9a911069f89d875a38be313efc420d28b9ec287f28810fd3) + + mstore(0x140, 0x28a03ee29f612aab268f76241d54d477a1d97f5807ba2e1812f4d350d7c6f7da) + + pRound( + 0x10103789dc9471ad718657bebb6781e39bd92fd20ee1a32d0de3ea2817a01555, + 0x0009bc25065080e6c6e9932e34bfde78d1085f19e9ffc8965a4660a4d9b6d607, + 0x1312c727cb5489bb174e1dcb82588edfab31a2999b377dabece466e9dcd6afee, + 0x20294a462c7d0c25aeb5374618e5e77316682ae3d726824f15f00f7cb9a7009f, + 0x25e0c6be89bbb04bd8391c90cf35588f0e9d73fdb06259f47a05513ad7a23e91 + ) + + mstore(0x120, 0x0b0479e28820e883d903a951f95b13093788e9e1ca64ddf2abb94b13fee9edbc) + + mstore(0x140, 0x0110f5257c21c9379d73b76e9ca95c513c77a15cc8ee0ef726d8460d4fbbdaaa) + + pRound( + 0x0b6794182b723a12e0b35f76bd55a7d106ee6a4035527c4d329a6f33068d7eda, + 0x015b9a698465428fc686b79db4959c8495b92b85122f6a6932940836facea86d, + 0x1bfe52289f811f5c3619f14866138ae9a1279bb76e8cec9a8936fdc36f59df7b, + 0x1cd574fe8d5e4c428b92b23a9717342176e1d309a7e259052c31bdc9af091fa3, + 0x212d1bbdfaaf0200735bc5851a156adcbfa4f607f5da122e1f63afaecd38cab7 + ) + + mstore(0x120, 0x21c674ea7b834741cbad39b21b242ab9a5554c6c9f92e801cb1fe4382b619463) + + mstore(0x140, 0x214f91d6c4aef57e83186b57fd9fa48a193e1caf16d7f6dc1559d144a271b341) + + pRound( + 0x08c52e9401a9764f0c2487dfed34e215c186b6c2838e38eb5a50cca4f0bc6994, + 0x2e422b4323cb4c0af46f4b0e5052f75744c538abccc7643f339440dc3aaeeca3, + 0x2e12482ba160472d45549ff79cd04aebc4a327c4bb9d78c2573b835b05c55fe6, + 0x124fa5f9c5a96d6cce92cfc73ea2446202f09100eed203ae4267aa637a032d36, + 0x0bf651f82f83ca1fa037a941d4e2a4b3e08f5e1603f933a1723adf4135796de7 + ) + + mstore(0x120, 0x1803171c9dbc0610e38d8308db101d6a99ca90137f6ab8cdab2a91b36b63322a) + + mstore(0x140, 0x0ba6071aa98afec3fbdeb46a88e4a5d17bd4454c0e7da8c74b15b084488cfdcf) + + pRound( + 0x203e2218389729c26c6f66213f2269c262785ec68c759599c2d8e3f68035055b, + 0x1aa934198713ce17658f51293fad44b1c22fc80391405ce76c92b2349b7eb3a2, + 0x1014d4e5ddd9c17b3c2b29684476afdbaf7fc56e8b799616a67bbc6678e45351, + 0x033c13ed45b4762a47e1d2d45d7fc8fbf9d4e24546e20dc596911fb991710358, + 0x09bc1c3274c569e7e5c5d77c51fe69b23b7e435138f4f3217016a2d70ce71d5e + ) + + mstore(0x120, 0x222eca5d754afeca8997f31d6fcb94a5d799afb795e68d4d8b0ce6d839f6dd7e) + + mstore(0x140, 0x2abffa43d756ef242db7f584bd62405991112618362f1b29a33ee2131b46a446) + + pRound( + 0x179e90ab4b08a4ead281a8709057487e077b710879911f215fbd6e8ebf838e97, + 0x1cbca88b8ab3f0588ff87deea978d00008adbad808e6510897238ea007f491a4, + 0x2f50b20b33692bb0f62777de5e3198377d7923ef2fa8ede08831e10f7e9b9f5a, + 0x15ba030e8f1ef6f260566fd6fcfffcd21a1cfc1232f7ec7148ff076d1ba68707, + 0x0dbe053da01aa4b7c0fad83a3cc966f0b8281bb4940f97a5516cfb9dcd543a6f + ) + + mstore(0x120, 0x1c1c6a5ebccee8caa4dc7ef18e194274f6e198d2b140ddcc97cb15c92ba1409c) + + mstore(0x140, 0x18330c9e67d62f7861a996d7ed69bba904b0dd459f2b254fc7cc53dd28e45a65) + + pRound( + 0x03c92524ebe67300d0dd0aac464f0e6ecf962d6ad41bf2685f077bfd788eb3fd, + 0x282241758ade4ef8ff3858305288d3b4a52209295d1a4bc89d885b2f5dc3341a, + 0x02635cb973d71bb3d2137bd81680dd3bc607fc5487e898c4c2d83c1dc2817687, + 0x13c866aa66e8d506079dc24c2df7b1e691994887d35622f4cfcf014bbea223e9, + 0x151f0007ccf42a7ef969f1b6f6315992e6594bb5344d2839fee6620b60e2c023 + ) + + mstore(0x120, 0x0f3a12c0ee52f0d34f2b4a0dcd13541b48aeb3d5121d311113bba9792a45a58d) + + mstore(0x140, 0x07fb521883bdf78b33689205b45e52269458a061bcb87eeb3b1e183c6d7eb5b7) + + pRound( + 0x26b747740c95bf139cb11bdf02fa63a4bdb29a90f158933a1822cdde5387290d, + 0x1475676fb205084246ef9bc7234f312c214f426852dcb2ec7dc3772f579af8b1, + 0x1b03ad9080d29b70aaf30bbc3200efffe73ee269dc032d2e32bd190767bc380d, + 0x21c175f937c2f82e99735bc7c201284f89577b27a1f84fa24642eceb552f4455, + 0x1192e0269a6b66a8c5887527aa4474c2de91cf8c71ebda835df2cdccdd4a4e4b + ) + + mstore(0x120, 0x1c2e5a2d9332f65128c85358662d6a7c44353add09c27cd07da02f9144da855e) + + mstore(0x140, 0x0e2b35fe1021b879de5b67a7458fa6188bbdea39e2bf468a1a24e3625cafff98) + + pRound( + 0x248d0e8051c1a965640c96c6f010c4931fe648b96f95ef6f5b8e474f64cf3169, + 0x2ab553db9ead2c82ce91febe180529eff3521875f7e90a9b8b7a3c4de4877cd6, + 0x211ee3bda3c95f1954eef22a0a82c2ede8444e42a72a8200bab6a133846d5b5c, + 0x111db3b5184ff7412f79c129904a9cac4ee65a51c2062d66732f54bcdf767be4, + 0x1a73843264cf9a3a1bb6fb68ef76037c4fa98337e5c10096c630b449ec4a5f67 + ) + + mstore(0x120, 0x2a33777739e2ab0adfb1ca5687db1e059b20370cbeeccad32da5c3609431ff65) + + mstore(0x140, 0x2bfd6f0e9e996ba13749327b9c5cec69903d413b2df29b777d05384b3e7af952) + + pRound( + 0x2e568594e5dfbfadf272b8d6e8c99bd785c4fa94ce9e87fa8a9a37e32c7a28de, + 0x07043c7571cb7dc5205bfda42d693527a4bcb58238ed6a6a248e7917ddaf0c3a, + 0x239e18a0c85b845ffd6b85e96343f1a8378f3c691dadfb228da6ff7aa79efe1f, + 0x25e247af250c564c00f5ff1cf1f2bc8606600f173cb65ef0780af9f5a1b676c8, + 0x031ba3385664544e3e0801f1698b15033a6049b2504e9cdc2c6e3eb2fd12100d + ) + + mstore(0x120, 0x044a40e396855be550d8ccce7b82ee2caaef6675bebe92266c666982ff72bbf8) + + mstore(0x140, 0x1176d9f52e12df67f087110a15aaf98d1ded293ffdf99599fedef2e51569e4f6) + + pRound( + 0x2d453d93fb36fbf8e36747ee92d90cad9e02e692d0748c07fd43eafc2cc5e823, + 0x187bd8043f8642cda2b6bad82958d115818880eb80f6b730381d974ac5d5037e, + 0x21aca605f92a48ac35708fe5140729fb35c3e48ccec441217713b08649443930, + 0x173fd164f5224ac06c2e99f3e2eaa6379df113de30aa485e8bbcc7f0fd2d1e03, + 0x071c66a6463c3fd4292bf1e5acb6de611142d73cd1db590e89b61b57d44d69bd + ) + + mstore(0x120, 0x04cb6d76b5a27a5aae387cb647790318c25fc16f8d7d1855a38765f847f731b0) + + mstore(0x140, 0x2ecf70c372d8e5edcad49e58d47875f26933d62614f266e6b4f586177148565f) + + pRound( + 0x06e8eb7dd026d257b15c6624bee2f37d5b67b4a671cfcdfee5797e8457b63916, + 0x0696aa48c1d5fe84ca5cf59009ab0baaefbb612e32c91d5ef306def38dc5673a, + 0x0853c33a9c7a7c3b355c92c75de444365db82d241eef9f3fac417004a3a1accc, + 0x3016c0ba34678e0a67f59cf96ce16e908154f5f9802591717e66e95ba25ab77f, + 0x0af008601dc9552517f303ff9e22c793a682caa93256f2f09a4f746542603b0e + ) + + mstore(0x120, 0x0f08879dfd4fa0dc11ded556ef01c6f94cc6f4d18553b08bcb1dd604392ec00c) + + mstore(0x140, 0x11459f7e9f0e3c727777e34d6d93ec28a25bd867171523bad5be0d5a20029eb7) + + pRound( + 0x01f393a6ee74dd6c4d52b0e7820a7132f8c4889742313c06caa6ecc55f3dd413, + 0x2e4d4ce3f97bf96ff86b88e969d13e415e14721282769f7cf8c3a73723f094db, + 0x306000ef24a7f5a9c652e3a9367578554ea59bf8efa0bd8bc5776460c18c1add, + 0x26e58d6287678f3db9c225c1d3b93ae7c43a69024ebf249c8bde40617c2b3d49, + 0x09eee09f873d1bf683971df4d7ce56c8f0b8b98ddc05b9612c0a0d317310655a + ) + + mstore(0x120, 0x2b495b854553d02a75b68763bda6dd8ef0e81fe32b5cb072d3f580a914967bf0) + + mstore(0x140, 0x056fa5d7ce2c32bc5735351d2d48af5d6c9256a4b72e12a35640b53ea959e296) + + pRound( + 0x04e9cbb6f6e8e805a20fbd801a53b723f78c1f5acd227880f7f37f4e5b0528ad, + 0x2d2ff32eb7a0c0266dd46bd5939c9a9aae88b3e9af5dad01a7304f9868f7c7c6, + 0x23b77eb0f27e950200a590447d645a723d9b405fa2538a5cb76fc5fdae16d839, + 0x2cd6d2c5658ec0792daee2067e2f958d6849886318a6c1c27233a469e9998c2f, + 0x0ae1daa420bac90780d0c83026bfcc84af83953e26eca839da76861e739855e7 + ) + + mstore(0x120, 0x0fcf9b89e19b1a55f9b03255cf80ccb9fb6aafde2b46207d873fac80ccef085c) + + mstore(0x140, 0x254f801f3c89c62436ef63df67d912c1f231bb1f76c6c7b497f7708dbcfdc17b) + + pRound( + 0x2ecbe1a06b28ec78ea7d22df11cd224a0e1a0ac7a3476c5cc3c4e50da961a87b, + 0x143053c1c387f9353bd677e5db6e9975792bffeecf02d6aa0fe8f627579fe6cf, + 0x04064b25584499a011ea74ac047a8b37494189bc63342bb1182e234212d42bdb, + 0x100f61f6b81542156760a6d29af5dd8644c82deab5b90e6ac66de8b4a069564a, + 0x18d331b2e8180b7aa7055c029fa77aff4f02b0e2a2078bff67688ed65b51d6dd + ) + + mstore(0x120, 0x1419365adbb91f1f7d1bb0aa8a4b5d11c7ad0570cc6cf3638be9c5a2a275b495) + + mstore(0x140, 0x1674425f2e9fcaa66eb001feca48ddd4b2a29e86d451f00d176ea35b4e02fb84) + + pRound( + 0x16d8e85e57819a10a61461bcd8d3d3c963c4f95afba3e4d8fd0d6ec882b9d161, + 0x29c9565aa702088bd443e4620d84bb2bfb93253a8f0f04e5cf408c92820ada84, + 0x294fb68064643d8beb237bd705a557871b5f1408624eda46d47b583a60d29cf9, + 0x2c26f3083140c104baf24c3df922317584aa11770451e6a846de7dc795197313, + 0x231811279854707dbaa537cb27241e7021a949a1d9671380a7d6944c838904cb + ) + + mstore(0x120, 0x306042d262f6268ba789eb4323c2169279752ffec6b8536cc68b53bd4df0e858) + + mstore(0x140, 0x0472a13ac7da9ebe1132e05f9ef609135c82a0ebd9278def2b34f8ce709aee4a) + + pRound( + 0x291f956def59b878028000cef03d7b54dcc2fe1dd5a75dc180d6d5bed898cd30, + 0x2f1302894fe6a26b5bc03fbaa69c4d95012394d78de494549c7057b7ef965bcc, + 0x0627d6d6d94d0a19a17db45c0796f7db8de13d278a2b24c99ac5d92d0a1a1ce2, + 0x2ee297662bafebcb01df8e62bd5f50f03025515b10465d59f3a294f0bfbb2fc5, + 0x118029945df773f52fef5429da766b902eeae7d967062fdd879c60a1bfaba75b + ) + + mstore(0x120, 0x277cb45f3e632718673ba05d48c712fe7404df9eff5401cebe45d194c67fa8db) + + mstore(0x140, 0x0159ec7ea49aadb3a8b0a23c1dba0023807b0d099d3c40b69df866a92dc87b37) + + pRound( + 0x2e8f76b27b474180f00c5a6c2d65850bbf96019bf0d76dbb4743a970f42a130f, + 0x1e33984165f47c204a33fee31f613544b7d846a7d5ea45280ede4b362c32aaa4, + 0x17f22e27252bdcf91a72b59eb276a666ce4fea7adfbacb2ea9fdf28524b7b43d, + 0x00547e7c70ee4e3fb4a4d386c8baa55d823a0f02bc963b43039b8847cff6e6c9, + 0x08ea4ccbf815be325ccd15494f38f3f97153ab09c54a87a852b2a99480724e25 + ) + + mstore(0x120, 0x244872a0d2766b8547e6b6a5afeabf198e1409a0f0026de36c101793952f6cfb) + + mstore(0x140, 0x204fb17927ce873c761196395f7da46f679ca331832a59fddd2ae31e84eba1f5) + + pRound( + 0x0c33489297e244956de579c5c112ab40c7fb2d89866a28418f660a86ee18524e, + 0x01bb4fcbae28a2f3399568c6b3849da27d6ddf4fe6adabb591151679ed37d21f, + 0x2a23343d24a9cfa3b8f413f52ee1b233ce4c1d5b9bf34b03dbc6d733d52305c9, + 0x0707a6d515b3bad03a9b06d6be048defa850134aacd120f38fa93264016b7786, + 0x1837db5401dd6ec30ba6b866184da56e8db439ffd04154ec469b62120ce35cb4 + ) + + mstore(0x120, 0x2dc6040500e7329f75a3cefa4db49f9b47085b1660f8873b3e81b7b1af82af53) + + mstore(0x140, 0x2c8bca9dd293bb67db1f66ff2e82047ae9385ce67d7f33568cd4c216a89994b7) + + pRound( + 0x056f53037d5d8efc7cf6a6feba18d102bf818bbba70b86dd9b763a12072f4c2e, + 0x1df4bc5d73239f5ec3b89efad53df9cd8ad8fca543be01f5f40fea2952071bd6, + 0x1ffb6ccbba001155d46e167d1fad1c13bf2892ac87cd9c347c734ab5ef658367, + 0x08ee36e881496539b0abd647d353e51b63fef91fc944880006f2c26c2ecf2a24, + 0x1c3080c254443332a3e6283d5bab6f7fce8aaa68487b9ee4e372cbc6cc172665 + ) + + mstore(0x120, 0x048f64b14275fb86fc55b3c0469cd89306752827c3c04463be5bea66fbd7b38c) + + mstore(0x140, 0x0f2027b781c2c52490e11ed4b7b494d66cdc16e690b6a4b3c924dc9d6e854832) + + pRound( + 0x2a157b9786f9224cf63648aaec1b9f61c7a7087ed6eb8ab20c6c5469d401b7df, + 0x1e0fb0cdd8a54591c42e7c26b9027b77417e4e6522b472bfe61ff89c39bc40e9, + 0x250144d1cea033fd78bd73ee4ea4cfdcd6a42f7c00e2d7ee6794d464207d2b3d, + 0x0b6b3fe9a7a525ca60443c4b78a8e830957aae0403116d22983a2e680eedff65, + 0x2fdf613e67d176569f4743b4963f8c53e52482fa32e705247eb650bc7bd616e9 + ) + + mstore(0x120, 0x1d21baa09d7f50f0159fa8a0b6e0d61446d1c7db5d1566469da6a85aa7224962) + + mstore(0x140, 0x2dc59c4c9e275cd8c2506282cc5bb842c014bea4236b1bc27a856351b48af802) + + pRound( + 0x29652785160b261c1c20c741524a26147cc3191f33b74ebf17d44ce2f88b0f91, + 0x1176909e02a5b37bfd47810fcbe73af87fea130470aa44bdf6b058c4d359e179, + 0x180f26c6ce2a3a477baf0da58d069769c2bf0156d636f2255e1bc35c01e98993, + 0x2afeedcc2cec57285ad22e734fb7fe3dd65f62601c1ca4884a86c7a6a05f083d, + 0x0dd21a87ee22626998dbcd73dd751affb49d47a02e995a41bca26399103087d2 + ) + + mstore(0x120, 0x05f2fbeb7cae0a35ee2f3a4d2964d241a0ceeb47b3f7c4c87bb3b052c8705d90) + + mstore(0x140, 0x1f445014a0f266082a50257152609cc219062154f4d7c13288746954b97998f8) + + pRound( + 0x2cf62d08541dff0919ba68a697f44f4791c42d1447a41513ab9d5f755eb1f38a, + 0x2f5b8853e2cd2e47a9fedeea4047e46083c97acd4b687aebd2264e7a0eb354b1, + 0x05865328a9b2fd469170c391c5ba8db5c66eef9938e4da5bae33f2703c470730, + 0x29761c9fc3d2c4cc1b126be1dc0470a97b8f2725d327c6d1ca923c2aa8092b1e, + 0x1d3fb1f8dc3c77cb515c37bc810d3a5e3b96552d4bbb57fdb01c2aeeb1d9a048 + ) + + mstore(0x120, 0x1303bd921f32fa4c4e73af21457c46b6d69e2e6a2c396716217787b46e822ebf) + + mstore(0x140, 0x0613823c5b6abeef14387465317e713b45ace79c0e4433d7c4d352097e5c8399) + + pRound( + 0x2d35917cb1d0ca611ee37cfd9078c924fc84bd1a4bfd7db3ce39e05b38f698b1, + 0x05a89a4eb40387b8512f2f398b6526efe76716951c500fc8dabc835775335ced, + 0x04e26aa3f02601174f46ced15594329e4f4e5bd5d7d53d5df6c8633a94dd01de, + 0x204d587d61526c1e047e1dc6b6d403b9eb8730f2e2dfb7bc7350d939bac5b90f, + 0x21c8ca213d2f44446ae90a6bdae5843b7c2cb53ed699f36675ea8280a2a420e5 + ) + + mstore(0x120, 0x04b1800e600c90ec4776bc6af1764ccbdc10bf55c3314f42acd0531ad53420fd) + + mstore(0x140, 0x298d0110bb90e4c35e293c7a7dacedef7ee9342a591b4330e27276aa13b67ad1) + + pRound( + 0x0f27c5305ee978f4f775e213e3ba12a901f51144ce1ea89bb5046930f5ec55d1, + 0x2cad11c693c6a627531950a307e07b30ea8a495115f5a5388827792120c7bdb0, + 0x16bb256883c44cf37366618e46c6db4e3da97a9d4ae7d5c585959de3272f82b1, + 0x29afe50bd78f72cc763695976410324bfd67157a5ccdb7ae45b00032e1d57a51, + 0x09329902e59e5243a726ae5ca35408a207148609ab3698139725aefe29aeb167 + ) + + mstore(0x120, 0x04b0f48c4f2e05bda4b9cf806075f9c275df2cf60b5fd11470eaa7394a82727e) + + mstore(0x140, 0x0edde5a2c01327ad042a686f443417bd8f107c99eb7c02900c931a7bd8cb349e) + + pRound( + 0x024ea6e68cb1aa6b407e022649aa32d1b7ea4a350e510c07eee43929395e4f82, + 0x22ae3a1a81c4550f5fa0116e135d2df2bd9f6835a0f0d03f4dd934e1320a3d8d, + 0x1f0f5eee9e9abb2a2f4ae04d6fe09311fe0115c1e199c28e22705e681442ed37, + 0x023c86606616f317af022464f350b4bee80c2fca32064bcbf83e8cd35dac06c7, + 0x2a89c4e5b074fbe67d04cb03efe18c4bf904bec4759b33dad6b2c86ebfd2b9d5 + ) + + mstore(0x120, 0x0e174088223c38e9440fc77307d6720ac32784c9d2f591e2437eaea9b8f5e2bb) + + mstore(0x140, 0x19e70fa937788f7a2127573d56c8197bd0dd096140f39064865c65c31b47d402) + + pRound( + 0x2cacacc9c9d8b0004d8932080f9378b60675a8bd853aad1dc50672f137212cc1, + 0x0816f33508621f2d56371156b0a3f7731030e4b218e44c90a88cecaf07170dec, + 0x2ef8e0a455d472b49bffda935c8d3bee1ae9248608e2a52d53f4b76313c97920, + 0x17184a8af9199aba605dd1f2dd18ebc02e3055ce408068eccaaf3ea7c0a334af, + 0x16395e153937a83660db6f78446cb995836436602777d81f0607130b44881448 + ) + + mstore(0x120, 0x2891938acb83ee193754969f4aa5a62a531081dbca4dec226258ea92984b4348) + + mstore(0x140, 0x04106f95e4ba3fb74dbe4bc53abc170262ba00c7c63ed8c457c3227532c12ce3) + + pRound( + 0x0e434c329d5242adbdab24780495ff97230beb344b918f6f8d6bd7d21b03692e, + 0x2c88a82eb87c81ba42a211bf2ef3c15875ac157c7f3868fff35af9f55a8c22bc, + 0x111dc223e3c9fc7452a9c2de469383915f33adf4cf5b49fd2e01c51d09ccf436, + 0x10647353de3197b9cb48f4539b507e45393b000842e8baa1218af097f871baea, + 0x0e53d64121c0a851c1b3f07423582034abce698525d0a47724354c07152f703b + ) + + mstore(0x120, 0x0d2356a92dbaae8c24a8cebed6428083ef2f469460f166a6e774377e78055435) + + mstore(0x140, 0x1fb6dceb495bf90fff56c8aad70b40bf773ea1003cdd092fd77a43961e9d7dc7) + + pRound( + 0x2a73e61b8f1babfbb38b186f401eed0d92c5613ba25dd2ff4d099f7dd3c19fe5, + 0x18e16b24642f19193b798b923b8dd25f6e4856d6b21b729aed2281ab154f7c5f, + 0x0d5f849b166ab9f6fc1a64467c5557029f359a2d0f194030c4dd875e12ae3485, + 0x0e25250c57365a29c63a4f1531b8b0ef523eaa93c1d70acd0aa7cd7844dd0442, + 0x0f813d14af0c85bcedfbf480b3d80b9f335853c60188526d80761274074a599a + ) + + mstore(0x120, 0x188f0ee95a9dfb03cd5e3fb30827057e933711644ee7bd57490374c0d67532e1) + + mstore(0x140, 0x0823877ebf8a842b77e8e0f3b44873e9409727101b186cae2b80d0cfa726ec8c) + + pRound( + 0x2c0a70ced79951a75e23c5a323fd706c2ab87c381cfc3c269081627741c2bbe8, + 0x13dc6b3bdb05167dceb4b11037064ac5fd22db5e229e4c6ba55e8382321dc5ee, + 0x210fa8b777907ec30bb88dbd7c0e6ca9004eb3425d498025da6c90a47c35025c, + 0x0c5cfa957139b45a72fbbf80a410aab5454a982668baf24b0dd3c04e4d599cd9, + 0x1f1f3bc4c21d633400fcf8bdb7be59b7f65cedc06bb2fc93a873b6ef12e0f52b + ) + + mstore(0x120, 0x23f66a894b1df4d26a8baa6d05b1ace511faffd4605b36cfd12bb4c6dc2bb4d7) + + mstore(0x140, 0x137cef522af2942aee9a4fb8017bf330e64601f466b56d32245669d9fe5ba707) + + pRound( + 0x0fe81603de39ccf148ca6390d6f8bdc9395ca2f3f50878283d98f1f0e61b1aff, + 0x2ef61fe192f52a9d7cebf41c134098f2ccae35cabcaa12963566768ff1b83706, + 0x0db6d076b2dd1b9f4d56d2f66fab4d7bfc6a38fef7f9ae1d4c2f8c44b1510f51, + 0x2a194a4ae8583f28189f9c011d107b82f279e6a0f8ca8bc9cb0aa581831c7d06, + 0x0ae539fa9ca67d4af48fb292f9188c9e72f2eeaae2e500b7e7201718c8da8de9 + ) + + mstore(0x120, 0x16f37f357a0c584821a356ab56a16d41f045029cb515f58ede001f05a807890b) + + mstore(0x140, 0x139093b78fc9603a4288ae5811ed1311be916e4c97d35a5cf18e4b7e47d13b03) + + pRound( + 0x187aafcb87841b2df9d64c1767789a6b221767e4634f0d550063a0bf92788c32, + 0x23212e75f4b89992a3647036ee36d74938bb9a9851e13d7b6e52daf66c4cbd25, + 0x0f54cbe967770dfa9d068b2fc53abc96489bb7d266212654d326de6b9af16d63, + 0x23d83a60b9887ab4359b8569ff3a219bb81367955fde72a62002d3cd51101fcc, + 0x2ea676fe7f21fc583ab0b0e189020d42cb22f044607ee15bfac7dd66da5ebe76 + ) + + mstore(0x120, 0x2f662e4cdfef5f822cb956df75b17b46f17b08f930f54bab4324a0363e23384b) + + mstore(0x140, 0x0870eeab2e7bb1e82c426c2ab1d65fda25d426749a538b4ea669eaa31f661a00) + + pRound( + 0x0aaba5fcad1c047030c8bf246f41610b68d60bad285cc15f55900f52778a11ba, + 0x1611827956f3435c1fc67dd3d37954a255eaa0196cddc5d5a6187fa0a2839efb, + 0x23db56362f248912421e5f087ad16e0c9e6d2bb59db30a52818e41964b7d8126, + 0x2f215e640207a88b02999c98f1af8fa17331d19ea3de1decfe8f2e478224209c, + 0x2b2a261917c0fecf2bce19021f8506e378e9d3e1afb451e9d162b3d93eed8612 + ) + + mstore(0x120, 0x235977101b56071ced3163c1ec7187909a3ed7679bb54ad40811ba318e1afc81) + + mstore(0x140, 0x14bf885e66f7c01fd974efdc0bc2d628ed79ad6fc6ba511c5a8ec383e1a73a70) + + pRound( + 0x169418dffc99f2ef5dc6b1013717c134409349d846457985725b15ac6a152fac, + 0x021d3cb240d6400339ad5bc535b4fbb40919ce6b90162e51ec6895a7cabb4375, + 0x12e45c46c45b660b6addc149e4216eeb6fb19474c8cce4d78e34c3cc18024afb, + 0x0c7c86394b7ad61d8c348d185403dc77152fd310b5d05970375a11b5abd03548, + 0x3024e78b217f85d8efeb60008ff70d33c3e84c238d9c21a04121b498a2fbb131 + ) + + mstore(0x120, 0x11812d1ca3671ae688a9877233eeb5ec29868f7cd7c5e13275391a84167e0231) + + mstore(0x140, 0x2435cd699bc94985945d878960770f9298d40c0e28b6b5979069e0590952f0b8) + + pRound( + 0x223325ae7e73cf093e1d5891aa92ed43f82610f1283f265f56548b38072f38d3, + 0x239a5ae138dce6a019f44560ef7c19d2b8025dadf040559226f54870d318a57e, + 0x01dcc35115d9057efaf468d7c8a7d46048e01359c974855bc99738f0b247672e, + 0x1359a40012c5332587a4deb5604a436e269c282ba240cca0a6d77b343e76bbf3, + 0x0a9ee39712223d4c0c37c26a96f267c85fc8e31acaee0c07354d3798dc5003e7 + ) + + mstore(0x120, 0x10260a39cfb0d82ad8182a6951f9c780a455fc1de48c417d6ce6b27f36462185) + + mstore(0x140, 0x25207827a76052d489bb2698730d5c3fc97192a4420578d2474a37ae7d7e3148) + + pRound( + 0x2bf020785e4117a1ea5930cd5355303bf9aab2a1ea0d6685391f40eeab2af0a0, + 0x2cef6c78577c9e97a76855292ca92e4269ac53e9b7439dffbac2eda5c6758024, + 0x09a30e00c9f0f6f260f05f029cdaa7c7afca506a5ce562c877b3b8d543135429, + 0x1fd85928f8c8053c9b264a74f121b90bbf9ae8063e0e89670165b9ba66a3e7cd, + 0x24482279d9efa57862a6cd4524aa289e6950606df8cdf8fbcaed4b674fdade91 + ) + + mstore(0x120, 0x20114281fbe35c188164fc6d4144200fc1d9ec433efc677480bd2cdcb35b64e6) + + mstore(0x140, 0x29e42f5218b1ea3fad06a48e2292c0fe3df08a2c4a823a3be4b998955da8a21d) + + pRound( + 0x28e36b634ecbdf7b8e4f9e1a347df95d771f15d97f2d5c401edf6a6e375874bd, + 0x073f0dea6f83d443ee3ba27c5b7f0064ab7cc0d34babae859f6bf66d46a1e165, + 0x14c6618569f748ff65514437adbcfa97f87b9b0d169048e84c553ba9888c451e, + 0x0c7675a042ba6cc74fa588a0b26fdc4f2d1f119a0fe6ef111be6a2d45b4bbcad, + 0x03dfad7db3f32c6ed8130c43cff604dbe1c29dbff250c684c955f09e495fb34c + ) + + mstore(0x120, 0x08f6b4c0d7bd5e4c87fbc6874520e3329c067b6841fc833aa37514435e987cea) + + mstore(0x140, 0x2206b2c18f3292e7a9a91039683a55d813dd914b0c7d523210424ff0f2817df7) + + pRound( + 0x13bf4039488d94b1b6a67f256296daeb6c7c80fad2726d6e9be11e17c2352816, + 0x1847a4e36b3eace13de58fa4662a9f88c9c17a464e6dbd2083c2938c227ee3fa, + 0x0a7a2056c7b79384af9fe3c6826830145f51f6f8ca5d1a344e295ca7663ada27, + 0x181278caa15bdfb5940cff2bc3216ff06a45962d4979dfc0d6c94993bb7de86d, + 0x0a8a6f4fbba2ee09a36d390fbb1485fb789cf3f9f641dae011520c8f10e57a43 + ) + + mstore(0x120, 0x0094c24ab01c6db594fda907b639a7b3a54301439340e889b6ca9cb6cba067b0) + + mstore(0x140, 0x2751821a6e3b2206cd6bc3cd5d98cbae8850745ec6cbbea413e7254d2a514549) + + pRound( + 0x0186cef5c04b3a6c32da26405a16cdd359df57be8e93291acbeba3f487329cfc, + 0x075aff67570ea17c7c79c9114c7a10d533c6080b6d15a5bebd1204fdcde772f0, + 0x2b06d8389ba9621c3869d2e8b25ac15e2c97389caaf7f97a35700be66c1655a8, + 0x04fc6d0a6b67744428161cb5228a94e7c0e95dede804b2b47a18055acd737aeb, + 0x25e4a295b4e7a2dc71394d41ec2a8f4b124e58c234448a028a2c3bc6ad25e69b + ) + + mstore(0x120, 0x1807721ba60fbae476ff60120c1f47ec0bce692cfc00102ae50bd9376c5a22a1) + + mstore(0x140, 0x1c0208f5aba12750802fbdc3bf12eac9e00ada708f167d4b167bd7d4b03d76f1) + + pRound( + 0x145aaecc24e3878db9a8d77149b2419ed5b42df025ecbd1a8e97d8b817904bb9, + 0x0d2aa00cc6e5167d845ee1877b7aa059b5e5151c57e4c163da3403f9a95755f2, + 0x24233b69861c70c449ebd36e4420ddfc3c242b69ff6e3d4c6090c2bd08a764c2, + 0x2c55fe1a75147c9c826f762f836d5645ac4184ba1927dd56a76dc056a9895667, + 0x19779b1cb16a9c79654016674978b8b6ee1a78b64579de93ed2d67b9e49f098e + ) + + mstore(0x120, 0x0b3f215d52e85ec3c682698ebcb6228233ae9518f9450f480689e7cf30137846) + + mstore(0x140, 0x050996a07af6765c56a8ee2f736650deb4972bfcddb194a0efeb1954daa8a4d7) + + pRound( + 0x090b6e28ff541cc38869abe2f5dbfb9fbe888d21021f29d2bddb9127d3c273be, + 0x193d6c7e76ad94eb59a20010a799c7bf96a8dda8c90887d65214c8665ecda01b, + 0x09ddd5bc0b1f8d4c4f1a7a102c1ba12ec7e7540cda285a564ea7c4753af8a8d1, + 0x300a1dd5fda15d1a9cfe2a287801817168721da2f970139549e16811f555be1f, + 0x1520908df2eefba075bb41cfe0740e1e5a1ee181ce492016e152706e493cf470 + ) + + mstore(0x120, 0x0621e3811d3dcb9584d0a8be41e431d588c93274c8549e625f98fd15983a809e) + + mstore(0x140, 0x02a41c2d2bcf14664a0130a021daa6efd4a3b0c3aded38635bff97e3785ed6bd) + + pRound( + 0x23a59326daf5f94f3b5192c18ed06cc58cd9608e44138686399dc4f1ee807add, + 0x1d220b9add0592866898ce834b1bdc2003976e815c0cf7d3f6b8bf967ad56496, + 0x19b49c4da3d9e3a26d36566738658923477c504e76a38a82b1b1247104f681e1, + 0x139decc567b06b495bd6f3cf006c05b7e1f25d5b7ac554445c37dd285beaae7a, + 0x1a5a7d8bca8d4f07d4cd6e9bcd00c009e3099e99af3080debbb21f90f8e5b425 + ) + + mstore(0x120, 0x287c60483e2db313f1a2bda92c1e1c28b65ef0b99df4acfb75709edf6a3bfcb9) + + mstore(0x140, 0x289440f4b7fdb8b2b22661d0742e9695139c1a1ecef53c3febde0b5f6d9bb4a5) + + pRound( + 0x21cfb54ba72fc06794947cc3bda33d815355416e2aae19084d84471eedca399d, + 0x05115093894089a202a4cf8d0aea329d83cbe0ece741160f9975cf01b7c85dc6, + 0x2e40541caca7653212827129559ab422a1c06a6f48c974291470c65fc070dfb6, + 0x07eeadd730284f5ab60778900b60300d27970001aa63e46ebb7f9cda1157600e, + 0x0cf33e4964d350adf2051f8e2e8448d3324d24d3f4858407f4fd60d3333bd98d + ) + + mstore(0x120, 0x0b6a643dad3f953877110517f7b336518c8fc11d868bc72e76cd76c3b2f7dc1b) + + mstore(0x140, 0x04189ea6c2bd4b00fa6349adde17027eb7d76353a10bd07d0942639447cb43d3) + + pRound( + 0x291bda2c37fac962a24555a7abeb36d8e8b9eb25222f97f4817ef2e5b0bc7208, + 0x0e105449589412404cda7b82f14d527594ff99d04cea894d6ecc315119f42b73, + 0x0e6097f0ad418ac7123ae7eba6cd4522b7ffa8dc8cf60a1f836be23e41ec25e5, + 0x22fdb676724017afa8a8069c62d307aa4ff52c1445ad41b94c3e406e33e0def1, + 0x0204d594ad7855ad0f6950742b19e60c2c5338817aab7ee7bf631c3aa92160f1 + ) + + mstore(0x120, 0x273e200179c5c45d860b26a20b2c0853c1008f942459d5cdbed633ede031aa1d) + + mstore(0x140, 0x24bd0ecea1e1df97af0f296c0e792d676e2c8e02e808a158bdbe01431c5e4a48) + + pRound( + 0x23bc8449d898a7524b2dfde263036cac2e14935134f8c3baf7f1e13ea2deec3c, + 0x0017efa608d9941bc64d39e0b2593b742576dba257fab323d4c99c7a42107a16, + 0x02f061475e9d8888b3877f9308e7758a16f91e3a34a5856f15ad0b9f2f92e2b4, + 0x1f257d4d6f3277674a061330d73d6ba135da7cb0cba318686872fe1ef6d52e25, + 0x195340f6c1f7b5f6158884bd237715149cea488edbfd80fc9b9cc61c384853ab + ) + + mstore(0x120, 0x24ab9a167b61855e0f2c60bff098d5eb7d15166fab51f2b62c809de318d6d176) + + mstore(0x140, 0x2b56aca9d595460503363292bccdc80e823201f71b54bda684c93eb0893784f6) + + pRound( + 0x0c6e6f0f7c20811f404599d458af5c6cb41ab671599d6350df38e82104bc6835, + 0x1dee1352470235cd8e129b5611fa953706bc08d58f6a3ef3d80370d8d19683a2, + 0x1be0cc30343a168fda7c757ac0c7e5e16afddbfb7265878080725a12fa12ad4c, + 0x1a449abf644f68a64c217c6a042a231107ca8d9c619208580eb76bbd9215d984, + 0x080117dde58f228a459f59d90e64babe2daf476a9a2ca018faa3c5fecaac1789 + ) + + mstore(0x120, 0x182b4c0c551ab0ce1990b472278f794ba9cc62abcc90a89efdd80776558e3433) + + mstore(0x140, 0x001ab2bbdbd043d2d7d1a4eb76db4de71fddf19edf10d7cdb9550e1846e53fd5) + + pRound( + 0x057361ec23c87b30080ff1cdf3467d57c95a12afbfc48ab5e1e4de0162a41b5a, + 0x1baed177177a25ecbbfaf4f204d9921eade3689ba1378cd9362cc14145089f95, + 0x00ccdb6d5f4913d7656889c312975fdbe0e0309a841849fd808d75f593a71481, + 0x2c52f5e1ef57de5dde528471cc1f0ee7839929df98ee743d9eff962515561910, + 0x0234a4a32f767f2e1ca48dad3a2fdd3ff54b2ca3d53ce13fc9052414ad7f7555 + ) + + mstore(0x120, 0x224ce814d39c382da2d65eccd9deb48056ede18c5efcb8e25515b727e540a859) + + mstore(0x140, 0x195e1cb28f38a9cb57b2c719b504f5fdd1d42559b6a368264fd0fbfefa66559f) + + pRound( + 0x206e6cd1e3154c113a762a628e24940907b41e90e7c2d43aa256ea5249978358, + 0x27816cab4bec18577bd335bdaf8298798a261bb175137177d46ba95dd03dc8bb, + 0x1680b632a04be3eb1ed64ef589440b3f9526b2ad82cf0b8839d3e7b0f585bc8c, + 0x196b2cc0e6e07628df8234f58c027c190c75b0342511efea4c3724c4fedd6e75, + 0x29ab0b6065ebbefc684608acc6bf3b5fc693770c38bf91b4be38fe6f72647486 + ) + + mstore(0x120, 0x18985e9c7ea6f1a16962e4e27cf1aa4aa3086938b13f8ee9465a5ec7bebdee03) + + mstore(0x140, 0x215b523ce3f055c92eb148c00027d1ad406a2abd64081043e0d15492845b31a4) + + pRound( + 0x0e9e5eb70f4490ba6dbd1c0ee1d6724ccdd58acdf138785ce98ee3848ffb7840, + 0x1995c9c8e520014e4412ec653839d781548cf71f46fbeb51919582226cbd5b21, + 0x0886095cc376c87fa653000283a6eae11008982f27104afee198fc377f26e324, + 0x13761e206b3e89b23de2342bfca860f9b0d9a36d486aa115565f9f52369c124d, + 0x22a8c6cfc0e38a500a47515c519ad6a72506ec0d508de25942c10f51f0dfab81 + ) + + mstore(0x120, 0x25150652a08af8ca574c7c5c77ffd98b17259a1d914a6ea41db75014267949d8) + + mstore(0x140, 0x00bb8d13438040f674a79ed42202c5bf6e67de6fc3f6b65ca837ceab795fcc6f) + + pRound( + 0x0102f78c7513b093b885726b7df2e70298801b3e4019cdd42239d76448588c31, + 0x0bce88602fd3a0f0ab8885891ad44045058f9ace11fdabd24e8dfa1b0a4ae727, + 0x0745f760f8d466fc21043e2292e6cbb20b6227517f5200251129c5481f52fa4b, + 0x0406de3807445c6d3cbdf7b174c410a998a1530fcca991535a2a262de4e2ee56, + 0x26779e7346349068dbba66f784f87e243cc27cab59e887f7ed7a0117887d1acd + ) + + mstore(0x120, 0x117f2ef1712692ab9dbdc51db4968b45f5e0104f9e5281329349d908b23e231c) + + mstore(0x140, 0x0b281b5d9dd2ca1a92e2d83b5087b6a08d6ab08330f47512aa047b2f88ba68cc) + + pRound( + 0x0c1ebf40eeaac3d4a192dd50ee25c0067f66eff6229d045d5a801067639ccf2c, + 0x1a39731eb32fdb51dd793754f76103b5cab86947aad12d490d4951932ff20727, + 0x2baad3d41b18ae10c463af1662ecb28c6988524edded36943672a0e857b960f8, + 0x2e778da1518b6a4fad2e833e41466fb2fe82f4f8df1b5c218cdd3b7e49af67e1, + 0x156dc717930d6490167743911e9bf4d4634ae049b53adab281698645f8b16dc6 + ) + + mstore(0x120, 0x29fc37eb5ec7cd004809516b7aa3c716f4f7f6e7772f443e0730b01dd5071a55) + + mstore(0x140, 0x2048fb9c1fdaced0fdc5159490db2977e57dbcbff7514ad1e52a271bf84dd1a8) + + pRound( + 0x1c2803766dd9096567a3366061764f8c916f2a2dd640b6eec0942ccb75d40767, + 0x120174d53ba57d1a141bf40e4c705683668bd55800000aab6f34766b7b6575a2, + 0x0c37b25020f8c76ea5536de54c722e47d01795d31b5ed73466e7d8b8ad376d46, + 0x0a508f345cc9a8b0c30ba27651ba1c3ad8398025a4000a5c2500228c44fa91b8, + 0x12afa49ff4d8b4c6c372f7e065840783cb9497eeacc847a340f61f1823cb2a8d + ) + + mstore(0x120, 0x2f2c4e7b18a845fcd6add67009fc237b14a984619260a7b3d38712e03a0849b7) + + mstore(0x140, 0x22925c606a1f091c1d5c7122f8e1a8ffea6a140031106826ac53a9c69d84c0ab) + + pRound( + 0x00a6c4223aabe583e899bbcd0314a4743181f1d5e03dbc11c8a4d02550fab64f, + 0x15f462ab5b21c31557e25d9c22d8dc6a0cca93c8ed68a35655cff745686764d0, + 0x27bc1c9af68edf8e3730197124be559f1472e7e3bba0d35e079b2d1b9e4271ef, + 0x1a2ec148f900eeae38c0d3d6efda64e146929c71eb82da3139a3a85968ec6ebc, + 0x04ff41cb553ca616d0616545922f2030b71b2354bcd1c55d7eabcaea8904c22e + ) + + mstore(0x120, 0x07577491483d03d7769dacc79607b9897081c0095decdce3d227c059ddeddb66) + + mstore(0x140, 0x05639b2324c0b0af81c5b256ca6b2d46b95eaf855fc26cedbf90411312de4a12) + + pRound( + 0x10e2a8c7b12bf70266c257573ca2594d8811633f77822d7c232b329c5b4e7279, + 0x1712319595ae464992524bf8e488b783fa45b3548cd3f162d586bce31ec7184c, + 0x2e9616987d3333388ea5a1cb56b4c161f279ff19454a64ade43daed4dcda5c0b, + 0x2c68210d75660df5d9a8392a2805ea1612fc6137cf5b35a68fc1f03acfbfe4ca, + 0x053cf3707283df8730b6e1f637d23c67b0b3533061a35bcb0cb0f9bbe4e8adc2 + ) + + mstore(0x120, 0x0486972179ee3496795bded1c2fc9674c0c3f71b58150c9c525063a6f2b340d8) + + mstore(0x140, 0x25b7568316c4b2fef9b72543b6033b317a7bfe406623e47cb68e5c79296e6bee) + + pRound( + 0x0ec90944eb8fc36c52f3fd13763714f41cea1ff487ea39d70bd94e9b7f8f16d5, + 0x1e96cd3ac345bb2e5bd3e755922f84afaf303d6fb227fc68f703b93665f5ea96, + 0x0408425405c66baa7d49858e6d5871e5b42ffebb0df885a824942da1e2e36d58, + 0x284d77566b42f3913d41ebb0528b899426e0805aadb9957a534b022b081aa977, + 0x0b044e5984887cda337f58c7ca50a78126deb5624f644516239427948d7d06bc + ) + + mstore(0x120, 0x0ae4ed0ea6adb74b9d327fbcd01dbf37f5f6c467480c8aa5f495124cf70b823e) + + mstore(0x140, 0x09034e1a646d6674bef041afa774e3634faf8adcc7c71bc2ed6e03b0b4492016) + + pRound( + 0x0cec9e74c344198703ceff28a4d11275f6c5c15738aa5a54a19269261ec6a8a8, + 0x2bcc34a99345174c97a65e8978194486a9957c9d736f0ca39b98130801d1a114, + 0x2ddb2ebc0ac98f6498c0f2be2d73e86a786940a1e8c558d8dbed8d6f44b02551, + 0x2642b4a208e503e3480718d4d205351f43da183ed284ed7a385ef7cdca80bea8, + 0x23fabdb09b481bc764102ae85ccf1e6ff71c7762f8bad04a2de3f7a025cb5087 + ) + + mstore(0x120, 0x1242067be2202d1b2c32b79c464e2d6c977e6fd12d8b35281e84c375864613d8) + + mstore(0x140, 0x1e8690f5b0a8729b9536ef2920abe7e6f3eee805237b158d997db63b17525eef) + + pRound( + 0x2817ea20b471a4bf138dec79d84f9f6c0015e0ca147b650683df4b3372b55ef2, + 0x2dfb7f81425c2def6bfa4e833e51e912298397de78fd2aa17f6d1dd2f1379ca9, + 0x137b5bdb746523c051d680be08daa6b0d54c9ff7099f2bf5ce894c24a8ef1f37, + 0x03900ec7adc8e28af7046833dbad3fa1024e382aebe02bcb535243ddca21aa85, + 0x2b285b6c23b25c52f2079863c759e6a10c33df8f191551ead53ea508511cb555 + ) + + mstore(0x120, 0x3036b521c631ce5d3599e37f6a5daf928842cefcbcd2c6bf84e2db5ded748f09) + + mstore(0x140, 0x1f52d6e9ac28976c5a6fbf168c818478645c90d72e367609d7d7805a6367482d) + + pRound( + 0x047f5113e1287b5572c82edb369fb0f717a91f261ef9d81764a5b279ad9c13ba, + 0x2d8800f21cd6774d5a6aa58ae2cd32593593d173b687122a4d61c44743902105, + 0x274ba1521d5bc5c580647f10d1a4c4cadeef088685d1976979bad813756f84b0, + 0x17895b7c10d6a475310d34a0737efaedddca8f1eee9d8d56e7fe4934c8b56441, + 0x06eed11ae9f70df5ced09b1a6db258978cf5becad2f66d15761bf61e7dc13440 + ) + + mstore(0x120, 0x25d61619e135690c4e10e4afeb4f5578ad0f8e25c20735366895b31eebcdf47e) + + mstore(0x140, 0x15dd579bbd075429301d7295d3e685d832bf9f36c51277d09f2c3a664b045cd7) + + pRound( + 0x2a0e60356875d6ace1055932b3dd9ef39c3dd871091e96a323c1596cedb35e6b, + 0x02089633a6194f3ed38eeec2c8f54d0c7f434938fdebb9c0e1830dbe5311c38f, + 0x178c73d2769765d85383283fdb0d769457cfef0612baa963336bac1240b604c2, + 0x2fc20bcaba9e3d96ebcdd710e3b341837d5d0db849e789f28c4be5004afa19a0, + 0x151a423bee67fb14d5ad279f425213db7e0f21494982df872354c01f0f4a722c + ) + + mstore(0x120, 0x15944b9954b6182314e878fa2f9e091dcc40eadc48d37d39bdd5f09905c3a369) + + mstore(0x140, 0x0742166dcd8ebd8576a6bfe0f1fed13793928f84442c7465a0012f584426fadf) + + pRound( + 0x236fa29b81678c8a109fd361c1ca90adf4423c13cf5b8cc1032b7283bcc959b1, + 0x2a80cbac9b884e20368691bf1567cb7320537a977da10e53c5baea3446c01d1d, + 0x11d4cb8957937b3628a3b3f4d27f276cc0c179b0c22b2c13fffbde85fd912378, + 0x1289bf8ec507bf752a07c9b71efc0f800a52fbeb1637c5010fa54eadab402946, + 0x26f842b1a99394297d25799f2f03dc9e4903e77d2ddc03ec2fb155466da6f303 + ) + + mstore(0x120, 0x168416e0a6d275d30eda3989242e0723024727d3b0791b06f8e1bfe8efe40198) + + mstore(0x140, 0x1bcdeef03693d1ad0ea80c65688654affe634aa14cb11ae3a491681d9c5f8eeb) + + pRound( + 0x08603d5a0e937b5353b56b05768fd50bde792e72fd61c06344cbd735707b68ff, + 0x0caa1711c66e9301b6f25e21a31683d80bf58d86032d03bfd25b9777edb74a75, + 0x2d6506da695d2087dff87b5f636ee676fab00c32ae45c75b3db345f3fe74a311, + 0x0d9244b07af9b6eaeff6f84049cb2e01d75dc4cb68533606e976b8b300758c84, + 0x243abc3c3382faa5dde3f1c3b432042d3f030ef6a1f5401aa37acd15cb1c8c46 + ) + + mstore(0x120, 0x02a717499cb6c31f71f0f0352b0f5bfef3005b80e93a520b6e42b3985789e2d3) + + mstore(0x140, 0x0fc053584b0a4607a2293e18baa309c52fdc933e9ba90fd327aaa8c8cfc4daa1) + + pRound( + 0x02f66bfda3d2a1bdedb0ab8bf7eb1c4e551bef58d94fad7f7c231107e5653909, + 0x019f6802171ab82a5922f023fdecc097eb8ac1fd0a1ed349afe9a7b94298975a, + 0x195a1c738398feed8c760468a0556c232645a1dd862d87c1f508c949ad52c3ae, + 0x0a36a3a46e6ec16567dfae1f853f360e6f24924810e838cb24ed1b0fce37f1e3, + 0x002123c29ea87f7ea7b35c25f9e8dd3e81bbc3974c3c17c607cd840c09f374ae + ) + + mstore(0x120, 0x2d5ddc21797043996b22dcabb9a1ba6c82b71e9a1bc5919db8befd35411056a5) + + mstore(0x140, 0x26315fcd9b5e1a266ec8e9f6600f5a6e0bcdb22f926d61591e83fa21069c0e0b) + + pRound( + 0x1310d1942129737b32e87a86f4573032b1b99ae3c6d71bafef7b494794855541, + 0x1bfadae53fc82900f5761c558fee5e1218e6b2a6657e74b540969eeb49e0b8de, + 0x28c08a69e5f3641460ff2c60b7579395650c5b6afb392da142d32de8677556ea, + 0x223222ee42b6ca997f44d643ed6a3f2b040f47fe8cd922163d9d9d8b2622d909, + 0x064dad4752e708ff29bb0842d2c452a71448b43949345690031cb125588876a0 + ) + + mstore(0x120, 0x2103066cc5df55e67cd7914028145fb71f089d671c83c5b537abea482b2d8cbb) + + mstore(0x140, 0x039f8077bd9b71f91ca0502eaccc1672c539f72329317aaf8173d2edd7636928) + + pRound( + 0x0759273a4177fcdeab23da38b478faf2d4f22e82f346aa754b0a1331bc8371ee, + 0x09e13300eade70568fa0a840ea9729896ddd84c364d6279d34a0b9d1478fcf2a, + 0x13e97ed3c16fad6cb5b7bb954f278f2434b22f8cc054463a145cbe0240d4f8bc, + 0x05cd3486dca58f4eb221bc2cbedb8aa3027cde5765971bb1f61c272c5aa51ad0, + 0x005ce523f6bc21daf1df468b12fd3e8665e1c1697816a9a671a3b2b6149c7de4 + ) + + mstore(0x120, 0x2a07507e9f030a42c6f29ccf1c9cc4f3e5a5b0dbf05874d5edadc03fe74b9474) + + mstore(0x140, 0x1bdf66bb1d57fd788e54ef29f06f35fdb2729b718ce81152cf3aafc64966110b) + + fRound( + 0x2247bc0cc4373705b89672a2205346e6af3a6422e81b4f4885dc3af7cadcc5c5, + 0x27bcc768bd31b9d00687a7e53c3ce53c426762706188790ea20b2e819638df80, + 0x0d91cef51a76f7a62c51c73a2809732d79ac350159814ea536487368cfdfd708, + 0x20a9ecdc649a26388dc68dc02343a0f167bad46d6aa1cd008537f627ba140730, + 0x23134149a0d4567c6dfc911d5cb80c1a1016220d39e0c230325dae2941f528bb + ) + + mstore(0x120, 0x233e0ef6ad132ed211b1911cdd569576fea8c17ca64e4d5dd516fcca07212c1a) + + mstore(0x140, 0x096f9b92b9cf2c7d664408a29860365f5b6adc238d878a476bded3e4d2e0b840) + + fRound( + 0x275c33d07f9e7338ddf50783bf158d51be619bf77a12020cf5630b78e7e0d0b9, + 0x16411554e55fe604a1ff1b3b5b7afb6a2bfd0f32c4070b55bf1ad234e8b28116, + 0x073e6ac7e6af227557249ca1a5c55222a36c641bc2851a0dfcfb60831f6759a8, + 0x10a6fde88c5f621d748543c76a218f95c202bbc3baca06838f31331b0556e12f, + 0x29c5865a26588ca8a88128a072c8434cc97a1bcec23e136f038d29dcf96b0eb6 + ) + + mstore(0x120, 0x2714d37ee506efbc2ba9941043fb23f16af966f123d653f38388bcbdd50e6037) + + mstore(0x140, 0x175d0480ba14abf0bcb8075a03f4a2a01ff7ed75413917b53e50ea00cc2a4ad0) + + fRound( + 0x2fc788fe8aad4c28b943bb57cb90edf6d7b1f1e835de1fbf3192e395db785554, + 0x1bac0ed609233148503795fc5e114076ef7c9d722bc648dd0338d9689f6e023a, + 0x001c35268aa030d6cd148e106e3fc23094e561573d8c72a69fc383643e2adc82, + 0x2bb1f8fe5d998d0b8b92837ffb27bfe7a39ce39ff94fc167ddcc95a7202e34b2, + 0x1a98576450a43e5e705b9af68cd0c145422da23945630b10b8e821dd61f9a2b2 + ) + + { + let state0 := addmod(mload(0x0), 0x203de45a037b75ef63761750dce08da2be7709701ec8158c17fc026fd084d541, F) + let state1 := addmod(mload(0x20), 0x265aabfc78b70ca985c329080d6329a12560f76b01cc3d431a7283022193abf8, F) + let state2 := addmod(mload(0x80), 0x135468dfbeb70e8c2edaffac8658a6c22b2ad1520ac0819c127af2ea5f3a87a8, F) + let state3 := addmod(mload(0xa0), 0x216a41e24329deda65a8a82001c84ce8286c61758447ff1bfa9d9293b6711fdd, F) + let state4 := addmod(mload(0xc0), 0x2887ed49797bd6652bed8bb99ae345ad70d1a27cdb21b9460bb6fd0d4fe482e6, F) + mstore(0x120, addmod(mload(0xe0), 0x03e2bf82690c804bb6ee3c79dabd1892ea53a9811e2424a19fae446b8ae49cad, F)) + mstore(0x140, addmod(mload(0x100), 0x0e6dce1bbe6e9e465cbe14dcc615611867414676dd8a8ce9946649b1c4e81116, F)) + + p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x120) + p := mulmod(p, p, F) + mstore(0x120, mulmod(mulmod(p, p, F), mload(0x120), F)) + p := mload(0x140) + p := mulmod(p, p, F) + mstore(0x140, mulmod(mulmod(p, p, F), mload(0x140), F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x120), M50, F), F), mulmod(mload(0x140), M60, F), F), p, F)) + return(0, 0x20) + } + } + } +} diff --git a/contracts/PoseidonT8.sol b/contracts/PoseidonT8.sol new file mode 100644 index 0000000..b3119af --- /dev/null +++ b/contracts/PoseidonT8.sol @@ -0,0 +1,1332 @@ +/// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0; + +library PoseidonT8 { + uint constant F = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + + uint constant M00 = 0x1aa4d470abeaa2357079129d114bab1170944f929fc178216ad847d4430f3f27; + uint constant M01 = 0x254b8126f45243f14dd8211df41fe5516b35952d56c62678c148e73cdbad3718; + uint constant M02 = 0x270712f18b1518fafe093660f492cdbc2fb70ffab31d8a4d8a1934be68792369; + uint constant M03 = 0x2bfc3981a249aeaaec4ab9001727d32d4e6fe75598ee964fc85cf30d50df584b; + uint constant M04 = 0x16060a17e1b11f851ceab20464572b3d78d582ea050014843101485f65ab723d; + uint constant M05 = 0x00e73217a106c402e4c6c166cd9ef1fd2a0b16ac1cb43646bc1c726f83177770; + uint constant M06 = 0x04b959ca07e7182ca08f2351a03545bd7ab676f740b02331637ea1434c8545ec; + uint constant M07 = 0x0fc9cc95222f92715cf7476010225e14cc38f314071e50e0f3bc9ec674a8aacc; + uint constant M10 = 0x0e1f4e4d26e9da5f8ee3deaf48b493610be61d7d3db1d9754feca30879adc644; + uint constant M11 = 0x2089c597feaa4ca9a202edfbc823763100e294c9e33000e513b2a216491d474a; + uint constant M12 = 0x107cfefa1e864045a668396526ed9f675b2bbf272ca635d8d3e8801099bb97d0; + uint constant M13 = 0x021630ec3f236ed219f73cc617b9f8b267dbee99a63c528544ea31b27cde49fb; + uint constant M14 = 0x2741203d66c523c7639ea713b20346119c961cc1e9659a458af74cbee16d71bf; + uint constant M15 = 0x17b2092b0f634576b654c6de21a1a8d812bd4c01559fff83217129082e2b2b20; + uint constant M16 = 0x068e8e63411df2b3a9d7c567f66419a580d3ba15bbfdd1226effa3fd6bd47b3c; + uint constant M17 = 0x2f5a2a0cd0cb24896c94878a8106d57e82c68dcf1e209167a45ae9cf8570fed2; + uint constant M20 = 0x0c298c14356a5a7f226c5a549e59184900385aafd8ea41d9746729964ef75f34; + uint constant M21 = 0x0ddeaa906cb65f3e9c9bea6344dda8db90c253c0f7f99ecef88786fefe0e5cc3; + uint constant M22 = 0x04b96a296a35acf415929b8784b6bba64a630d29dff28b628fc98ef708230b57; + uint constant M23 = 0x28890a03199b727fede5ed0090ed69494c053c97930fbb6c52358b0d7d104c16; + uint constant M24 = 0x2208c5004806c7aaf58314590bcbea16168fe62ec0497afc6bdd2938c12d9a23; + uint constant M25 = 0x2f24d609cb23720eda55fae29ec6f19902c42d8bf904fb656202736d97b2eb69; + uint constant M26 = 0x0344d0c772c2f053664a7b9266b19d48ae5d2ab3d1c1a18150754ab4b836afd3; + uint constant M27 = 0x2cd19b5c55bab1809e52cc9fc1a038c08935da19cfc563e7048d6bd1970a0c8e; + uint constant M30 = 0x19e070982d3ee675e1622ca20d13b2375e528b676706882eb8f1afe1c5045ea1; + uint constant M31 = 0x1114c9120442750493d999d4dd45dbd4f3b75ab183209235396ce83d8ee9916f; + uint constant M32 = 0x1f0465a9c133a1c6805d705be6b3ea9912a2d062c34dbef92de46955b83e7bd9; + uint constant M33 = 0x1b80f3f439396c2f466b8e9b25765a014970455a1beaed7a6fa308dac75fb582; + uint constant M34 = 0x1c01f6db435dc4885eef9cdfed193250b9d3eb4cee366674b07bdd194ff349fd; + uint constant M35 = 0x2df183fe2bc9b8b75773fa961c8d4117e582a80b656af5c58763e7024ea4189c; + uint constant M36 = 0x07e0cca1a35ed15fbdb619bfaecc7a9a8f4c51293927562acea8eab817c6b84b; + uint constant M37 = 0x24ff2986781fe40ae61e8f5ca0ef17c5a5ea7bddbc127d431547c1f6a8f5cedd; + uint constant M40 = 0x0333e2923992e89dee570a650125eda75a20a72e69e10863a19d17b7beea9295; + uint constant M41 = 0x2e8b35a8c29e639dde8dfd49b4b347f00ee467863f6efcb355fa1534ef70783f; + uint constant M42 = 0x27a2b7f5549e5eedb90105c0f8e20f0571ab7af0801f1bdd23eaad91f2229a13; + uint constant M43 = 0x2a4bbad245a33e5d9701537f751410e4ff297b8f1d1d9098fe9c518c261a1b0a; + uint constant M44 = 0x1f0e36c2cf9ac2c4388e74966d9ee7d1a0b3186916a08cfa306f6bb36d21e548; + uint constant M45 = 0x15fe963f5bd0d92878c10a894e118018db82e63528afa4d4703e9881eda118d1; + uint constant M46 = 0x222edf3e26bf74b2f503983189201d4ee8e6d6fad341d7ff50748dd739749df6; + uint constant M47 = 0x12a87d0c5419f448419840e5e5a92d276ace00963d987f2a1008913d98a27114; + uint constant M50 = 0x1944aac72bf6fbcdec04361238c3c4d9510d5f07439a1b6ff41f652990be0139; + uint constant M51 = 0x20e6cc613ae6cb0a518425f53db1298a7f8859ee20aad08320d0a4f9bbfe8512; + uint constant M52 = 0x031b0afb7ab2f1d241f882178f7dcdad48591cc67905d651dbcafce94b14d073; + uint constant M53 = 0x1e431f2b1b7edae4f8cbb5d307bf5131c352c2a215a870d739617f4b017c6d16; + uint constant M54 = 0x199fc2be60e49e679ec2ede6cf3345dcb3b918e5b3e07c2cd8141333934e178f; + uint constant M55 = 0x0af594dc4030e8509701fbd3d8995f73126ad72a7af0fff344eee82a31ce77ff; + uint constant M56 = 0x2d4308b4823b465db653d36818181209d23cd12f844f72f7548d49e55055a601; + uint constant M57 = 0x0af3ceff2c865a901b9406d5d9b2fc58833d642f46c6493ca030ef595061ec6c; + uint constant M60 = 0x27d802ad019a42fd04892ad167d9e83596a730605890401319661675736359f3; + uint constant M61 = 0x2420dd1281fc0dfac176a752d15906b55f137b9cc320d5d5daa9df3f3d43d3e6; + uint constant M62 = 0x22e0323bbbdace5fbc74a0b3dedea6e1e3bf10e84dfc71fe395089ac197af744; + uint constant M63 = 0x255639889a259ebe59f74a8fdf2efce7fde1e3a666b35d8e6ec601d4d0b22689; + uint constant M64 = 0x0a38d163b8a2fa3092999c1797b1af909bd971a25a656baefbdbdfa3628e678f; + uint constant M65 = 0x0b8e857d9fb1d554f3a4ec307ad907de7a436438603af1b28d4e4ee379960ce7; + uint constant M66 = 0x2e8e67fc85f9b4d00e9e1197b35bedf55afd7300a4c370987c83c15cf73cae3c; + uint constant M67 = 0x27f42d86842f4d8a8c3aff2f47ffc1e179f097aaecce55bba0b0fdfd5b190aa7; + uint constant M70 = 0x2bd05a040a0987ac6bc01f67242d54b7a2c527a970ad2815b273471eb9623e73; + uint constant M71 = 0x17bd4f2726748d99925af9a2f2929e231c1869428c13b1e397bb0099191723a3; + uint constant M72 = 0x1eef36d62f3f864eae67c63324e47a6344e33a2d5bfb82f05bef9900c54e745a; + uint constant M73 = 0x2d0d8a814cfa16c2323f174be2dcbe0c295829fc59bf2a89f13b4ead0eb056a8; + uint constant M74 = 0x198949eef2b27c2b9c3d699e3fe57da3d5b509c2b670afce400aba1aaa9ed51f; + uint constant M75 = 0x07ebcd25a10e56693a28155fcdaf7b3519d9e0e08241e21789696cb76ee06297; + uint constant M76 = 0x22f1bc4ec138b596128ce5ee5b8184964cc262318e17ad21d45c552477f53e61; + uint constant M77 = 0x2b6b3bc340d4119e57831e4a2187013f1216ab3b639945dd92a984943241f1d0; + + // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40 + // Based on: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js + function hash(uint[7] memory inputs) public pure returns (uint) { + assembly { + // memory 0x00 to 0x3f (64 bytes) is scratch space for hash algos + // we can use it in inline assembly because we're not calling e.g. keccak + // + // memory 0x80 is the default offset for free memory + // we take inputs as a memory argument so we simply write over + // that memory after loading it + + // we have the following variables at memory offsets + // state0 - 0x00 + // state1 - 0x20 + // state2 - 0x80 + // state3 - 0xa0 + // state4 - ... + + function pRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x140, addmod(mload(0xe0), mload(0x140), F)) + mstore(0x160, addmod(mload(0x100), mload(0x160), F)) + mstore(0x180, addmod(mload(0x120), mload(0x180), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x140), M50, F), F), mulmod(mload(0x160), M60, F), F), mulmod(mload(0x180), M70, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore( + 0x20, + addmod(addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x140), M51, F), F), mulmod(mload(0x160), M61, F), F), mulmod(mload(0x180), M71, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore( + 0x80, + addmod(addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x140), M52, F), F), mulmod(mload(0x160), M62, F), F), mulmod(mload(0x180), M72, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore( + 0xa0, + addmod(addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x140), M53, F), F), mulmod(mload(0x160), M63, F), F), mulmod(mload(0x180), M73, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore( + 0xc0, + addmod(addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x140), M54, F), F), mulmod(mload(0x160), M64, F), F), mulmod(mload(0x180), M74, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore( + 0xe0, + addmod(addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x140), M55, F), F), mulmod(mload(0x160), M65, F), F), mulmod(mload(0x180), M75, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore( + 0x100, + addmod(addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x140), M56, F), F), mulmod(mload(0x160), M66, F), F), mulmod(mload(0x180), M76, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M07, F), mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), mulmod(state3, M37, F), F) + mstore( + 0x120, + addmod(addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x140), M57, F), F), mulmod(mload(0x160), M67, F), F), mulmod(mload(0x180), M77, F), F), p, F) + ) + } + + function fRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x140, addmod(mload(0xe0), mload(0x140), F)) + mstore(0x160, addmod(mload(0x100), mload(0x160), F)) + mstore(0x180, addmod(mload(0x120), mload(0x180), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + c0 := mload(0x140) + p := mulmod(c0, c0, F) + mstore(0x140, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x160) + p := mulmod(c0, c0, F) + mstore(0x160, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x180) + p := mulmod(c0, c0, F) + mstore(0x180, mulmod(mulmod(p, p, F), c0, F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x140), M50, F), F), mulmod(mload(0x160), M60, F), F), mulmod(mload(0x180), M70, F), F), p, F)) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore( + 0x20, + addmod(addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x140), M51, F), F), mulmod(mload(0x160), M61, F), F), mulmod(mload(0x180), M71, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore( + 0x80, + addmod(addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x140), M52, F), F), mulmod(mload(0x160), M62, F), F), mulmod(mload(0x180), M72, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore( + 0xa0, + addmod(addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x140), M53, F), F), mulmod(mload(0x160), M63, F), F), mulmod(mload(0x180), M73, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore( + 0xc0, + addmod(addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x140), M54, F), F), mulmod(mload(0x160), M64, F), F), mulmod(mload(0x180), M74, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore( + 0xe0, + addmod(addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x140), M55, F), F), mulmod(mload(0x160), M65, F), F), mulmod(mload(0x180), M75, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore( + 0x100, + addmod(addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x140), M56, F), F), mulmod(mload(0x160), M66, F), F), mulmod(mload(0x180), M76, F), F), p, F) + ) + p := addmod(addmod(addmod(mulmod(state0, M07, F), mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), mulmod(state3, M37, F), F) + mstore( + 0x120, + addmod(addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x140), M57, F), F), mulmod(mload(0x160), M67, F), F), mulmod(mload(0x180), M77, F), F), p, F) + ) + } + + // scratch variable for exponentiation + let p + + { + // load the inputs from memory + let state1 := addmod(mload(0x80), 0x2fa46f5dba9909ce9984a01e2af30b550dfec978be92b49119a3959c7f623703, F) + let state2 := addmod(mload(0xa0), 0x21d8f94d3bd98f0b63a7aacb175b2cca13b2dd8a8cf68fc36d94ae29401b2d2c, F) + let state3 := addmod(mload(0xc0), 0x1a8c06c61046e0f8dc6a39bc57aea0d07fd7db34e68f73579da89e116af87eb8, F) + let state4 := addmod(mload(0xe0), 0x298cd7046f58c0cab77523a58a6fdfd1401b89e7ae5eef4994442d167f7ad1d3, F) + mstore(0x1a0, addmod(mload(0x160), 0x1b3ff4a6bc8490993abb7a002393cd1c1c007f49240ffc2ae1f1057cfcd8c7ad, F)) + mstore(0x180, addmod(mload(0x140), 0x0bccdad6e8b1fdfba846a9553fc7905b3f96e435d653eec3972565e1fbbc302a, F)) + mstore(0x160, addmod(mload(0x120), 0x06b9b718bb3b6d45e0cbe6d5d9a2f096a77beb056821750d072262af2a70a33e, F)) + mstore(0x140, addmod(mload(0x100), 0x0eac737966715df4a20b31ab693eda86a07f3e830fca475a6574d67fc5f19f63, F)) + + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x140) + p := mulmod(p, p, F) + mstore(0x140, mulmod(mulmod(p, p, F), mload(0x140), F)) + p := mload(0x160) + p := mulmod(p, p, F) + mstore(0x160, mulmod(mulmod(p, p, F), mload(0x160), F)) + p := mload(0x180) + p := mulmod(p, p, F) + mstore(0x180, mulmod(mulmod(p, p, F), mload(0x180), F)) + + // state0 pow5mod and M[] multiplications are pre-calculated + + p := addmod( + addmod(addmod(0x1fd861ea689ed18a7bfa097c872d6c0195920c8584fa8f29642b3820212575cf, mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), + mulmod(state3, M30, F), + F + ) + mstore(0x0, addmod(addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x140), M50, F), F), mulmod(mload(0x160), M60, F), F), mulmod(mload(0x180), M70, F), F), p, F)) + p := addmod( + addmod(addmod(0x6115ae0547c3fd46b4ae21acc4b39830e7caa18eeab55514740892aa4bcb2a6, mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), + mulmod(state3, M31, F), + F + ) + mstore( + 0x20, + addmod(addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x140), M51, F), F), mulmod(mload(0x160), M61, F), F), mulmod(mload(0x180), M71, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x2502cffbbaebf41b417ec526d93f2d44874d1c5da021ce3364448322232f8a0b, mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), + mulmod(state3, M32, F), + F + ) + mstore( + 0x80, + addmod(addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x140), M52, F), F), mulmod(mload(0x160), M62, F), F), mulmod(mload(0x180), M72, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x6dcfac07359e4d8ba0a1a3319bbf93820db456e5b0ae488008dd8766969848b, mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), + mulmod(state3, M33, F), + F + ) + mstore( + 0xa0, + addmod(addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x140), M53, F), F), mulmod(mload(0x160), M63, F), F), mulmod(mload(0x180), M73, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x545bbdbc151efb516536be2bfcc3bf0809f82ed021780ea61b54f0b7168521b, mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), + mulmod(state3, M34, F), + F + ) + mstore( + 0xc0, + addmod(addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x140), M54, F), F), mulmod(mload(0x160), M64, F), F), mulmod(mload(0x180), M74, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x19ab82017f6106d30d75fb6ec674f5c539b6afe9b5c8f80b9687ca1ef7da10d9, mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), + mulmod(state3, M35, F), + F + ) + mstore( + 0xe0, + addmod(addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x140), M55, F), F), mulmod(mload(0x160), M65, F), F), mulmod(mload(0x180), M75, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x20c82832b47555fdac6f5a754adfe67b0d5c20f94e88024370ac500a57ccba91, mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), + mulmod(state3, M36, F), + F + ) + mstore( + 0x100, + addmod(addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x140), M56, F), F), mulmod(mload(0x160), M66, F), F), mulmod(mload(0x180), M76, F), F), p, F) + ) + p := addmod( + addmod(addmod(0x13824d4aae154bff04c4aa99e3a48661b922a9ba7404a878284d99f3bd3b1c40, mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), + mulmod(state3, M37, F), + F + ) + mstore( + 0x120, + addmod(addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x140), M57, F), F), mulmod(mload(0x160), M67, F), F), mulmod(mload(0x180), M77, F), F), p, F) + ) + } + + mstore(0x140, 0x0eefd0b8617a1ecd7711ffd5f6c4cd0496487a1b1146e9f3d53275af18fc6c6f) + + mstore(0x160, 0x03c707d1835066fa30e7295a097a6ff463b85b778ca11d9bd2988d41b600aae2) + + mstore(0x180, 0x063ad3f6e3f8443e0908af99ce32d2c09606e84aae5e3ad30ed60d7a660738cb) + + fRound( + 0x1b3ff4a6bc8490993abb7a002393cd1c1c007f49240ffc2ae1f1057cfcd8c7ad, + 0x017f0c9452d70eecdf5cc8b6b0b205ec2da1de59750d6d1709751831b7e4ce26, + 0x0cf1ab805bc47a10349ae77135ea95a4144a6ed0718fdeed42971c160791b269, + 0x18dcacac61318af644ab0f2e61ef48c29a8aecfa0282e9fc325b5c0287103ce0, + 0x16fbb3bdf4066e2b2f050b89b685d408711685db7e4638dec90ab1cc794350fe + ) + + mstore(0x140, 0x173ef7767749a3249b004eac7aa7e94dab20d465c65ebf4bab422f743f17d8b0) + + mstore(0x160, 0x049d90fb549e0e25790f5a6570755c68c13c97b18d67bb9199dc765355fcb1fe) + + mstore(0x180, 0x0d1aa7cfe6ca9e048ac6ce2cda40c6d64afbb8c15a7cd9e0222566f9922a1547) + + fRound( + 0x2cf67cc9cd3a5313d992e315010d90cb501f790bbe35a166392a51d90d117353, + 0x2a6e7a7bf7c190d4e4f7f258d890dd41780e28f6b71e893716f70140f4406b34, + 0x26140420009b6d8c7314723e66925badcf98440da6c2b97b66a52b98cbdf1d41, + 0x212c611149d057b2ffefc9938ab1498d3b265392c73480b9cb02276906e445ba, + 0x08918ab686c1a160a55db12010b20150f82632dd5933e27cd01129518cd9e952 + ) + + mstore(0x140, 0x10bf42990104c39b27ef0ba451b510cbb001f8ec39a313d259be4309d6429bd2) + + mstore(0x160, 0x163e875fd9e04b255971072c0d2e7614ee1f3c7d2b93799aa1570bf73153f3ac) + + mstore(0x180, 0x2925a59f82c1472b8120988e3af6cf24c2ebec9a9f0f830bb5c826061c65eb8c) + + fRound( + 0x2d82e2ccd8bd63b2ba44bc0f4cb5ec88142a4408acf1dad452a66e8219f667c9, + 0x2ab73a842e0bbfe229ea1154bf8aeb48cf2fc289b939471d6b465b7202eb2354, + 0x233f36bb205dd59d045310064408c6eaf710173a118f9ed21153c99a6b0783fc, + 0x18c14a50595b8df32124bf57f8b8df430449f35986242a2ff79a644f510cef27, + 0x186508d6b75c7902ed6a1948f91088c7cddf973d8cfcdb4e5a5b0cac6b5b22d0 + ) + + mstore(0x140, 0x2247cd5af8b5ce0a983aede949f81dc7d3fc5a2cbbeb8d16ad43fa2c3a882537) + + mstore(0x160, 0x04990ce49123ed1eca92df7bca2b271d07ba4ae5a30c6a0119f77b51c3643d2f) + + mstore(0x180, 0x064e8bb29cc072af727af1b79af50896a6548dec41bac10f0319fbefc1bfef9d) + + pRound( + 0x25caf9ff6543dcc34e2d0b8c2af3b36ebef3d4c3fe62e2937ce590a38df2da1b, + 0x14cc417fd674083090f4463f66180e4a3f38ca5ba87f4889e510ada924f6b799, + 0x182550aed7fb3b7d92ef0b91f4916ac7f7db3b943103ae7ba2e09ec0f4a08517, + 0x216305852467475a9f934d3b1132a99642fb79fb6bb91d948f391ac9e1c3f1c8, + 0x0423b771f7215716cf97b3a72ccffe156bb9f8097c77a2b6dc67bb5848689b8d + ) + + mstore(0x140, 0x2e1ca081c96d5abf2cc40b3797c38b0ae8a8ef5d76e6d03e9bb06741c2184123) + + mstore(0x160, 0x271cf3ea7b06b4e743585ae68997c0143542e405c70855787181163e4ac20b45) + + mstore(0x180, 0x09dea127972d2109cadb7e96abba7577c0ac0077312b9550f81b7716a92f5eab) + + pRound( + 0x05f9be83351a037f574fd0f54d4e9ae5cadb930ceb51c91b07894f0160f8fa42, + 0x202ce17e96cb24e8986cd09351ab9576d5a5167168f9d5f3877c4c5ce03629b6, + 0x098a2fb5cb01868cde6424c4211b9549b8f550a7f03e7fcd8b5121516b3f452d, + 0x2cbd947e532cda0f8f1b899ffbcdd5e0b6b08451e637fe53f3b4a8ea7832aa27, + 0x0e0fa4620cfc943da81b40b6b42f86fe74e55900f800645ba66137b6b7c728a0 + ) + + mstore(0x140, 0x10860a875d80bd71c6267c1d54b02fb58c890b1cffc35fa707fe6a94941281cd) + + mstore(0x160, 0x2eec5addecc4e24650dbbea531a0fef0dc327dc694f229b2526d2f30b2c499c1) + + mstore(0x180, 0x188bb7150b6e40624b02ea2821aeb6b52b1e85b5b724bc0ec512f8fa641182ca) + + pRound( + 0x1982cc716da20b119525c64a3fe85f5e31baa97c76c82376999637d8ef1c8a07, + 0x226600de8bb65b38ecf996e5bb26fd6288c690f16a5eedb730d939311d0c3ff1, + 0x020f7b77fbbcad998e7744ca27c0f7c0c2550a3db90fe28944e73d01d24ae6cb, + 0x1c2e445cfc98637aaebc2c1ab7b6d790ebac5027071d1057a945bc90437c49c2, + 0x244b349502df4a33563b30237ee750e79bde135f0b0896f0d9cde04f1004171e + ) + + mstore(0x140, 0x2ed68ffba6a646e5047666b8ad69f6cb35ad096d6d34fe1ca67e532b5186bbf4) + + mstore(0x160, 0x23c632c2fe68d4f0a71b1ee63951c72b7d349797f07053df2ed33520ea3e94cd) + + mstore(0x180, 0x27fda5f826ce6a8340d12a584d4b9c84f0a4ea3c9d33eae8d6c0e23a5a9897e3) + + pRound( + 0x05e56007dabde2cc83d498371e99ada953ecd69e135ef0204d2d3b6cc1f49aa1, + 0x2553755b36de611ed557768bb5513731474a0a8cdc6dba8f04f3031b07687b16, + 0x1cf267dd9bfb6e678a82c7745857a63e2b57066a8626b52c0fd5ff42418aa65d, + 0x106b2a40087375ea2988b8e0700fdd71d3716af2bfd0b6b0ca6e24ab4b4c25e1, + 0x0b978e4a10dbcdcbc7e90aae2ca19615df674819cb611d93b4cbf5f2ff9a0a16 + ) + + mstore(0x140, 0x1689a04762a5ab1388f6a7257e7c72838513c57da7f546a2017ff128afe16171) + + mstore(0x160, 0x288d8c7325204250e8632f42debee8a31a470312ab2fd00afbc7694f95b827cd) + + mstore(0x180, 0x23996135af9f3a42a6db33fd55319a7caed8da2e6e338068d78f5408552c83c1) + + pRound( + 0x2d24aa4c0772256e90344d20d46dfbdbb5e9dc132a4fb07faf8eddaa30da7674, + 0x048d52c4e3d71485ce6af122ea136e60053e387d77369eedf8d9bbc663fb98f7, + 0x0e0c1f005a1759dd161302fdb233cbac5fe151b5c2192255bd757b3ced899f92, + 0x230d641c4552e5e55416e360eaa32900751de5ca53e8654af8d422eec627efb2, + 0x02ff6fa8364a8cfb19e30be87d4cdeed9f957dd024f8138d535c6380a8b5d38a + ) + + mstore(0x140, 0x0985a7c9b42805d910a89e2dc9563e7e3449fd5b401ff4d5eac75dce7fcb420d) + + mstore(0x160, 0x2c1905b5f00c927a57a154c474427e31f3caab81981d621fb7fea525ccda9bfe) + + mstore(0x180, 0x0b23502ce04c0f4cb30c0bdb6c4f2a4f81c2ef223936f07ef57856f0a9bb4f70) + + pRound( + 0x15d052dadce14506fccd2690c333f8ecac382d2b6734726236cf9c7be278bbe4, + 0x1494fb65e5993d96c30bf0bce3f56dce68a2de52299b4809cc119e37d8e042e6, + 0x0b800ef8749f91b307947c581095ec9283c3b131be5ad5bda4200992fbff053c, + 0x0bac1f53d5a7d39811bae7c1a79dc997fdd5f1270f72805fb05f5c52d77c1cb0, + 0x179249893fa86ee067b47bbe8335b8942bc921ae0e082c303e32b809d939786e + ) + + mstore(0x140, 0x18ce7b3e647ce9a3a90d0ed9aa57eb9a895d596a54958cc9702d8da219623e81) + + mstore(0x160, 0x12320ee10efc1f8118d3ea697574eae2dfaf8f29c183abd123392e3c2829900a) + + mstore(0x180, 0x093d0e1304c660fddafdb48295928fb6a83114827566cbcde26ef4c87c9fa89e) + + pRound( + 0x2dc051c1bcf637233ea7c5e086aed7dcdeb51b7a3525820bdd6eb65e578519ba, + 0x273d8a4166dc3f53b1ff24c61f1a3b3007a282b526c7239eec81e92f51c741ae, + 0x257988be7dc257a0c5dd7078b72f692c755f01ba3c8e57d82d9b969565dbf0fa, + 0x213d0fe5a3e7608fa602f5b5ad5b8260654445ebd72492a32ad3991f3a5a6218, + 0x07a383e7a221bc76fb14370d4b3eee8de502601a5e4d54b3370c4c502b097a8a + ) + + mstore(0x140, 0x05d22a2f48f64658e181b8ae5e72e1a942796af2bfe6ef74ac9abf53ac65eeb4) + + mstore(0x160, 0x1f006e8d2463636bca787f765fd6ac723ad2c2e466ae6324f5d39f3eee58f0cd) + + mstore(0x180, 0x28913d42bdf680478ffd17374e895fe7799d9d100196f6ccc30dc08f39a479f7) + + pRound( + 0x2931b9295d96e5b97364b37daefda7dcbf3dc9f48ab3364da9dc6a7234d714c6, + 0x1f533a1e4b4878c2fc2e9706e541d28481ce43b1627d0ba46596906cf3281624, + 0x2517cb724d12ee6ebfa7b4b0d25cf0315466e98d8cac3ffbfb1a1bcdee0cf064, + 0x00e43dc983bc8febeaad40130444ab7f9187185624149a7f274492d9bd8389ea, + 0x186bc09a7ffc4edd291579876b77c2fd3eed0b1b83f21ddfb899039ceb77f379 + ) + + mstore(0x140, 0x263479ee77e44e8b2ab953e82ef63a7e4aff48f0e730f4782b225cb22777104f) + + mstore(0x160, 0x19904c84e55e1af3147cdb7f3a428265e20c1bbccbec2a5c8b950417ca2ee471) + + mstore(0x180, 0x2fa8468fea3204ed2a934a1eef7c78580a8da30c5ec5922fac89ab92ad81a3a4) + + pRound( + 0x11b557c8d7e97bd99ae5f49e823308bd6e22694225d4029dfdcd836cb7c0ad7b, + 0x0744b53926e1a0ef395bb04908b13326ae1866a68983c41de56fb7cc7dcce297, + 0x2bfb2f2456a70989b165fb6a3ee6f944d28362935cabe516114980f141422a03, + 0x3027047944ec82cef6240d1637070c622c5d28a74302de0efd6d4addd4dc2db2, + 0x1ed0b5e4b29aeb0b5b3eb128cf031759cb3bc47cc1286657cdfe88c5c411d4a2 + ) + + mstore(0x140, 0x2a96c9f200b477eba78316fc4497e08b2a4384b26c97c7b4ce877cb65ff5634f) + + mstore(0x160, 0x043293e61ef1b614850bc015dd316e2c7c54f12d2db746f7c0cdcb0ec551cfc2) + + mstore(0x180, 0x1d81e0e280611bf30989c1a74088493504b818b385d04d96ad298dbed9a7bdfb) + + pRound( + 0x267c0b4b19662cf09b870e05f7441e042e5b962f73dfd78d23384dc7ea71afa5, + 0x2f1504675041755409946e8c5f5432d35849ba7bea0d12512547ae684b83ac2d, + 0x204199d64982f574327ff3f400705e0a53b25d59ae91ce0b9d31fdbba1ee2b0c, + 0x0a087554e5511426780e457757c175cf6187a2efb9568a3d390d3a51c2297ccf, + 0x2ef9b88428465f535cb04119f518d1c2052268455f1ab145ccf1693be92416ab + ) + + mstore(0x140, 0x11afd75dc84353e2f9c2f05d1f3ca734eb45546b92396233a3f29f4e8f6791b3) + + mstore(0x160, 0x1aaf43ed6da39b453120bd0312f259294ea101b678dff427843c0fc816409ed6) + + mstore(0x180, 0x19db09df83387b1e4185cd79400609e79f37e5a4658dbee0785dab5dcce32868) + + pRound( + 0x1ad9cf17b8368d98002ced2cf6ef9385a074c5e3aa0b2e12f4b768cc4804bde3, + 0x19b30a27119ff50da2734b127ab83299a4b099694c31acc182ab453fc000ef95, + 0x132d81f00bbef2804901c4073fcd9c817a63832c30d653063f67fd86482e1998, + 0x292ea3ef2313863a1276b1f0e4973fa784dea78a1ec98f4d593947f6a4e73924, + 0x028cfb5e0c41b0c77d987e737a5018787079f2ffa650102f2feb735c7d9bce84 + ) + + mstore(0x140, 0x171d6498b42b39345d56e8661ccc2b576ef449b1f8e5bdc5ac72d9f93dc3dd9a) + + mstore(0x160, 0x1be82f3b1cc9d849595d85e3398331186b6e4b4cbdf43ceeedbf04735315a8d2) + + mstore(0x180, 0x154711be62f23cd46086b9311b28eeada8d26323f8864de7e36e5543bcd7a38f) + + pRound( + 0x029cb3dcaf2ebb0f5b0b949e84278fed2d11db8c1fcf35e38189afca16c0cbfd, + 0x2881df9352d274f0cfeb55df8ffeb1d0d81fcdab794082e2107e1b0426a730a2, + 0x0628a0f9594c159206c7627a8f10748a1df2ce582b7604a8e64a7015ebddb65b, + 0x22657393eb7ed9f4572c22cd7b9d5134d1fbce295c2a95f1afc6441de60d7fb8, + 0x006325f509f0362714c4850daed8744062fcf8098608005e7d08b509bba33624 + ) + + mstore(0x140, 0x17039023ba24e37bc4cde497e95d134ff35dde6fe093ed788e4839d2bcecf840) + + mstore(0x160, 0x214455d91fc747c6aa9908ad92d19b2dc75a84651183dcf43b9a256320c33e57) + + mstore(0x180, 0x0a07405f036d30ec77ec64b034b9fc5df2cff5877c3c67b7ab23b9f2d8dad2a4) + + pRound( + 0x19ece5d8c0b6cc07fa0119746e7f36c9c8d496ac1e1d95cd5bb8d769a6745cd8, + 0x26d6162d8d9c9c60244cbcc1bb78814265fef97a53a168c62a43b9e6f4cb2d16, + 0x28bb85fef9f65884e4a99a63a59a906d586cdd88bba7c51259b1fe6a375fe4af, + 0x267ccac1e34271971e474179c5800526ceef2f1a6fddaac1de2299e92d9d8ce0, + 0x2e6b4868d15390d8014248eec0c7f10d8ee9eebfa64025f961ece49a9ffad985 + ) + + mstore(0x140, 0x2f60e05fa1f7446735a3717a9d73728a5b20166537ffeb65707e5f7503e8acf3) + + mstore(0x160, 0x1a2b7508921fa054f58ca4d6eeb133453663c8979d6216ec9ee1240b8c894e80) + + mstore(0x180, 0x0a0aca4924bea6979a56e47af0bfa19c1db7d756bb4aade0a58e5bddd7ddcb4d) + + pRound( + 0x29f6807284b6e435ccc2fc14579baed0a60617e0ee33a358cb316811b3d8864a, + 0x246894f6071fc9630f69187cb5ab506c05084114d2efcf231780b5d4b5c4a0c6, + 0x04224081b90a67774d15ff98e6134493c01926f7ec25053de56215c145e5da67, + 0x0d99cfe7649d1dfd292f11773bfff1ce3645ce4212787ed369c0a06b602bab21, + 0x1fc76023333ba4dc0f2a8dbafbba1bff33b753fd77e6b1bdc4c796a031b7815a + ) + + mstore(0x140, 0x128d42c08444d8956879995a105a336c4248ff9581139122ed9c9d55464ee9b3) + + mstore(0x160, 0x12e9391f7f131f13c39725c4414669bcc64c7a41b6764e687cee8e507433e3e9) + + mstore(0x180, 0x1de988e46c2c9a1c00d85dfafb1da7509bcb36422aab6052fd1f927df741c170) + + pRound( + 0x262a2365cc780f62557c854566fa2c8822e6fdff8eadb90949faa5abd63a7f82, + 0x19ad5a882f1dc4971429545dda3db1857b1ca0a246768b3a2b0014ba5a302439, + 0x261e3360fb23c08e87b8f588bd59f08cef07bb48a6f1226a64cdc7d4de7e95ca, + 0x069cc67cae46ded18fdc725c9cad9dd64e445c990271b0e2d2ccc42fdce0bf59, + 0x162e21896c8d1f6c2b7ec16fb7ae7ef8c8ee19216ae189a6ef2d7ebdb1ce62c8 + ) + + mstore(0x140, 0x1b7ee255815ba7020f0cf78ceb9860815c0eeba268a72cecf9e3fd1a6870b3ae) + + mstore(0x160, 0x1ce04f643bc9513316211fdc0bc23c9a52bdaf4bccd9ca18590c1703a2d120e1) + + mstore(0x180, 0x2e3a6532afa95388b41ad59d7c2705445d7ce10c88d73411b7271f52ed4c44cb) + + pRound( + 0x2002cb8a779f93de8b44d7fb08cff50828e0771d65011f9954b424e67802cf0d, + 0x28f6e5af2752c79d01a3c6c7d2930fdfb164989c20f905ccfc0982c29365d631, + 0x19ebacb5354f7f272f5c12d6c71b39d89e14aaa4efbf987377337ffa3c026b2b, + 0x05dd47c695cc6c95e2acd1bfc0ce335cb304a3c3380a94e8b7c070682ca869a1, + 0x246bc3c037a3c9ae2bba7e73578b1a825e1672a7418801cc0743954534d9c0c7 + ) + + mstore(0x140, 0x111ab56e19274efd47392b70171dfdab0c8cef5b6de579de67f579e86b506fbd) + + mstore(0x160, 0x006e6b88e6f0cdf982de483aa04bb9d0fe288ee5863a6892915d125eaed786b4) + + mstore(0x180, 0x29bc59d6fba6d692e2a5e85ba50d6fd9bcfccc57e2bcbdddd65881af445fff84) + + pRound( + 0x1f91121f2cbd1ead2f70f4f74729a25723721a895a87d73394cc9c1809fccfbb, + 0x11082403388a99da0de3ed7d3b873f5abcf71f8bea6e358f5b0f17ca5276d926, + 0x03962a691eb42cf5ef779bee82508641329ed9eeb7857f1cecc46dc93046e1f6, + 0x0a67910e294583739c2b6d18ea5ad74e141bb2a353fcdd93fc3ef83f4fd7863a, + 0x1c20f9bd1323709fda124f71e88901235f44c5e48287bf0f43b45443ddcbae5c + ) + + mstore(0x140, 0x2e944ce0eb653745a45632c070b931d08ecc4973ea091e5dc67125cc9045e41e) + + mstore(0x160, 0x27e3025a2d3e82614a4dd0550f59359f5643b86835926aed2eb0a7aa4f06219a) + + mstore(0x180, 0x0d9848e0d3b8bc8d43e5e6954e6f0181986e575054840f238cab4cb5b03fffc2) + + pRound( + 0x261d13ac441b2f30096c1f7f66a6d973244c2c070211275a37d49b1d70340edd, + 0x077f8d9273ffda37ed1ea683f69349715f95986d26163f00d41c9e3c366ccbfc, + 0x1678f9fc6c4502c235267f4b841d9543208542355ed7db420a609acb8e8ebdce, + 0x1a65b41dc302b906fd144a594bea6d909f72fb707500b270837c9a249590075b, + 0x265359bf0ead777264d18dbb4c4664301a23b10579368f40b433710b97f807a9 + ) + + mstore(0x140, 0x2813c10731f7694540eacde857786ab2443fb1891619243b8d4d9a529a733548) + + mstore(0x160, 0x2aa96905ef42bc1e8452087fe13dc3d55ce94062936fde48fc29f8698ed5ec50) + + mstore(0x180, 0x0f093d369fad0a0d255bfc311c4a58dc98a1900cf359b3e7d9688f6591b8d384) + + pRound( + 0x1ac3aad815d8ec13b035decf67a685496a87b104bf57ef38cda855877fca7c75, + 0x0c910186f912eef95fd673ead2281ffd0d5ce9c80cc51f6f931d0c75b9c0a3af, + 0x248b63a76a024d5cf2e42a1bf70a954f01b1849dac31fd545a7cd74c5c3a1e54, + 0x1a71fba60cd363b0be3ea3604a386cd1df466b5e69f93503858c69f5a868695e, + 0x15a2869b6363cd02a472cbcec5c91bfa17242cedeab83084f0eedf28343178b1 + ) + + mstore(0x140, 0x1a1b68bd2951131e6d71952233647e4165bc412da6d99c2197aa397d8d3ee5ba) + + mstore(0x160, 0x1defdf14415a78d5e6f287ae6e49ebb11822b8734c9df91c80e08de57b2d4f2b) + + mstore(0x180, 0x10040cc4fd20bacca69e26287138be4dac94040cc6224e2bfdc76661106a7249) + + pRound( + 0x068dbbc530967765cf7c7e69b8bee4ee08d486b420d5339626c8411ca984027d, + 0x1dd0cab71570941ee962bd61dad1cb68a8ed8022adff356a67fcab3a6eaf5aee, + 0x29a857f084ae7f2b506efd6cfb0672d63ae960cd1979f78d7f55d78259553777, + 0x2081f7713f51b3930dfa0a6df8e83611bc8829cd1f8471b7e2e17f480d853c33, + 0x2eea374a60ab1a20648cb908e605c6d8599ba601538635c8ccee00cabc85727b + ) + + mstore(0x140, 0x08d01db18faecd1a26c285be65414bf18ab012d7efb2675f4ae1d6f5e1370622) + + mstore(0x160, 0x112fe5d217f33c2d2d19762d286841366ba782b4bddfa33bda836fa2de419010) + + mstore(0x180, 0x064885f457cfafe6ece2944a9a935efdc717affcb4449ceb31a2792d5eea6765) + + pRound( + 0x20ce67f32e823b988011d0c33abb0f725be96fc9ab5b2eb71012f5f80a55ff40, + 0x202ecd50c82c9e1c79f0fe136518b22551c058c21b6eece43585bcd28cc4ea87, + 0x10fba50c060fceb989d7536c3692f0c3243338210d145d6187926798b747087d, + 0x02680936e402765dd6ccfdfe2dea719d3c507a7c551123c0f9dd59a58bf8dcb5, + 0x102beb4a5c4c903eaef9ecb0d5794154620d7e9de84364fe0583be79b4de7cfb + ) + + mstore(0x140, 0x0c502ff1bed8a68726803e222b87d59074956d834f2d63817f2a9efed3dc931e) + + mstore(0x160, 0x222d9daa384ae2b40e43e274cc07d2dbb9eb6988d03894b6fbf51336634c917e) + + mstore(0x180, 0x1df8fe0dda8e51971b917b0ff0f3e05ed4b00c09545351a1177805c50f6bc009) + + pRound( + 0x0bbdc371ab6d4296e73ed2078b99fa47d00c44cf51eec0ad4ad0aab9c09cd886, + 0x0b9e59b699aa688dd12143e890b6fd0e34800d6b440f5f6b6c426b30ad078887, + 0x0a5aa31d4fab8e109b0fdfc55eb14a5c2d9267d7f986b610170ce5543bfb30b7, + 0x03239d50b4a0128e39c7673f2f99d88b5903eb1bb7704c6c0cdd4c31408a7a6b, + 0x11a6945949a182759b6f1da60eadaf2c730cce66ea046f8f5eb781e7c45f8c9d + ) + + mstore(0x140, 0x1c2ab6e96f68e3b2cce6da3465b19e3e4a437b1f209c55e6ef99a1ac0736bd11) + + mstore(0x160, 0x2fd17db7e1827169c32ccfc0ad14d9f97c7507f8ef88dc5d6f04b02203c37e55) + + mstore(0x180, 0x241fad7570628418ab9748ced53646c2e100aeebd62a6c73804f080de66d9720) + + pRound( + 0x222bb8290405c5b3373f1b199969c6d0f9ba8eb772f2497c55c0f551775b2635, + 0x07902bec23d9f91a003a928eaaff9647ac030289dd5eacd8cafdd31b93264d10, + 0x2c706f059d6a86ea496c2e4693d1717e4098ff87d05a82d738fd8883a82b9d5e, + 0x05ae261694bee2446a1813608edec696f252922d33e94280aa805bfd843786f5, + 0x186ee2ca779c5c26a193adf0ff47d9f333b750f99b77655011c64b3e8ccdf93d + ) + + mstore(0x140, 0x0c787dff012f136b89ce3516c1cf867928d7107d218d62d51b0b2d8cc9850498) + + mstore(0x160, 0x0b20b314907f522e17a9d5da8c10fcf88cb956556cf077457c1e4a9ad5dc0b0d) + + mstore(0x180, 0x11d5cadfd04189c6c14a49e8ba6783540adc7ed70bf25afe25df9e2ffd9bc35f) + + pRound( + 0x0016b5b53403ee6f47e6100c2778ca970b40af6be277e98b71032f894e6f6a2f, + 0x000a095842f718e71645b2e81c90b3f0857c8c935b135b0cb25df1541d38c7ff, + 0x303f2ba04eedf1425b5d7cc4be2c5088b9d2ef2bf478b9e9b8ce6ff1668909bd, + 0x1494435142c96fc94e8d66d9b643e019163c6ac2e4e162056fa8feee51956667, + 0x031cdbb9ad28ec57c4e1ac8ff66c791d04b25a28abcadae83a5573e3f3d4bfea + ) + + mstore(0x140, 0x18711057869189126f88536accea4882a34797a9dd96a94cc87b8ea462417655) + + mstore(0x160, 0x0e9c4735ee797b9c70833a7a6be7c2cfcb962f070caaa649466fdf9bbe5828cd) + + mstore(0x180, 0x2e2e38ccea7ef6c29a922b027d31d9870ac0f9d27de19d70039bbd1f90ff74fc) + + pRound( + 0x0852309d50f14538c8b7d35658d89ba30e29aab6626531aaa1185ff0cab8a1ff, + 0x257395e7c190b3cdce5f934dbea907705008a30593c69293fd7105622602604a, + 0x0aae37af5c3a542202935f590b667f979fb414273cc87931610a4b3144aebfb7, + 0x1c1654a77feafcd7feeba94c32605f95ded03e13c08a6274c47edb41134e2444, + 0x1480cc4cb3b9d9fc97b99e340fec19823dcd2edf198f7095ee5c70a9200995e0 + ) + + mstore(0x140, 0x002e1a3f669dfc929b9cc84d96d489ece114d5be5db8571469f774cf6f6c8022) + + mstore(0x160, 0x1214ca424ea151785150d7db57b93cc6bbc8d75d1929938460a7c67f0c791f11) + + mstore(0x180, 0x2e174dd4aafff6103164d9165ff8319d9260c86218510a4d910341f0b4e01d38) + + pRound( + 0x1d66369e95c2e76030e380d6538a93278f91ea5dd60e5a316b3dced27fc137a3, + 0x29ef9102b5e671edc05f87bcceb6d900484e7ee7402a32ccc77fde2e7866a083, + 0x2103b04c1735f7511eb775c7334a0bb6d626fb60937ba3761dad73a84478e3dd, + 0x0dd1b6ba84a3c29b62923765068cf63c711bc1d6bb28eefe38a0e4861ad13963, + 0x1eab4c7faabec58ab9b73b2baaf21e42880b77b0f0dfd30d38e1c955e9dd721b + ) + + mstore(0x140, 0x13e21dbbfd7e5526bdc5075e73dee0aef45a0ed2c880b29b7dbd5c9e6439ee3f) + + mstore(0x160, 0x2c2486d85aadbc358b1065dd7b14957e8cf5bf7451afcb394659741cf6be5821) + + mstore(0x180, 0x2c97a5d5b9751943bc11e04c2d60a56c43d945b96b0982c8a3f5e63b73550d6b) + + pRound( + 0x20b32f4a423617fef146da5f1a2695fcff6497ffaba30decf6ffe62ae952c435, + 0x29f4dd468db0873491468b7009dbafc79951f3b83ab64efb8dd2e56cc9b31a8e, + 0x2519801de4e58e4164f7f0d86994311c87f279a38afc4cb3c4d26cf41c642af0, + 0x2ca123faf875de4eaad80eba73cb2a00f22eaf5b6109ef41a65d2d286f602cc1, + 0x0efed651a61fa30b70937bde9d02b9b6a302a1aab706687b2233ae9b20331267 + ) + + mstore(0x140, 0x11020d0581ff8e79c8f5aa4d50be2dc792a038bcb61aec4ccea2ec4df2d0af4c) + + mstore(0x160, 0x1e0e921193e35b3c42ded003dcbbed8eae46712e15e63aec715f3f7031cf4f8f) + + mstore(0x180, 0x2a6c13d7afd6636c2d4d5d36f42c09ac3286b67703ac4d2c24dcf5a3add9020d) + + pRound( + 0x0d3876b0553694380adc086cc9272e1770e2f86b336ff78040419e5edccd8cf5, + 0x12365c7cdd616d258f9ae3504b37d44e958c816a0bba374278e8b7ad79ab9679, + 0x1b60354d16b01843540b8fc6961ff84a58ebe5e42b46d22aeb618e2db4ade65f, + 0x03778fc723ccd03ad8c90c311c141963dea639d2524ad972d8496d129e1c2434, + 0x2ee721dde852879e1238cb7a79207147b3d864e6c8a14a327e2e558b9df57662 + ) + + mstore(0x140, 0x1625df035eaa992f424ddc6dc88c1b700ac5e6d5981e2ad0df9b290a56bd5001) + + mstore(0x160, 0x1ac7d1f33bb598fe9581ac73b0aad4e9ace99ead01981fcf2c502a71afd56762) + + mstore(0x180, 0x2d37296ef0cd5676d0809608ba340cd7b202e2e1c2546d989417d303ec319337) + + pRound( + 0x27bddedea7d8d398b4b6e9152e17c2d092217609b109c14574f932bb02c88440, + 0x2e13f9cbc356728e6d2b7a5c593aa9ecc9b900bb98901593d021d61eba6555a3, + 0x109af33773e416156885bab0513dc199a0045d405d81bd2a151690bdafba3b66, + 0x0bf7a121a985d20eebebf624f3837307415ae480954bf49552dd8c5f3e50301a, + 0x0f78ba7c3e6d15d11292dd121aad459483271b5fe2ee56a63814d5db19290567 + ) + + mstore(0x140, 0x0ea3a1e1f5dca3ff7d8671f2fecfb467f6a4e6516c8038a9306b36dc818321b2) + + mstore(0x160, 0x1ed08c4f0e16d144059100f05fb463098e3d869f342e0ef8b4a47afe74a83a25) + + mstore(0x180, 0x0adf612bc0c24e826135c7de0dba90fbe1bd249f7424f1970b52e8bb24d986ed) + + pRound( + 0x019caa62c5238e03ecdf75bb2c276be1805be3fe44a957d8aa3bf07cacf1c114, + 0x0f32dea104320ce0f00919d90f9c6c76d496882791146c522a8acaceae3e4a48, + 0x2ce5d2452c0a5a9fb65a4a6482f34998865be9a29f266f88a8affa850f5ec6e5, + 0x135d590de80a0e717da7325c781aa167a25e5c310d92df83120e891cced24a8b, + 0x1d3ce96a7cd79e94492e32b8983d62fac736499850722f7fe7dd1589706ab693 + ) + + mstore(0x140, 0x06c2ad47bf4de574cacfba515d18ddaf782a8addfad1c18ee4391163c541a62c) + + mstore(0x160, 0x214366673d387148578fef89434bcfc7e0ce4eb08661904026b30ba10f3a1341) + + mstore(0x180, 0x1db81d98b4d4d83226ae4131301c8e3622a32e2b7884860e85257f5f7b7e6de4) + + pRound( + 0x240c424a024e59bea3a14fca73d7b63869eb9b68746ad9c356b93fb6eaa3e22b, + 0x24dfab7238b05bf08f66fbe599763f63d5c70a181a7e9fe35daf0479e2b1cbd4, + 0x160d79a03959c968dafb76ea3e08ffd2ce117d094e820d5e9f7ce1debd3bb08c, + 0x1b65216187a1ca1679642d4c40aa05bff725bfa50248aa89d57f570c2fe9345a, + 0x243503bad8adaf14a8e565013863c13a77f6f7a0fff571c1275b18f54bd77351 + ) + + mstore(0x140, 0x2a17fd8041ecd762f528d12067a09204f9296ea57374806c39896fe9499b98cf) + + mstore(0x160, 0x1904e2bf9c0512c72559e71e3f132f65259058f7d68b9d7d6da1a8f9f5caf674) + + mstore(0x180, 0x115b5eb99233a8a2200170733c4743b804c601b5d8d4656a138212d66eb89d38) + + pRound( + 0x29d2bdbc19896e8faf0ce15d7c883bcbfaa38861d7c92299a6bef42f7c443f0f, + 0x19295f72c5907e8d9f8d8cdecf7d193fa86404cbb7a85522f7fc33857b7a9c88, + 0x0bf015760770cbe8e6f69080f3aca18258f2cd092e33d3ed62d8d19d144baca8, + 0x06cb21aac0be8dc2528c3974724b38d73a918530976ff118d08764cd42e0b240, + 0x1276fe2c751ba49fd5b75cab5b71f64aa0588ede807db1bd583c3d6ae6941356 + ) + + mstore(0x140, 0x21eaced08f9d0b42c6fa51f59d65f96598e9ca50d6cd1dd49b84fdc0646ed68f) + + mstore(0x160, 0x06815b7a3b80971d05fde6d7dc5cd2823363f38d0af5c0ff8abeaa71a323a2a7) + + mstore(0x180, 0x06a778d29aabebb5a3cd940b1c33f05551217b6005248e0e716bd5a10d558c6f) + + pRound( + 0x006b58885f0e09be6ba91176fc8a6172bc16d680f888a3d92f31a3bf213e7ef8, + 0x13c6704e90535352934dcdc0483b4bb974d50beb7a5b6be30af0e46fbd7325ce, + 0x0fbbcb96ccaf43c773ba1ce70613892543732feccc872975b8eb73e3fb4d54a5, + 0x059b4df63dbd2bb66e0b2a826c5cbda96c338fcc38dbf9e9c46041918bdd8bfc, + 0x27d859e7868c99d80f99d181e6ef7ea93a694623a89bbe57a6c8e7ee54be21fe + ) + + mstore(0x140, 0x043b10c508e8681843eddc05e73b95b7f54da5a93b701cba4d6822f9c9dcf436) + + mstore(0x160, 0x126734e9502ba9fae4a314b67ade6ce8890e304a430e6c9f4fd60cb8ad69950d) + + mstore(0x180, 0x26edd35db97c2ab2ce27b503592859b4317a25a688f9743ef0dd9cc2619db7e7) + + pRound( + 0x14fe9fb1f167c6257ea010088115769e62b60ef3add0f3a22c9fe7a4918e94c7, + 0x090305dff314174e27edebe574bd8f0c8fd85843e7d2627db607b2816e357dc1, + 0x2ce23dfbeb8e1874b9ba894cb85f068bfb0497555cfd3dfaf3888aa492d20445, + 0x1b0fd94dd9cfe774d9146be584ed0b25cb2c7495a708247f5763c2380e5c1cd5, + 0x060bb716ba723a4e5f5faa179363a36774619d1e0cd91bf4789a1aadb3e612aa + ) + + mstore(0x140, 0x063ab4a078fcb212275ff5fd06042bdbd17aceae994e2c27a1ba876139f8ec1a) + + mstore(0x160, 0x06372d5952bb69a460bf1333ef4ac6b20b07ad4ab4124dd4066a6cf66f406993) + + mstore(0x180, 0x0f41d4e3ef55da71cf4037c49d44c0a641f52a5a174f7abec522476e3c623ce0) + + pRound( + 0x27b225e4a981af36cea863f591c8bc5aa95a4beb6d5c9abc5e03ba906ed72062, + 0x1102728832f751c313ac6610fae58b9cbd511b51d6121b3bfa60f47db12518da, + 0x18276cb011bdc6d75eb1c7d5d06cce10c7c9079c8c9920fa389b116620ee4141, + 0x2502d7dece8cd7d7a04a1730bfd2868fc64f835dfe143cee18480c7c3fcada76, + 0x06b20beaa575dd846254695068484611bbee1ae48285ba2c3d99c14e62581a2c + ) + + mstore(0x140, 0x0fc2e5cff7e9efd46fee62aa3b3f22bcc9f1a3bd8917e2e1cf5aa334d29d2a06) + + mstore(0x160, 0x274fa4e3d86e7ef8b0fdf1a81acce8f9ed2f2eb4627de75781a813f106a377e7) + + mstore(0x180, 0x193af1c5fa057ce682ec728cea90735935a22b5aff46ea2f803a29421aa950d6) + + pRound( + 0x0f0ee9841b21b9b223c1d1a906993bd66b0ebcb7dafbe2b802bb8165c6011773, + 0x01df2eb2fa423f01396e073390104cad8004a6a5f140a2b18ed658068167521a, + 0x1ce05bc55407c883a5a41792ef3486ff22e403d38474cfa90f5ed30c8d30198c, + 0x037f1fc7934bbd5fdc34388bfbd0f95467254e5df2b5b62caed0500a2594ddad, + 0x1bd6a614004398f329b7080ffe69d3dff6de06c819fedea24aed16e4c47164e7 + ) + + mstore(0x140, 0x2e29f517dd1b30b791bfab03ce747f950202f0eb8267ef3f71ccec40e91d95e6) + + mstore(0x160, 0x13281c94a670fe5ab09773af42606740503509efd74c1ed993bc6afaf3d64174) + + mstore(0x180, 0x21a211407cef7b0442160acc9dbfce1a1e1d58c9e98f381a7eb48f7bda0f1e05) + + pRound( + 0x0e72c33ed6055471adad61d027c5ac1bf75444fc4e14988b42268f0787e29875, + 0x1c75804a4ef1c81c83684d688c4429ab1a7e517dfc602c9a2443c59f32ee9614, + 0x08803f69d83e0c3397e09dd47a80cf9f4e423437008cabad2e50110456c8c60d, + 0x2d1214ed17bf81162a5dd43a3fdcf195fbf47426044cb22db538478e942b07e6, + 0x0c85b24b79ab57504422135fb1cb0c5e1e3a5f0a06103c2486ee6a3eefac7288 + ) + + mstore(0x140, 0x1b721ec1c1df81c83acd7a95ace16b3e2ff4297aabb6f58100b5dab06d3dc404) + + mstore(0x160, 0x27ec9e9e923edee58189d6c7f303ee3e5249c5aef78758c7f511cf87b953561f) + + mstore(0x180, 0x1ecf1060366dea9506fda0d01cba016db9620090a160d5a760a75d12d5d72e78) + + pRound( + 0x085ef1e77f929bcffad1a93f920c1d8c8b3632e1e1a1ccd4ecb01602759e087e, + 0x2b6f796de3509ea703c8da6276e3ea154b504170c59a8ec4581e9757d74ba759, + 0x1fda5074fa5bae5e16fb4f2d18d589a7230b9a1c1e4d08a8069fc8d45b1de3cd, + 0x02d22a3c0d324750d3be31219af32a8282c372dfde4861ef86ef15c3155dcf14, + 0x0c21f4f4bdae07a79bb3a98cfb351aa629f3239c4d24aef92ea79bfac9c2fa25 + ) + + mstore(0x140, 0x01e8ec57b7681d631a02d530c9aeef93775869ef093de92014cdf85ee2d459da) + + mstore(0x160, 0x00f739dcb9f3ee6e7b5519774b540b2898bb6cba3629bb6c60e423b7eb6b5ffc) + + mstore(0x180, 0x0e016f0724fff85d781aeb1548d76c566e5c26aa7996edf504e4167285fda66e) + + pRound( + 0x25d432df312e005c69a06a1f004ec899575034da26392760d17acc80c39506cd, + 0x17a0ea51f9a201ba2a0f857c9969a7f6bc6f5d5bc0e4957e1c0dfe4b202e4a24, + 0x02d34c47b847d67c9b4dc313bc714ff223ab01127806ff6c922d8763f142024b, + 0x020e59e5e5bb0951a660122fc1aefea294e7ccd5f9c79839282ebd9e119f96ca, + 0x249c9c850173dba0ffea3568c28416020121c3d9990dfe2e917377467759267b + ) + + mstore(0x140, 0x29f79c86f5a9c96fcaf2296be36425b72afaad4865cb9090848249158e2ea4b1) + + mstore(0x160, 0x0519426a15a599f20d2979302067dbd1454b46539c9499c65f6195b55c760337) + + mstore(0x180, 0x0f9c475cd72b7e2e3865e96baef89a149eacd3ab340210a9c5e0de6fc082e89d) + + pRound( + 0x275270828b9ddc964bb8d68a6258543568c844947ed5ed94b3180cb874c68325, + 0x00f1ca3fc28aacb8ac21a5b44bbeb0ae64cc339de13e04c74fce820f4f93e48d, + 0x216b2f89c90105f570e0911bd1ce20e0664ffe01811cb777f90376719c0e20f3, + 0x1a91edf90950cb2689d2c29cb22f8dea61ec41fb061f1b6002f72265694c784e, + 0x2da3342eaf39a2b242713484462971afe53df55bed5f5d50d67d9138cd78fe84 + ) + + mstore(0x140, 0x28485f438eec133b0be36b32fae82da57fb4006bd7f5bb15a267e7746b37bad1) + + mstore(0x160, 0x2780436f9da12461fbe31d979656e6d1a13386e0e6a5309b050ca819e10ad945) + + mstore(0x180, 0x271ea863673332df2bf2471e6c8935b037ea8318ea5b32379583f611e06b3da6) + + pRound( + 0x15f1d711979dfe13e45eeb9759a89f51db3d27594985890b88c9bf276922173a, + 0x1f083ac0549a1ab00d4bc9066f05494148f60c9569e7989941c3f50fd6acf760, + 0x1505ee4f79bc8187856d5f3f5a24de97aa082b8d452c63b17ac3a591451b747e, + 0x0f20876d712f147e2fb9f7be6a51f346ea28447df529eb41342948fc2d8f096b, + 0x1696d12d9ae779c92120ee715f6b8da11ea93af2673715a2df7731db91e360dc + ) + + mstore(0x140, 0x2873b19db1d03896d3d52d6f9361e3fdade5e7b2e6833e4d5ce4661186bbbb9f) + + mstore(0x160, 0x0b04d090bcc4cfabfa47f60043859aeb5f33a6de205dfdf0e3d099d4a8394e08) + + mstore(0x180, 0x0508a195c0ca583ec10156f205ca1bb6f6917318b8ed6ebb7347b77d72dcf748) + + pRound( + 0x29f1ba4b29c1daecb9839bdc08431bcabe68391ca540f68b484a4f8e96a9dc61, + 0x294f4cc728dd423fdaf37377e069aba66f4d3000f1a559bf4c449103306031e3, + 0x146b521b1c08c9181213ebdbc2a34fc3efd87ddeb1bfc5e5d17ca951f55abd17, + 0x0dae0af973ea0b0fcdd8158ea51b9efdeed5eb664b84ef67eaa255fe4e55f3e2, + 0x2604cccc370f0a50f3f726edf1242bcc131dddf2697853276c079ebfb883d8c2 + ) + + mstore(0x140, 0x159754924e7334854ff803a1782ffc059927a3c26dc43e661e09a1261bd7c94a) + + mstore(0x160, 0x2212ca6487b845ba4d16c09e224297d4b1a16e341e6c593d7fabadada3929d7a) + + mstore(0x180, 0x2dd088de831852d169aee1d6be69b52c5dee0b73e18fca91cdcef9b90396a047) + + pRound( + 0x09262dfa80aaa0bc61c5891c237a519d3808c53fc05dce3d71f17c0e3f2a5eeb, + 0x0ce6d25b1c6c1b89fa005c23619d877f2ab2fde708d30923669a49fe25b3c7dc, + 0x2e69685b46c8050268dbc1040e23c739d7216b2c5e76108136d6895ded3ddc44, + 0x0278fb3df3fe913657bccceb553138fa7b8ab6e062a5ddeadfdddd5b305ff822, + 0x16da892ade35754e57d8f03f3e6f4110a9dc1639d9b6de65e479165ca49f7a4e + ) + + mstore(0x140, 0x0f57efc05e9f97e7f68c694ba2b3bf216eefbd5c71710a56f460682a6ba5d5ef) + + mstore(0x160, 0x1d35eb4a40a41dd77506d872a458ac93d7336dcb72f15b182a6702ca53b94eef) + + mstore(0x180, 0x18a33064586d5a702bc4bf64f70b44b5a77918255c2dffbefc537e40bd5951ff) + + pRound( + 0x24ab42ad6749a14fe2f707ec53ac3b0315deecf421b9753032533e28491db30f, + 0x2f6466e50ef3c61a0e6493b18d34911406e2e97d3551887af808d67e1ce9ae27, + 0x1f5886fb8618c8711ec08de9477571f0eb6e462b8f5e5349f85631f059594480, + 0x05ba34953959784a57c0019e916e2ade5d6a523110437cea9c2b94453dcdf2a0, + 0x27aee67a3c6ef783cb55915165a5bbfdd86bc06c776f145048bb2401dcf17341 + ) + + mstore(0x140, 0x0410a065925e90fc70ed1aaa46477a8ac8193a10c48b5d84fb5e9cf2123ae24f) + + mstore(0x160, 0x301453b23d055c184a65ad6a6acffd9f520637fe751ff7b769409d512fc92f0f) + + mstore(0x180, 0x037827104287d94bbdc06584d36d4d5e2c46c4ea224f4e0dc0c3bb541f053b79) + + pRound( + 0x0b0ae5716e42b440b7423bd899319c880a4a674550b7bd036207e006ac7a2d21, + 0x1136a0f6c004a2c57d21a00c40dec6f027b140b36d3594c1cdc1b0e8707b62f1, + 0x21cec52ac4b2aa7f80f98eb75b4e0280591977d50b677b8ff10b0a3d028532ac, + 0x284a636786fa63579b1541746901d48e440cf0c586f1b089cc45e8b830fad22e, + 0x1d4a0aba0cac51c3261f7c483d89628d76748b0833cba6bbfcac5243e4bcb4da + ) + + mstore(0x140, 0x1be80cab12f4bd1737796bc770f17073c6b0046c327bcbf3a36e26406c775c74) + + mstore(0x160, 0x2476e7bc637f243d23d762cb3e2cd8430dad89762576cbdd918428a75828836a) + + mstore(0x180, 0x196d707ca5a9edcc0e3103aedfc60abdd1c9e577354d930be0d5b6d03617c209) + + pRound( + 0x294641ba8a02768c5e3b7f542d281c69dc2c3f2e8032f864295a64b08a93d993, + 0x1c12f993f0f1edd809eeefae6932e5b88738b336bbe6f976f5f7a0a178ffeab0, + 0x0cb2d948d38fb8e17c60ba6c67608c9ffd912e0a627eee756b8d22af8b9e5e43, + 0x26f1ff731268d9bbd26ab33e588acec09fd5a4b70d60b553904f5e2d05e894c5, + 0x09aef8a2029f82b76d80ad8a3926cb6e1174d8b8b89c59707c123473120b4c7d + ) + + mstore(0x140, 0x127d0f7eb9804fc20ab4f8b9409834ae521645fffa86b0c221d9223fa0e9d2b2) + + mstore(0x160, 0x2441985bcace35a81b1f81fc6621215df0ba42441e450fc65e3519a0393b1196) + + mstore(0x180, 0x2df7d4eb115114544ac4f52fca36d6b33f09f639253e9e3549d5987b0e097136) + + pRound( + 0x1d262487237e8503908d5375a1a798a9b8c0faccc056eddd8aa87d0a66b07d24, + 0x2a21e03d41154bf3191f1a834b9af6b23d40bc01d027c2b4841fb23dc9ff715b, + 0x029c647822a1ae565b2bf1249edaeba0cbb3ad730deb6d2e6618fbf9e74daad9, + 0x23e1971175b8fbb26c0989dea82d8f4a3f708774c286e4ed2f8dfaedaf3db5e3, + 0x1306188b792368ebda1f2e31e846854cbb34f175e01c92457959ee1c6da0ff3d + ) + + mstore(0x140, 0x018bdf2e7078dc40af1cbe488cb562fd32120499c4c972a6d43b92ce167ddfe5) + + mstore(0x160, 0x22b36859a16a8cdc3df10af2820715891f779660a1f9a25ef652019f640bef06) + + mstore(0x180, 0x10e697dbbc43c7ae2030f5d49974f8344d5e48ab66d635b41e7b96fbc7c6289e) + + pRound( + 0x0f6c5518f92ee2e549d31adbb4e78036ef9aa3c2164c317aca92203e3b99f940, + 0x26e2cc9dea47dc6807f87cd87c531b17a7f2f5ea86ac094e5d5a22fc3433dcdc, + 0x1c71e33c864b0a8de4d10dc26f76bed55771d1601a0e04d399cb2397064c5cf8, + 0x2a2f0b563b4083766c8b6c60872c32eeff2b207a1981c05b1f396178f01207af, + 0x0c1af0bc5546250a7fddf1cbd3e7bcdbaf74ebb979535e0b343676dc9f9433ca + ) + + mstore(0x140, 0x2de3579d790ac367f66d90557b54668153a5c37d5391e92a6a5615c9d60be979) + + mstore(0x160, 0x1ba010b6d63b9538b281be3764e8e6231642c6a6735d89c9808fab7bada21f6e) + + mstore(0x180, 0x26ffdea8a8d9894ebbe02a705fb7506e12b1a7f100c5902584e4dcbe1f2119ac) + + pRound( + 0x057deb4fe56390abbbdcd8822cab5da1207a0ad79423920622b0c4a12fef3552, + 0x12b27c1639f162f846fb37ae7144f29137682ee7eb1632e791b4628aff4aac23, + 0x0b2c7c76d01843a2d14655c23e8091afb6f3559d66c3bbf3d115dc9d70db5af2, + 0x0b7d9684c0c8eca0e8c31634c9fb68b2e83abe72a3679b3678a8c9b1a13a4895, + 0x13ab0a7fea9b2c828766d2fabf574248d2d7f7b2f8e60e261cef29cd916e9a2b + ) + + mstore(0x140, 0x014f832b38a9f43af26e5ec2fabf6c4250083cf87f0ba86b95053e9182d1373e) + + mstore(0x160, 0x2548e6c4767c67691af55162d9ce0e45e89ea08a4232fa0a223fde869bfd3ea4) + + mstore(0x180, 0x023ecdaa3f942bd45ba46f528cbc81a51ce1425039f44781a7696f48d29dfbd1) + + pRound( + 0x11ff1619a49d6abbb56390e3dbaaf0c1cb01b951a734218b3cbda4e8052ccba2, + 0x260c36b80890befae89cbb3478b9f7b5b3f6b11ded47aae2c0d5e0c48d8e5174, + 0x05ca88857cb0dd5f380e592aa37f6f94f7f0c3262131cef29948a1a49fd184fb, + 0x18b3832a19eb7ee1a9dcf574302ee063ec19046b3b9eb7fb277a48ee8390e485, + 0x2535291f03dad1e3c540e7f26201c2e330188fda58be783067698a1739f79369 + ) + + mstore(0x140, 0x2fa88eda065714b9ae5e18456130e31bd6f48d02b2415ec61ed209ad8ddc3164) + + mstore(0x160, 0x01749863aeab13ca512261103eab93b43fac53df6b04022c7cb7f17638f51c29) + + mstore(0x180, 0x01553263a318edf34429d901f3879932b72f5c32ad56e900abf47672f86f9a62) + + pRound( + 0x1611bb59a3b28756b840db3189a3a5ea22ec16845472abd68570ac771c8f15ee, + 0x0bf7618845013330ff465f12ca95079ab72d0ca9d8a7e633048c11bf2c46c7ad, + 0x15c88fa2eba3d087fd29f6de6fd864b875662ffa438144352d684717cdcd3ccd, + 0x0d58d12798ab552f96f0d951e97cbeef887d858656b1f6af4010c80091b0c662, + 0x0406eecd7bbc21eb04fa1e565745cc65445e4f82f4a241efb8bab06eaf9c7cbc + ) + + mstore(0x140, 0x18e45fe7ea171fb11d0c4af5338568990f22147e14421f336fe6e0bcbb8a0014) + + mstore(0x160, 0x27393404521a55e0e1a4e58c561180040c18682814882f45aadd131b9f08753d) + + mstore(0x180, 0x07ff6857011a24b20d698ad43a5f959acefff729940e346ab18f9d2600f83d05) + + pRound( + 0x028b7a8be47c2239079a01dd6d0e57ddc03fca9c6a58d3df6f234dfe82f96aca, + 0x2c489bef0fac19bb187e5f8a064e67636f34b289c2e8adc76ecbdbb5105fc1c9, + 0x1ff548c6690f5227d576668fef6741f999c9914cf4842e793fd5b5194bd0c3dd, + 0x03c1b551c84903040faf3d6db934e83dafc5f0efdeb7a8feb27547724727a344, + 0x1ee3620e8f0dda8c6f155ce81a9376009bcef2c8d8f6f266e04b7b80ac8cf867 + ) + + mstore(0x140, 0x1c4994a2d41258064376be5cf3c99887aab74803f67c12c64e65aaf7f1ef56b2) + + mstore(0x160, 0x0413c2b38733961feda0a68493d3cf44febcd77952b8806ff583e8c40b31032e) + + mstore(0x180, 0x01c46ad39455255525b267b8a0533c5c66504f81ae9534bdd091ea98994997f1) + + pRound( + 0x2981b3a288b4327839542c5796ce2f09af9d022a604ffad61fe0077d76748bfe, + 0x00dd5b0b8158e8a73995efd0b9d898d4fd3587011fa586cfe02ce800f3064033, + 0x084c05fae73cbd6432e622cf9880f0d28337c6874b87b88ec0b45a55d393623d, + 0x1e2ee2fee9b9bf8d3f3722e7028ff3af8e5ec6319fa6d8997dc115e5de2ea8b1, + 0x0003418fc5909b62b0296e6eb42aa07a971050939e99ee371f6412e44e0ef577 + ) + + mstore(0x140, 0x1afa5a8c5fce396de56ec97dcf0317a6b7cbc3ee1f8e9a3bccd6d870022b750c) + + mstore(0x160, 0x1135efd63e8f8cc9cc0661dd49d36ac8ebf7900d90d66dd5fa816054d4017dca) + + mstore(0x180, 0x2914d21c2d2845ce2b14e951f42103599c8755015641db03c54df337103440ad) + + pRound( + 0x232fa2c090ff3ddea83adca0b9cd0e0918c9458b75b0ba3b7d677add820be289, + 0x1cd5701c80a10f420eb34f534738c0dccfccb6c87ccf9aece35abab37cf05fba, + 0x03b981fe0c71882c6194465537d5e402b816118aae94bf8518eb07a529e4ea54, + 0x168a588900100006443658a61ca9d659f0ac451d1e0bfd5a6c6a3aee85723bea, + 0x1e51f558bced240c65b7cebcdcbbdb7a9ab06e3580d46f318de84edc795e6f88 + ) + + mstore(0x140, 0x1202fce1a501b88b455ca44788d55214baeb3b54e37d1cc80f3d6ec0e09d4747) + + mstore(0x160, 0x222948377ee9d27fc6406007e1727b566b825decb95096c9aedfa8e6453a5cbc) + + mstore(0x180, 0x2ec66fc27d82aab2c98eb50e67a0932210f3c6e12456269d57ea9095f41166eb) + + pRound( + 0x20c87a2d759749aea9b2f0f8cc01452452e711e39eaf5a8b07100a197127eff6, + 0x0db07920dd779c19fc1ea8ec5323d5af0d511b869db67dee0408785ed922905d, + 0x0d631f18fadaccbfdd3b3be46772a3bcee276378cd2e46baba90d56468cc50b6, + 0x2c500f790d463fb136f2d8d4cade62296e7d7c49bce18395b3014c9fc72d005a, + 0x176a9eba97635d1e59b19faa2b3325a5b1a27376a16dec7317aae4afee02bfb4 + ) + + mstore(0x140, 0x1d46d91669ce5be6554fc3ecee895d41fdaeee189adee381abfb75ede1488cfa) + + mstore(0x160, 0x1841e03b9fc527450e4470aa8f0888d9ec8599db6b0f7222dca26cd43d22bb05) + + mstore(0x180, 0x2d2ead7b2078b09085805c2777c90f6c55744b49a73bbef04c899313bafa0f57) + + pRound( + 0x2f5c233dbe3571836fdac0915ce6596fc0844fec3d0bf5a9b968ca58c45846a3, + 0x13889bb59b9c07953b52f66123c8c1380e6f272426103adcefdef4dbd2865da2, + 0x1cf78f25faa52c747312d09fb4e9abb4f1e55a3da349cc8dcc6dca81cf99ac3a, + 0x2c0eae2866d65c97077047d0f4c43c28c8d7f36af6a9c6fe07ec89219f1cc735, + 0x28b816cd8b8c98163380066d0a50d8b0e06ff1c690b81b918c7ddd08a6b7066a + ) + + mstore(0x140, 0x0a14ae497b49785ae7771f0dfef4bf41857bb2fd1f27d15c3cbc8ce3df9895cd) + + mstore(0x160, 0x16bfa02f57735662eac1c1f520b4b3f9c4bd26cd2792177b276068916954cd41) + + mstore(0x180, 0x0f6fa95e0117b734579f68dc59736c7f9afd9cdd4a90e13629eeabfd84525e9b) + + pRound( + 0x01830a8db342676cf7492281b4cfc7b138c55d44daae47b14fc888e5bf745095, + 0x074e4ce32bd14b01fe9f6729de2a12f218fe443fb708738a860f1910bdfa4678, + 0x1fad4cb140fa4d559cf9525fb24e7f17494d239af679a030e7d1b7c9cffa949d, + 0x1e50c6526c7324b97b7f338752bd700ca5bd6c0efcb225260224556d76a28331, + 0x02cf0359b8da1abffffd73f90758645793f5d1112fe898e8af0c61e79e673e5b + ) + + mstore(0x140, 0x2d78036ba0948752ae78b1138b4b9c4b67f0d78a9c8965e1bbbfa356158532bf) + + mstore(0x160, 0x0c1ff404599af823908f32e607564f521b75812c670543e390cb02e3087ce924) + + mstore(0x180, 0x0a561b578f4be4c533151da1a529bc98f4940aa5b48f8c012a9c181d811b8f34) + + pRound( + 0x1d59cafe27bdfd78f564894300763436daf93f863c3213c1a849d1c3169ba771, + 0x289e39d6a2d4bc817ab104443b89b8a608b13bbb93b3ade772a63bee300bbc3a, + 0x0d47edafd6a8d4651c27f6bee48e9756f5d6515af1a3a3512f59e9e3ebdcc331, + 0x198d6aa9072a06de13128d7b17157f85994a10c4957262770cc4f59e6c6d332f, + 0x174b80e4210f9d81be7bf70e3ab0b21de8065f7222e80cbbd3cf985d6aab0f05 + ) + + mstore(0x140, 0x07df25e8f76f32d99b99dd04d927c1b2fa1903776636e38f7188d8c2b73c3a54) + + mstore(0x160, 0x059421ced9bb92262f97e7c7beb8135539dd66bcd6f0bd41bd124a929823f75c) + + mstore(0x180, 0x26e1cdacde91e112796df70dd3a479b595b8cfe7c4c95b5956ed477a07813842) + + pRound( + 0x2012a6ed245e48cf65030289a1cd01d26d3eb2e439bbc4f16f256adceb40bdec, + 0x0824422abb64b758f600c18e6b998c19d82a9ffacb95f9eff9e018d5afb30baf, + 0x250a091bc91301bb1393782a7e21eea81c0bc8e68161a3a4e5e4a8a7e30964ad, + 0x1a4adbc8530eace4e19696d77a06e1eedeba3dec2e44accd3acfd7fae6d076b3, + 0x25a511f7b8595b12278f2b05b4ed6684ee12b1d298fce27ccd6787b5a86e26bb + ) + + mstore(0x140, 0x2bea340a223b6665f5be6dde2eb55b40a05aae26d349a6c4af07e3458ab9be5d) + + mstore(0x160, 0x1b90f5c0e53409f8b573056438bd9e6395f5256fabb16006c009bcade1eecda7) + + mstore(0x180, 0x01932c3f3e1c4481420c603e23f16029d8b97603565f6314184776d865ba2e7e) + + pRound( + 0x298083deae9e0cc40a9b60e494e44e6efe93a8e0fe21181cb1351d97fc0d954b, + 0x0f01fc7bf4d2f1ec8cb1af8ff17715316fc44387d515185f49a2443ad2a14ede, + 0x186049573b3286b17003f9e5b27b8a36a78b8f32efbf0510d9fcc8fa7e73c5f0, + 0x07335829d8e3758cbbfc4cc49b655ec758086676b4d3912da39f2ccdc4a28d14, + 0x019d072d6e66aa6e034843cc3d7ca51c47df51f35dbbf4a99d34293fc3d59624 + ) + + mstore(0x140, 0x0095371673ed3ee55892e373d5ad5c760268c83df7f50d44d29d366e1d7a9373) + + mstore(0x160, 0x051c57cc37343989744272869cdc94c0660bfcf6ea1c1c7ae51427fb298c9db4) + + mstore(0x180, 0x1c8bd96ca390714a2b0079ec38e25af0fe7a69fce1620f376f770e1325aa65df) + + pRound( + 0x12e4e9f31be336777527af3ad443884e353552da362921074e023f14580b5e73, + 0x25e7a09a55698b0c7323472b2409654ef12f2959a7656c0dcf35ad9a7926f3f1, + 0x178c9238fb91fe512f6885e512e2a59b7686a34aed0fde1ddece6b1d08d422d4, + 0x2b568832e6262628c31e405305f88402948b515d28861f0dfaef24921e7e352c, + 0x146ca0dbfb0fbb98c162eb84b37228cfd7311e0d15d2e48def85f9d207bd175b + ) + + mstore(0x140, 0x0027df27e1618278ed22497590175692d262d4aafddfe34bf8db619c37a66068) + + mstore(0x160, 0x036ab8de1d7df77301d16cb576a1346fd196d25534b22667f50628769ae136ec) + + mstore(0x180, 0x049ab0f37ec5bcc724a3ea321a91951f90cc00afdad5ba3d5081706df5e75e6c) + + pRound( + 0x1712f67e82f90446550d51c1d2e4ebb1475d6e6043a5c46eda3170839785072a, + 0x1c3363715dfea957de9614b6cdea17066c385a8864dad5b43aff09c963573925, + 0x2672b8adef74adb0b71c0166de766a39e5e1cae03719aed0fccfb7ff432fe916, + 0x10635771a37850c2417c96b7f5fa48a98734ffa59038d8b7136cb5d0c646e1aa, + 0x0b16fd5ba97f28f5619f6989cf0d665e908cfe8a1fc24e5326461973d09bf0e7 + ) + + mstore(0x140, 0x176f60be5a21b98d3469e1339bd5c7a0a8ee84a0d34339bef675d064e6e0a466) + + mstore(0x160, 0x0329d048658d0eefed7f3aaa9bc143b0c26636f13262176d650a1a7a2044d34b) + + mstore(0x180, 0x0fef28f114d6420d1a288f960fd9dd40bd4a5a02d58081621711ddd2887c757b) + + pRound( + 0x112fe3f664849af9f494ccf3ccf0d4b8f1e4a600c29631d059bc6ec343450c49, + 0x232b3e1d4715272d5f18a036c137f0c6fa56878c9aa054cc33064e2a5d30f567, + 0x056c91dceace41ab131a1c59ce4a320857224a09657ed82f7141e7619a5db545, + 0x144cd983cfa259516382148e290dab14ba9b5d8e6e76b84ddae2ab086e7a7952, + 0x1d21aad5c6b407e6eee7d0b55aa92ce0a32a39e918bb32bc8d45c28094a634af + ) + + mstore(0x140, 0x1fc144aa275cad950ee4e3182bb87783dc45906b2e846e2703228e5d5328c1fb) + + mstore(0x160, 0x07858a3e15adfc14141090d972cdda3461908dbfd1c91b7e9b991760c1d47749) + + mstore(0x180, 0x19284489d7b53ed2549c5fc66331c71b9b31446eb3668c65d85ad094727d45e0) + + pRound( + 0x08818813ba3e9a9329254e78e00a83b360c905c7202459cfad0ab47658276a81, + 0x020a128b7112994e52c4849bba8d1217f13a957bb4d0ba6a0d97cf1914b65b07, + 0x0980db3c7d2c8866e9ca0902c3b8e0a078585951ea4acbac245b61cf55a703af, + 0x14f2bd6dc317fe19126b583da18e2d7175cfa704c5267b848a2ff9a12bb188c4, + 0x11226fe9d81faa6c6a35d3a12230d63245061f2045361e757aa0c5ba7c5b3152 + ) + + mstore(0x140, 0x22a667b65908699a22edc1697324bd37ffb0f18f00c0ba7292ec8e05470fbd76) + + mstore(0x160, 0x200d4863b2f35a853b7d5dcdc22bcffd8f45b60bd036c2f94907d873e5d95ca2) + + mstore(0x180, 0x18bdccaca11c8a10a12be6f7cc96d4557dd9cdbecd5f841e87303e3a312e9e23) + + fRound( + 0x0587702c19b9737857f99cfd021f8fc6af71b428e3ae90f9f5d2ec8e7140f5d8, + 0x30602b296ce2450d72b00ee8cece9f896842ff3470b98e1cba2a1b3ad87539eb, + 0x2776dbec079a5034700cd9c6e21404eabf7c13fa17d065a2d69d2987a718e78e, + 0x28bdd009549a97fd0c29e9c30f7af9555d864aee05ad1886fb918d371ad29e90, + 0x29791a2e17dc204afe645306f584ad767f2be949aa6d061f886f21d0401aad14 + ) + + mstore(0x140, 0x01790e7a8c59ebbdce18ea7b9be261b8848a8f5c69b3cd7a7b63a1b1e6d4c926) + + mstore(0x160, 0x09ce10751c2b7b90bce0d62e8fcb29fd3c8a0d286e93411fc66588a70a14a4fe) + + mstore(0x180, 0x203ec579417ebd5f056e1346a8c5be34cda66c9901fbb0bc27b8d773de7f665f) + + fRound( + 0x126ff502714b58c3a40ffa3d96df0de4e8aff3543975235bf3510c7ab22d897c, + 0x0570fa4d1c92cf2917036fb2d477727e55b569b4a58891a07f96c500c28bbce2, + 0x08c84000db8f725655f47432db3a4dde514dcf49b40fc4d301a17ce5d7228feb, + 0x07212da8afb35376a4b9f93c20f7419ec704b22c898b20ebbf3ac9f1bf513038, + 0x28c6bd8667a7e5336ebb7e53c724990fc8af6a059390353bee16d8c8dba971e0 + ) + + mstore(0x140, 0x26cd8ce2ace79114e2ee96fc1ca3801d012345c68750009745735edfc4e29d71) + + mstore(0x160, 0x1dd921013e6519e29b9aa0f52cc8c02fff3ad7af6a187ef0e90635008406dd02) + + mstore(0x180, 0x10358e1cb8ac12e54988a64bee4f1e94921f030a6926a00d57236283ea0c0ac2) + + fRound( + 0x2297981100bfd0bdbc495572aae5ed5676ecf2b693e33913b8fcffe65f57f4cf, + 0x00e3fff36bb554a017f94e88130957a975d343d15c0772a67ce88bb1736db3e5, + 0x22214f9dc31c1766784846260971d051aeee92226b6f13e2c4678689ee1304ba, + 0x1eeccaaca23a1446309ca4c3d9b7d07962dbf8bcd8b3b37218f4199281263327, + 0x1bd52cf0abbd32e888d402aac0a358309bc83eb74256efa17edc1abad196bf63 + ) + + { + let state0 := addmod(mload(0x0), 0x1ca1168b167aa5298bff96d82356b7387ebd1d70431c30b1c0c0df81fc0408c3, F) + let state1 := addmod(mload(0x20), 0x08d1ab2692d291aaef2e50985c869485061578a2dfc37997222c81ef301fa942, F) + let state2 := addmod(mload(0x80), 0x2d59780dd0a00a869516c6a0b300ed06f6fc39e0f9ead60507cb24c14444899c, F) + let state3 := addmod(mload(0xa0), 0x19b30f06355690afa779693f7f99c4a470f8ab8abd6989993d489a9b17180cb2, F) + let state4 := addmod(mload(0xc0), 0x1b93c9367d56b207bb1a2f171b56208c6aa1279be2572c1a59e65345d873768d, F) + mstore(0x140, addmod(mload(0xe0), 0x2f8b45e1e079448ade818bcb785b0c8bcaeef004d956142347a08467e1961809, F)) + mstore(0x160, addmod(mload(0x100), 0x239af691b7d6edf2761f88deeaec665169de99399cef819dcc37b4609b6cb4e0, F)) + mstore(0x180, addmod(mload(0x120), 0x1260bd299d9e99321561090559b3f90afed3a36f36c4d397072de293d34cf8b3, F)) + + p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x140) + p := mulmod(p, p, F) + mstore(0x140, mulmod(mulmod(p, p, F), mload(0x140), F)) + p := mload(0x160) + p := mulmod(p, p, F) + mstore(0x160, mulmod(mulmod(p, p, F), mload(0x160), F)) + p := mload(0x180) + p := mulmod(p, p, F) + mstore(0x180, mulmod(mulmod(p, p, F), mload(0x180), F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore(0x0, addmod(addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x140), M50, F), F), mulmod(mload(0x160), M60, F), F), mulmod(mload(0x180), M70, F), F), p, F)) + return(0, 0x20) + } + } + } +} diff --git a/contracts/PoseidonT9.sol b/contracts/PoseidonT9.sol new file mode 100644 index 0000000..edfe65e --- /dev/null +++ b/contracts/PoseidonT9.sol @@ -0,0 +1,1741 @@ +/// SPDX-License-Identifier: MIT +pragma solidity >=0.7.0; + +library PoseidonT9 { + uint constant F = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + + uint constant M00 = 0x0190f922d97c8a7dcf0a142a3be27749d1c64bc22f1c556aaa24925d158cac56; + uint constant M01 = 0x0607cd8ff9b889773c9eb68b8a4366469d470cd7c6004106caae95c10c424419; + uint constant M02 = 0x1da524cff60b64856dc1f5dde0ff62da7b182da26908f6ba6e590adebf91b40c; + uint constant M03 = 0x22f33eaee3c481e65801b761a72832908f066fe21dab5fa5ec1d4c6e99dd6dfc; + uint constant M04 = 0x075f84e9c719bb8de8e61083290daff19aaa4337454e5ba804257787470f2f54; + uint constant M05 = 0x2084be9a57e9adb80303a8dcaffd4bb77adb6815168b36a1d363b38425437135; + uint constant M06 = 0x0b303449f1bf4b92d2cbc26ab34b4215b6dd7af010747a705b2a6e3398882922; + uint constant M07 = 0x0c099bc68243537203f97254f08dfb7efc09de8f96d72f3b3e0aaded45e18b4a; + uint constant M08 = 0x1c5fd9060d4e0d999264429a5004c165570bd1675b09f977708b1ca48e616388; + uint constant M10 = 0x1f8d3a9d2d31ab32d9bdb6375170dbba89f6f8f74d16e4fd02f3675d5fe2baad; + uint constant M11 = 0x2591580b73e7b5d5f34d9fdc0cf7fe3de7f6a18a255e4376fde3eb31dfa51d79; + uint constant M12 = 0x2bb4565893b6ffc5799139cdc151158749c2c65db48672abaf24c5b3813c0e2b; + uint constant M13 = 0x1c5ce77776893d48147444b9f6d66a4da29c95707de832756c739eab8e87658f; + uint constant M14 = 0x175505391c619b75530fa83e513184381e603d8449d1e070017ee8ec0a4d25f9; + uint constant M15 = 0x06ed1d14dedf763a3065f27e7a46d7fbf20d2b4e86a0db86692a269767d577e3; + uint constant M16 = 0x140cdda33bb7a79b2baa851df5ad459e7df569b9f2c3da542d3b8d5b76b356ce; + uint constant M17 = 0x035e9ecc464cb431cc92c3356e8a98547e843ed1324c1e971179fd1ad9fd51a0; + uint constant M18 = 0x129f06c930edd36fc2fb7044a6332751a2e3bcdbe756d883716cead6bc7063cb; + uint constant M20 = 0x230c694139416f40422d713e13c056c45c3c631b346854523970eaea58a37df4; + uint constant M21 = 0x093cff12150aecb3465c4c99f044be85dcc1eba21d429132c2260dd3d12ea441; + uint constant M22 = 0x25081a00fc20ae366b1fe7ea6b09e62a51f6fd377f608368c12ba4e3bf89935f; + uint constant M23 = 0x2ab8edd22fbe2a1cd3ce9a4212d0efb282ccac28af4d876fc946203070c920bd; + uint constant M24 = 0x29c5ce97710c1578a0990d862cf881badf10e4f6bde629199e803cd1c426be4e; + uint constant M25 = 0x1324544a54174cf7b3cd8ffc4b86320f2319d9b88c1779b89b1916018f3fb9b7; + uint constant M26 = 0x1d18b25aac98b282e10b5a3a74ce5caa169a5c30bae52bba280ed517f3f82fef; + uint constant M27 = 0x02f35e921dae87f1284c0c8ae737dbdc4936cbbb03a03a5918552fe565270a8d; + uint constant M28 = 0x14a5ce1603228d6e6fade57c1da536659ba46d1b25566f12c28debcbedc5b4f4; + uint constant M30 = 0x2063a461ad06315ae5992a53a14bb598367624afc2833ccbb83af92ca0f6a334; + uint constant M31 = 0x059116da88a081267dd888204fc6fb79046c3297ccb65f9e0fe0d50b4db44ec6; + uint constant M32 = 0x1b43719cd10b60c5647c097d1fa84b8f3c12c9c475ade13b388c7ec47240be11; + uint constant M33 = 0x26e49154acca24424d5f8d29f650f9824de82eb7887329cbc83a56ae01dee4a2; + uint constant M34 = 0x2caf86cff60521ccc5ec6e2e2c83b4707bb90f948644bfaa8f80b0afcd4cde10; + uint constant M35 = 0x2e923ea46d492247e12e0a7dccf6620f5eea6629b7532b3af246809398859633; + uint constant M36 = 0x1ec6c32f513b8f30c7aab42e7d91aecbe54aeb188a84f8ca46bd7e9741b9a389; + uint constant M37 = 0x23a72c27f4f5e6ea5325d5b368f98b40693b2db1e8ca3d096739753dc5678303; + uint constant M38 = 0x143617efcdbbc0d27a091f28039eba8abb39392e2a462850b1f9cd8532f5075f; + uint constant M40 = 0x0c574e628f84b6ba9d17b9d2bfd4747e06dd68cda2383d64ce365927098c046f; + uint constant M41 = 0x2c948497373514e7d9846dea9ddf5755337ddb661043d6c628cecb8f55173bd8; + uint constant M42 = 0x22dd201ecbab94a2ee393796fefcca63aa54d9a19ab9c7f20a0bedcfb9d191f2; + uint constant M43 = 0x0badd77f516d4fa321d1099bc1e51909001591ad9919f08ce9718aeeb2bca4d6; + uint constant M44 = 0x24f92793d67638b4abfdf48ce3b62ab5d0e1b250dc274d746f2f7d0544185b62; + uint constant M45 = 0x000bbbbb87eccc91d5fb07b6c55088ca514d68ddd93cf31c8ed2d2cc7f23b22b; + uint constant M46 = 0x089beeb21c346cb9bc182aa2b70f853f1a2258d56893ce5a948d9c645ecbc9bb; + uint constant M47 = 0x0e07b1d22eed54fdf966ffdfbcebb653b5dac3b2a91f50272876efb17158be2c; + uint constant M48 = 0x2885f2d44be0ecff57d92a4384edb5bebfb585bb23eae2a2ea50806bab8b7bd7; + uint constant M50 = 0x276428d88040a3e0f442424d2ffcb8d19becf3fb6ca02c1b5c61b5ddc53ceb90; + uint constant M51 = 0x2c2729812be9ed432e75709133119cb0a14e1b6ea31c1279b7c3e495deaf108e; + uint constant M52 = 0x0b8e79838cd30707999c621621e77e69c0f433d543b79c668cf379b6623bac84; + uint constant M53 = 0x23671c5d1fb556063a64b5f664340936dc5ffedd4bdbaa2e96205704da5864f5; + uint constant M54 = 0x02809dfe24c7fd7cd49b97b27150f4d38a340b60f0733fd4530cd4269b4811e4; + uint constant M55 = 0x26010a3f5295bb4481310cbca5384a47af0f9905e4c76bf54b870ef0ffefa1c8; + uint constant M56 = 0x2790643a66038cce4a6488847d8d2da2eea84961f8134b1be36947f803527e67; + uint constant M57 = 0x05fa56d431d4bd09625a86d3623464dc90bd541ea41748f2026f65025ea9d2f2; + uint constant M58 = 0x04715db6d86b513d002589f1f9522f7de3b1a8bd702c167559ede97da2c0076d; + uint constant M60 = 0x24bdf6101b2f223174e869d6aecbe8ea5b04a14c38fdf1494393cc6fdb3e42a5; + uint constant M61 = 0x2280d6d4718f9f06b551a988408f0515070e455ed63377e910be087fb79bd191; + uint constant M62 = 0x02082d5647658eae648936cefbedfad2cd0538572aa6122ca68ccced68f432f4; + uint constant M63 = 0x020d7202ccde24901d6ce2d107e79e1fd78d6c9398ba7a4996f116adef14def3; + uint constant M64 = 0x26709688150ed035f959687edf7747ee8ee946b770173dbe50390ab8c08c5f9c; + uint constant M65 = 0x0751a4a4af246255ce412c4bb47fa34a51b8628f3cd902077775c8fa488e7519; + uint constant M66 = 0x159e25e00326a76f25c1143a5be6f53fa51ccf368d9974cc6d93cce8eb81d37c; + uint constant M67 = 0x2d6f3e0e98413d5d6a1101b245c9e711bb2e956e27a5870784fd5403b39867cc; + uint constant M68 = 0x088887966c079d2e689a8d6d7bd913e92d326959bada59b99a653feaadf6c467; + uint constant M70 = 0x180fca184150c0e354b4b3a4a075824d4b68e8274943f4dd8b0c64eca25dc68e; + uint constant M71 = 0x1b1bba125505ae9675bcec7c9af579c5cc83533c9d555be398afa09cbf95d6a7; + uint constant M72 = 0x277bae2fc597a536adbe9c24bc8ee81731eddb574c6a5142c1c5a48c51f82e81; + uint constant M73 = 0x1d86496995f14264e7a054cc8224900368775c3e5ac6b5f54285f4a73c2171ae; + uint constant M74 = 0x1e5ae4c295ad5a17e00f973f136f1230a6fb85637631b306d3705f80effac24a; + uint constant M75 = 0x28d2351619ccc6fb31ad4206e2c064bf4d9b2292b28463e53e4771f10670ddbf; + uint constant M76 = 0x2486b884370d49a003fd041e800f0a898ab61b5e947997461ee3284241f3baaa; + uint constant M77 = 0x213176bc1a04939fe7d6bc30691aabd6152ed24f309bff3939a0d91d54c67a66; + uint constant M78 = 0x12ded41f8047da3e6c22bfed3ec5bb52d027e560048db4c0f96ca9fa85e17bc3; + uint constant M80 = 0x10726dcff87299c8532159976607633f1bc2ad24453c1bab26b726b82d756ebb; + uint constant M81 = 0x17013257716d3cbae28e1c272cb6aaa2844136049ffbca05ca201523032c64d4; + uint constant M82 = 0x30354c9f29c920c05e99d7cc747510e76f7fa69a71594a290eae7293c5a48441; + uint constant M83 = 0x136961746d34fd196025173c4d79bf8b3d1d05291c584928d97258fd5fb4fb4e; + uint constant M84 = 0x2310e2337e4d53c1635da18a2722178d55af583591bcc317eba842df247deaa9; + uint constant M85 = 0x1815e4f7b40a7027878640a6cdc4b2854300cf6fd4953c2ac2c77625ef44ae04; + uint constant M86 = 0x111efc136a9dfe0ebcffae8943e679cc0fbf62fd0ce03b409fecd932a8281b10; + uint constant M87 = 0x0a5a1148dad4562eab18162b3914b64d5753e9617a5154e93f7e43e6860687ea; + uint constant M88 = 0x1f47c67a4325672f17b8bd1ddbd80e4e9e6c62419a9c204cc7e8821892431aae; + + // See here for a simplified implementation: https://github.com/vimwitch/poseidon-solidity/blob/e57becdabb65d99fdc586fe1e1e09e7108202d53/contracts/Poseidon.sol#L40 + // Based on: https://github.com/iden3/circomlibjs/blob/v0.0.8/src/poseidon_slow.js + function hash(uint[8] memory inputs) public pure returns (uint) { + assembly { + // memory 0x00 to 0x3f (64 bytes) is scratch space for hash algos + // we can use it in inline assembly because we're not calling e.g. keccak + // + // memory 0x80 is the default offset for free memory + // we take inputs as a memory argument so we simply write over + // that memory after loading it + + // we have the following variables at memory offsets + // state0 - 0x00 + // state1 - 0x20 + // state2 - 0x80 + // state3 - 0xa0 + // state4 - ... + + function pRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x160, addmod(mload(0xe0), mload(0x160), F)) + mstore(0x180, addmod(mload(0x100), mload(0x180), F)) + mstore(0x1a0, addmod(mload(0x120), mload(0x1a0), F)) + mstore(0x1c0, addmod(mload(0x140), mload(0x1c0), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore( + 0x0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x160), M50, F), F), mulmod(mload(0x180), M60, F), F), mulmod(mload(0x1a0), M70, F), F), + mulmod(mload(0x1c0), M80, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore( + 0x20, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x160), M51, F), F), mulmod(mload(0x180), M61, F), F), mulmod(mload(0x1a0), M71, F), F), + mulmod(mload(0x1c0), M81, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore( + 0x80, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x160), M52, F), F), mulmod(mload(0x180), M62, F), F), mulmod(mload(0x1a0), M72, F), F), + mulmod(mload(0x1c0), M82, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore( + 0xa0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x160), M53, F), F), mulmod(mload(0x180), M63, F), F), mulmod(mload(0x1a0), M73, F), F), + mulmod(mload(0x1c0), M83, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore( + 0xc0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x160), M54, F), F), mulmod(mload(0x180), M64, F), F), mulmod(mload(0x1a0), M74, F), F), + mulmod(mload(0x1c0), M84, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore( + 0xe0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x160), M55, F), F), mulmod(mload(0x180), M65, F), F), mulmod(mload(0x1a0), M75, F), F), + mulmod(mload(0x1c0), M85, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore( + 0x100, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x160), M56, F), F), mulmod(mload(0x180), M66, F), F), mulmod(mload(0x1a0), M76, F), F), + mulmod(mload(0x1c0), M86, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M07, F), mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), mulmod(state3, M37, F), F) + mstore( + 0x120, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x160), M57, F), F), mulmod(mload(0x180), M67, F), F), mulmod(mload(0x1a0), M77, F), F), + mulmod(mload(0x1c0), M87, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M08, F), mulmod(state1, M18, F), F), mulmod(state2, M28, F), F), mulmod(state3, M38, F), F) + mstore( + 0x140, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M48, F), mulmod(mload(0x160), M58, F), F), mulmod(mload(0x180), M68, F), F), mulmod(mload(0x1a0), M78, F), F), + mulmod(mload(0x1c0), M88, F), + F + ), + p, + F + ) + ) + } + + function fRound(c0, c1, c2, c3, c4) { + let state0 := addmod(mload(0x0), c0, F) + let state1 := addmod(mload(0x20), c1, F) + let state2 := addmod(mload(0x80), c2, F) + let state3 := addmod(mload(0xa0), c3, F) + let state4 := addmod(mload(0xc0), c4, F) + mstore(0x160, addmod(mload(0xe0), mload(0x160), F)) + mstore(0x180, addmod(mload(0x100), mload(0x180), F)) + mstore(0x1a0, addmod(mload(0x120), mload(0x1a0), F)) + mstore(0x1c0, addmod(mload(0x140), mload(0x1c0), F)) + + let p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + c0 := mload(0x160) + p := mulmod(c0, c0, F) + mstore(0x160, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x180) + p := mulmod(c0, c0, F) + mstore(0x180, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x1a0) + p := mulmod(c0, c0, F) + mstore(0x1a0, mulmod(mulmod(p, p, F), c0, F)) + c0 := mload(0x1c0) + p := mulmod(c0, c0, F) + mstore(0x1c0, mulmod(mulmod(p, p, F), c0, F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore( + 0x0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x160), M50, F), F), mulmod(mload(0x180), M60, F), F), mulmod(mload(0x1a0), M70, F), F), + mulmod(mload(0x1c0), M80, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M01, F), mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), mulmod(state3, M31, F), F) + mstore( + 0x20, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x160), M51, F), F), mulmod(mload(0x180), M61, F), F), mulmod(mload(0x1a0), M71, F), F), + mulmod(mload(0x1c0), M81, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M02, F), mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), mulmod(state3, M32, F), F) + mstore( + 0x80, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x160), M52, F), F), mulmod(mload(0x180), M62, F), F), mulmod(mload(0x1a0), M72, F), F), + mulmod(mload(0x1c0), M82, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M03, F), mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), mulmod(state3, M33, F), F) + mstore( + 0xa0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x160), M53, F), F), mulmod(mload(0x180), M63, F), F), mulmod(mload(0x1a0), M73, F), F), + mulmod(mload(0x1c0), M83, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M04, F), mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), mulmod(state3, M34, F), F) + mstore( + 0xc0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x160), M54, F), F), mulmod(mload(0x180), M64, F), F), mulmod(mload(0x1a0), M74, F), F), + mulmod(mload(0x1c0), M84, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M05, F), mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), mulmod(state3, M35, F), F) + mstore( + 0xe0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x160), M55, F), F), mulmod(mload(0x180), M65, F), F), mulmod(mload(0x1a0), M75, F), F), + mulmod(mload(0x1c0), M85, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M06, F), mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), mulmod(state3, M36, F), F) + mstore( + 0x100, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x160), M56, F), F), mulmod(mload(0x180), M66, F), F), mulmod(mload(0x1a0), M76, F), F), + mulmod(mload(0x1c0), M86, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M07, F), mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), mulmod(state3, M37, F), F) + mstore( + 0x120, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x160), M57, F), F), mulmod(mload(0x180), M67, F), F), mulmod(mload(0x1a0), M77, F), F), + mulmod(mload(0x1c0), M87, F), + F + ), + p, + F + ) + ) + p := addmod(addmod(addmod(mulmod(state0, M08, F), mulmod(state1, M18, F), F), mulmod(state2, M28, F), F), mulmod(state3, M38, F), F) + mstore( + 0x140, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M48, F), mulmod(mload(0x160), M58, F), F), mulmod(mload(0x180), M68, F), F), mulmod(mload(0x1a0), M78, F), F), + mulmod(mload(0x1c0), M88, F), + F + ), + p, + F + ) + ) + } + + // scratch variable for exponentiation + let p + + { + // load the inputs from memory + let state1 := addmod(mload(0x80), 0x1b86e63908c4b12af43cec6810356c94d21c9e37d73dfff9742a58e0ec356be1, F) + let state2 := addmod(mload(0xa0), 0x09ca022ba1142d170f755212e2edc9d0a4ace33e16825f540d5d50d5a021a169, F) + let state3 := addmod(mload(0xc0), 0x277e69d47a133804241f6aebe9449be6e22c849c6d8ad8c938eaf613bc1aecd4, F) + let state4 := addmod(mload(0xe0), 0x17b57ea03754e24ae0ef425aa2ad931aac9ba5457a18cec594545a235db6b269, F) + mstore(0x1e0, addmod(mload(0x180), 0x2b15176925df33a45c9e99a7c4f26ad946b1075de58c7064c0ff92c431d31dd5, F)) + mstore(0x1c0, addmod(mload(0x160), 0x1f7af98e08f6877923f27a3dad40c525ac52f56fbbd878506544f9acd61aa32d, F)) + mstore(0x1a0, addmod(mload(0x140), 0x2cb9354002cec4bcbfa985de34f43d702ced83d197aa374b5a1f96f87b12f292, F)) + mstore(0x180, addmod(mload(0x120), 0x1cd85529010dd7e2fb7ea403515bab5727556a479c59b822efc5a81eb37bc5bd, F)) + mstore(0x160, addmod(mload(0x100), 0x11c740983395e0f4a026e2c7c939236375c9077755eb1a37a77d5a1fd74abac6, F)) + + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x160) + p := mulmod(p, p, F) + mstore(0x160, mulmod(mulmod(p, p, F), mload(0x160), F)) + p := mload(0x180) + p := mulmod(p, p, F) + mstore(0x180, mulmod(mulmod(p, p, F), mload(0x180), F)) + p := mload(0x1a0) + p := mulmod(p, p, F) + mstore(0x1a0, mulmod(mulmod(p, p, F), mload(0x1a0), F)) + p := mload(0x1c0) + p := mulmod(p, p, F) + mstore(0x1c0, mulmod(mulmod(p, p, F), mload(0x1c0), F)) + + // state0 pow5mod and M[] multiplications are pre-calculated + + p := addmod( + addmod(addmod(0x2ced383a3ea2723ad9257b48702d1cb4d56a23e7422be51ffa294cee9ad1e2ef, mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), + mulmod(state3, M30, F), + F + ) + mstore( + 0x0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x160), M50, F), F), mulmod(mload(0x180), M60, F), F), mulmod(mload(0x1a0), M70, F), F), + mulmod(mload(0x1c0), M80, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x25c61392e9ac61cce6208845b8f4bbba8dd7eac69aa40f808814c9a82eae1342, mulmod(state1, M11, F), F), mulmod(state2, M21, F), F), + mulmod(state3, M31, F), + F + ) + mstore( + 0x20, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M41, F), mulmod(mload(0x160), M51, F), F), mulmod(mload(0x180), M61, F), F), mulmod(mload(0x1a0), M71, F), F), + mulmod(mload(0x1c0), M81, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x46f50a2e77c15bc84f4b3e917873281bccee385c6e5a40564a46087b0d1c77c, mulmod(state1, M12, F), F), mulmod(state2, M22, F), F), + mulmod(state3, M32, F), + F + ) + mstore( + 0x80, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M42, F), mulmod(mload(0x160), M52, F), F), mulmod(mload(0x180), M62, F), F), mulmod(mload(0x1a0), M72, F), F), + mulmod(mload(0x1c0), M82, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x1c6ad3e00ac0ab550b5901ce442d6ffe18e7933d6a0e18a95e8c6e4f47280605, mulmod(state1, M13, F), F), mulmod(state2, M23, F), F), + mulmod(state3, M33, F), + F + ) + mstore( + 0xa0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M43, F), mulmod(mload(0x160), M53, F), F), mulmod(mload(0x180), M63, F), F), mulmod(mload(0x1a0), M73, F), F), + mulmod(mload(0x1c0), M83, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x1d4b28a4582b9dd76928aeebcd55d9caeab50f1104d6d75831d31c430d25cfdd, mulmod(state1, M14, F), F), mulmod(state2, M24, F), F), + mulmod(state3, M34, F), + F + ) + mstore( + 0xc0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M44, F), mulmod(mload(0x160), M54, F), F), mulmod(mload(0x180), M64, F), F), mulmod(mload(0x1a0), M74, F), F), + mulmod(mload(0x1c0), M84, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x109b6e644c1d8f6bfa7b909db6e471fc1f6bdfc867b3bd1ceb1f87bd75fe6f55, mulmod(state1, M15, F), F), mulmod(state2, M25, F), F), + mulmod(state3, M35, F), + F + ) + mstore( + 0xe0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M45, F), mulmod(mload(0x160), M55, F), F), mulmod(mload(0x180), M65, F), F), mulmod(mload(0x1a0), M75, F), F), + mulmod(mload(0x1c0), M85, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x2789c2e3edc5db71ea6878d3ca132def4510ac1cbe90054d5adde5ca172f27fd, mulmod(state1, M16, F), F), mulmod(state2, M26, F), F), + mulmod(state3, M36, F), + F + ) + mstore( + 0x100, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M46, F), mulmod(mload(0x160), M56, F), F), mulmod(mload(0x180), M66, F), F), mulmod(mload(0x1a0), M76, F), F), + mulmod(mload(0x1c0), M86, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x22d65c89755e4f7b9f774a41e265112afa8282fb47fedd4341375dde552d5b30, mulmod(state1, M17, F), F), mulmod(state2, M27, F), F), + mulmod(state3, M37, F), + F + ) + mstore( + 0x120, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M47, F), mulmod(mload(0x160), M57, F), F), mulmod(mload(0x180), M67, F), F), mulmod(mload(0x1a0), M77, F), F), + mulmod(mload(0x1c0), M87, F), + F + ), + p, + F + ) + ) + p := addmod( + addmod(addmod(0x25eb296da5d37c9a7b708e866c427f24880b0f53ef691547a9669dfed41a8619, mulmod(state1, M18, F), F), mulmod(state2, M28, F), F), + mulmod(state3, M38, F), + F + ) + mstore( + 0x140, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M48, F), mulmod(mload(0x160), M58, F), F), mulmod(mload(0x180), M68, F), F), mulmod(mload(0x1a0), M78, F), F), + mulmod(mload(0x1c0), M88, F), + F + ), + p, + F + ) + ) + } + + mstore(0x160, 0x1045ecea044ba1cb1c3bf07ff4968390a3ea075001b21637ec7fcef61b11329a) + + mstore(0x180, 0x26a319fe6b7d6e08dd6cea9587cfe3f523492ece769f70f66d3b6197a262fd09) + + mstore(0x1a0, 0x28a5629b4c2083387eacb09c1571256d172ef1ed9c0738686da84216ba81bd6e) + + mstore(0x1c0, 0x186be22b6a063d18cc8760dba63b119cfc6d8897e32d6a0b19de280532fa9726) + + fRound( + 0x2b15176925df33a45c9e99a7c4f26ad946b1075de58c7064c0ff92c431d31dd5, + 0x22c89859b4d399d3a60a322d6b399b88061358493f3cb3653fda940e988c1ca3, + 0x1a9f2730c80854d8f6dd98109363d405597039373af5055aa67fc18e5b1938fe, + 0x040bae2c57fc68e3ce5e294998ea060e2563ebbac58ff8fc4a1a0a40575f0ed3, + 0x16bf4f5622729467ee9749cc380605d2bc4d885cb99699aa2dd8565c4faf8b7e + ) + + mstore(0x160, 0x213e74e3b88692068b420fdac7a62f3e90f87e8bd993310b982881b4ea7eb58d) + + mstore(0x180, 0x0254370fdf60e319df5d27b984e21d8979c86cc6c9db77b47e9e037d41ae2b84) + + mstore(0x1a0, 0x083b7377987bed3fbd0c5ee3279cccb319adaa660bb6a79ceee627f5a6369ecb) + + mstore(0x1c0, 0x0a2b26bbf2b84a55bc4c5b09b209d4a77bade4ecb0999e2a70021cccd4fbce1c) + + fRound( + 0x2c41eaf9c0128c486c5595a1ced6b3dd15bd9b73218c6af88137cb8aa5c574e7, + 0x11864265d76e8873b4d2ceccd18dada46ab7213321dbe0683727fa2df7e3cd7a, + 0x1383e7371d7f3eb75f97461ff79565538166ede6fb6ac68b02cb60d8322467e4, + 0x1a005346e9edc59573e3989f34c304ff1351de9642f398163602e138c59c7469, + 0x2b541345bc4fe1589d649270ceed4b2dc6299c69a5d24b460e36f3b4eb486052 + ) + + mstore(0x160, 0x03ba01bdc7f31b4b3626831d5e82852a5da5a7f472f497564362ee63bd6d6102) + + mstore(0x180, 0x216487ac4eea81e4d835b220c7f1e7b7a3312df5ed0b6e606a169bdec89a35cb) + + mstore(0x1a0, 0x0eb5eb424bc72e5b20779d6138a7296dc333b4d98e4cede698c1d8f3069fc804) + + mstore(0x1c0, 0x1476087ee68863fe69d538de90f90bf271875fafec3aac6831fa17811afc45f6) + + fRound( + 0x287090d407c4c5293cd72bdd881ace1a4785c51889ac9ca053faef068533eb09, + 0x00a9fcc21a234bc22a473c04931dde66476001ea6e32931277ca4cdab62a8587, + 0x1d79fcc5066ff2a62d6ec0c096f3c0623f9722c5d10d6411386b8cf06606d116, + 0x1d2da676081b7b0a7d87a57c6a6f2c91022a82291934ae8d646814f38b7c9cc3, + 0x0121189d7362dba92f3bba28737ea247e85ff4b3ceabb4eadac26f7a79d371ad + ) + + mstore(0x160, 0x21d5480ef2288cf37627083f5c6ff5806645d7878339792169d109945aa879cc) + + mstore(0x180, 0x2a017f4ca62717fe9d616fc3b74f426a22666a268eed190c92513679ff531866) + + mstore(0x1a0, 0x085cf123084d6b4b0b2b34cf06cf6f893e0a9db664958560e13102dca258a182) + + mstore(0x1c0, 0x01cab1eb61ae5a9c4f1b1f0f4cf71073d063cf8ea6ecb3a326bc3f2f24fc30ab) + + pRound( + 0x25995ecf079f4f81925ce8050e6bdd0b440e7adfb00da7e4dfd8a5aaec009f32, + 0x01b590ea145df6152ff0e8eccb97f057eb378d3dc8585a8195a8fc6b03dddb21, + 0x0ebfed12777ad9747734d82fb7ab59ebc85f07c3d055eb987dd42470e016bd52, + 0x2e03b519ff070e31bad1ced25d02de18c5c073355890f26d6437c9990a3e232c, + 0x028ed48befb70534a157c0bc8037347830ff6f7bffeda93a22663117c3038109 + ) + + mstore(0x160, 0x067389fa6719bb9e493424576d30d6254f1b7d54e69e1d1896c1b15ee85c0c20) + + mstore(0x180, 0x17da04cb5060861588a4dee60dacec407e08d6b19650359452705699bcdcabf4) + + mstore(0x1a0, 0x1e110b24526cf19448a04b71f91f834d903a08d3a7658e05ff0104ce6de14af0) + + mstore(0x1c0, 0x0b0a28b67269dcfb242231c7384d9b96c4406708f1a7bec26160e2352a820e34) + + pRound( + 0x08b659a737c0a7e198c51de07438e7faee94369715042367495f0305e89bb96f, + 0x02b3adfef956007ba949e044a68115b0a9c895a81386e769744e7b5b2c307df6, + 0x1a502a7b0883deaf9b24a7b451cf439d9b04c40af2fecc172b057b4fc00cafa6, + 0x3048a536a2a75af41a0fa596752c83edb19c46c00e4072516a2cce33a42ce949, + 0x01d008216832f77736b9f2c8eaf18d2ae69a7595a3d2e8725e75b3e9c66ab22c + ) + + mstore(0x160, 0x06772704a6a6c396f2f186272db825135c5986fbdbce0a3fd879bc27ee2134bf) + + mstore(0x180, 0x0112bff4736679a477440e744d7fc6191e168efe6c37fd0beeb6e64d30591851) + + mstore(0x1a0, 0x2faacc248d2f742b7dc50b013be9c4b2ea8d00be172832ad07ac0e268e391a57) + + mstore(0x1c0, 0x115ea053915c9231d6b9a71b4f3437e76d08af6e8fe7e42a3800136498df40aa) + + pRound( + 0x0226ba223bf5cc831bca604a2f55b324ad1d4b29b81ae33cbd7391ad0dca0c61, + 0x1fa506fae71f617db6a04dba21eb6224accac5f7cff145947093bfce2f3f5cfc, + 0x29724cc2973b5b34c4e53fb981f273589e7e0467a5b4b5a16d596f48844f0394, + 0x20185815e6d5bd43d769b1e7b3a42369db44fada44534a9e41a181a7cd90cac4, + 0x2cb5ecab94a2faf89986b565545493d5d8649d73a9f53133b614af6d89376612 + ) + + mstore(0x160, 0x076346a494ca499918229d2faf87b6b5afd4992f0d7d4023cbb677ea4376d4e2) + + mstore(0x180, 0x0712154eb43b0a3e8bdd94e29ad85939e220daf6931b84464741e64e9926b50e) + + mstore(0x1a0, 0x15bb7e127b9fc937642692a92d864960e249ddf327fc6c92afdedd89befc6c32) + + mstore(0x1c0, 0x0d438d885c3fce5b06a80584015eaf7a8ae05c60052c10ab80d80076800d8e11) + + pRound( + 0x0353e2c2845c0fdfc53f58394e2dbaca06164d10dbaf756127621b5a22181235, + 0x29b3685900bbaca910363ae0cdec5f61cae2c52c7ede3ec010e2afeac748710e, + 0x1a73ba985b824209d0a9f310920791fad9227b21bfd8e8a3a9f1c2fa89fac1a4, + 0x274682d63a1d6a9eb5ea22e0558b145f5b9b5e845c8c9dceb83be943309a305f, + 0x249de663dfdf6682ddc122e02aac0d79398f38e6089d92e2c892ccf949fcafcd + ) + + mstore(0x160, 0x221179d848ae3c29baa0de8e19ad399cf000dcfce572ac310fc64bd4d201c3a1) + + mstore(0x180, 0x1702294352579a43d19da15dee1fdcb2a70a45de25203435e2340692f7f5e0a0) + + mstore(0x1a0, 0x059ab788273600685cf6de04f87ca9dbbceb1aefe37f779663a7ef5019d4d8e0) + + mstore(0x1c0, 0x23af64b1622be07735af1999691398ad6a034029a109ce435f12c1b21b41f599) + + pRound( + 0x2bffb873c9b04762b2e362d6195c8013dcf7a5fd881894b7dc383c8aa34a9e0c, + 0x24ea42c76f7350d08e8b1016663fdaa3f8552b9564e5ba2da45b76652707d6c0, + 0x2a62ea21a0ade4740b808b9d838b4ef205b1193b579ecece0da34523c481dfbc, + 0x0c49774a68f5274b468cea0f32211cc9a8ca864c6d32f2c644b1ab89edf475e9, + 0x0a9b4d3d32564d83c24d4e052dc3072cffd61cbffaec957151fead13246073cc + ) + + mstore(0x160, 0x0a1c76641eded157eaa1bf4aadc956791d9e7b29eb14d07654af052686b70e29) + + mstore(0x180, 0x0a8a9f9ee8ecf8ad0b5cd84217af26fdce2ca16c07bc747d103abcb48ab21fc2) + + mstore(0x1a0, 0x26d6852b5917f4e229c46824d00b44442b77d8e566fe3b3901ba6de2011dead6) + + mstore(0x1c0, 0x19601734c30cb2a44ee4a323b35f2c171ed67e0f3c1fcec7096e5f01fbae6885) + + pRound( + 0x109ed21e2456ad7f94a0c6ca6ed942ef5e8132433e5fba6ed8f49b2038594516, + 0x26d9ccfa5379d3fd6927a58958338d6037872271d891f19f67f70c39e0893326, + 0x24ea9e2db358c1becf7dcd7d0e46979a647207816ae5a901fb00a6ccd991d0fe, + 0x0015a9b8c33fce93ae3971d193a430be98eeca1d27735974cf502bfb20c71bbc, + 0x2bbb366f79bc3baa138d79a96ab5cd14826bd3a85347e559550bf351f296dc1c + ) + + mstore(0x160, 0x0974163441712975a33b4093f922d7df17b2bdce7b7eb02c7830c5980464000e) + + mstore(0x180, 0x1cf5c1a4280822a59deecb82a64baab4edb87977e98ee29139bb51671b9919b2) + + mstore(0x1a0, 0x11ad46e13792150cf57933aa9476ec9184bfd5f23de46f1df78ed7e94cc81289) + + mstore(0x1c0, 0x0828fbfc0951c1ea0c0f3d5af2fe5796ed792a9c3cc4002b41e7a1bb8e63dae7) + + pRound( + 0x07895f7f029f84c3f17e359b0ee926d402505587f386cbb71070bc17cc87d044, + 0x05807e0a2b2473f3b87130586c7868228eb4d9503bf25cc2b0f35a939e0ef483, + 0x1ac9ba8eb9e2fde0a79886aa8c7dbd362aa490a355e07982828be3e5099d2fde, + 0x231c7595f76fea5828672afc5bbb6463cd00e7a07346e2588af5638e3b321b40, + 0x2e3d1677310217ce5fcc58f4039532ff946e2eff2b80d17f581ca78f0068672d + ) + + mstore(0x160, 0x28a9e6c65d06ed6ea47795bde9b177b5509305f85326062ad5015077afe4bbfb) + + mstore(0x180, 0x2bd3c33ae311c2f8d4ad82508b76df890c311fc8d232fbc2dc535fa593221ca8) + + mstore(0x1a0, 0x272d00d7a8fb1463bb624f1dd774edc8f3a0923bf9059bae3d84da23767d6873) + + mstore(0x1c0, 0x1355a796abdfaa903b81dfae32101a13068f5070440552eee0acf2a4d07d03bd) + + pRound( + 0x02c720a8486e7122305304ecf3a00f99854535c4ff404fe82e30e99e8500fcf6, + 0x09bdfc942fba8824c0a38d6f525f9176360d2881aa425028f1cd3a7fc3ef72c2, + 0x1d954a0f93250e5581c6b897fbd72f4f2a943dde51e262e7dcc4a1b2ca82e2bb, + 0x2b829352e297ab2106e74f9fe702f69635edf37e7ab0e1a7f92f14c98aed56eb, + 0x12d3b917e58f1f44e1babaa341d1dac923dfac75482e108af1c33368734a904e + ) + + mstore(0x160, 0x25d5bf1a863a0a6441cf55e7c85b8f232ff1556e77fbcc6d71e8bdf349bfdfbc) + + mstore(0x180, 0x15e6b8d9ab7e063a3638216ae471176e87ee4ce30cc24cad19587a23332320aa) + + mstore(0x1a0, 0x01929ef47c7322b77ebd0d1a40f9ec4d41eb2641bfba35a9cba7b708a534c9ca) + + mstore(0x1c0, 0x184f51e791edaa2dea7911151247bad4b0e864d7a8f678c7708ac65c51e3bb79) + + pRound( + 0x0734bcbce4180ae16d4a6689b9b94f2b02cc7d74ca8ef1592cd16afe2a033728, + 0x0778d4a614c2f76e28199d989a9052e2627464b620d91e7b6d3d15dbd4799d54, + 0x16bbc980a67b2a65434d087c501859d127db377ae144ff634cb8574fe8bf869c, + 0x12a3e7e197b0504c6894366245bed65e326db7c7aaf2c1c0d59e4bac10d633cf, + 0x1f35f8c4431fb0dbf42d9d07334fd67f99160fa9f7e20d811f4b8fea7dd5d33f + ) + + mstore(0x160, 0x0fd2f95404a9e92f46d57c80507375724966264560ebafb3ff2fd19259d47d62) + + mstore(0x180, 0x0bdd93ac21aedf31826fc3012fc8fff14384add521d98135df3ce70e47d38116) + + mstore(0x1a0, 0x083ea678d5a53e8a9b601906befbef23811a6137788bb873fefd5521f7d99f03) + + mstore(0x1c0, 0x08a9906be6e9ab93cbf1b94f090df2d02df6c6ccff6364c2ed6986d61f16af29) + + pRound( + 0x2605adf5562d5055ffb284df1ec0d4e371eee0595ce1422ac535a410597cd866, + 0x06e6d41feb832c2fe007e1bccc81442585bc9eae1612b8bc3d2a4925c239ad51, + 0x137eb7da068955cde28db6ae5e780b7ae1c0d633cdd113bf0fde4345ac9c954d, + 0x2e97930eb419f7353ba27b25879753fe64d7d187023ce2de4bf9e70eba6e9bb6, + 0x13af409362087866e62d6860fdab159207405bf9c75a9efd9321736a1d812413 + ) + + mstore(0x160, 0x2af001a296c111e41e327ad212ed30234da2beada0449ea1d2e0f0a00e424074) + + mstore(0x180, 0x16022bdd67d2ade15f661a287dfe23915433b270f28c24e6066e45039aed813b) + + mstore(0x1a0, 0x132d7ca5f935f3e8864268ad723e8780df36916384a54b812c74a749a26826f6) + + mstore(0x1c0, 0x20bdab9829e48c89a99d0e8b0d69b79a4a273808807ade4ec5db95fd184c4f37) + + pRound( + 0x187b1c82cfaf880449337cfa77f618e3ed19c604e65fb768b0333d8d535eaa47, + 0x245005f814e38250751143117f5e27d5c173f0ca4ea2a81b1b8f3e90d7fec4f3, + 0x25aa5a53ec5e71f3f47fb1cf8ea8c757fab69a61274fb36eada71deaf1614db2, + 0x01c244a2ed1922753b39ec6b775f07cad91b14cd9b6578b64492c2cc4b0c8bb9, + 0x01664e5c861216c4cb10cf3a3bd51afa0f3e59eae24fcd7e7daaa853d46c382e + ) + + mstore(0x160, 0x2173430a6842061f027393a443b6e25e59a3e5bcd20895ade0fcd7bebcd88885) + + mstore(0x180, 0x11673173043e15137361db05a0b067147a23d7f3003680f3e1534b183fe27cd8) + + mstore(0x1a0, 0x037c80af5ed51c1c22181f3e7738806984493eb998add05556eff65129259ff2) + + mstore(0x1c0, 0x1d70b961246d2262cacd8c0954040548b63fbd25f3038285c36f6b44e9b9ff5f) + + pRound( + 0x28db494350ae9c81ab52d719ea05f98dc2afe87bc1afe556161e61772258a951, + 0x19fc92f1d2c1dc043af3427b77ea74e80ab9f6041e0e51d1b24d9cb9f3fb3ed0, + 0x16bea7126b8f072ab6c86afca80b606cb90c7e5fd02bbdba1dd733c3cb884705, + 0x1fc57b168a5badca15a417ebb4bf5beb28fd09e0dff889550a126f5833f1fd5d, + 0x1ad20d1a3ee559b6334be4ba911dec957d56699cf37dd7b97d23dcbc65bd9afd + ) + + mstore(0x160, 0x16628b6f83fc36bbc1d60029a69c843d27484f594a7e3ba8d47cdfa548a91a56) + + mstore(0x180, 0x26fa9b84e855f1069e76e037104f8886b760d4919bed798e2e4b8dbe0080f16e) + + mstore(0x1a0, 0x0ee86c87bdf0ecd526e36a6c4ac9fc9bf05b9161856d658c1b9ecd80da9e9687) + + mstore(0x1c0, 0x08a5179993a8056405527cb82b6f619984c63cd115ffed3a6734ffa85267191f) + + pRound( + 0x2184448a7bb80d176dbe3de73f383a909635e4610c25864b2c63252186b6c44b, + 0x03bdca6b22fb80cf9e7b317190ebbb9f6c7d3c96c1bf7d5013f36521a5dba7d0, + 0x2b65873313d5bffa44d510dcb3f55048436f4eea91a100ec0d1af952eb64b247, + 0x2a7fd02ef10db1c9dc03c9cbe82e857cf06f37ea10e7e3f539b53778ca274616, + 0x1cb880cea192153865713565ee4255ce72da23b3d2142d265fbc2196fb8b569f + ) + + mstore(0x160, 0x07baad301d58460d1e6ed10f52abf1bd785caef8565777fed94dd67de6717d25) + + mstore(0x180, 0x1e476106c4bce3903a5aac6e110df2cc1a7f71b4135be3662f4b01047e248a6a) + + mstore(0x1a0, 0x1e019dea5028d23b2df063c210466a88c3fc1ebdedccb8045c7e9d1bb6e77a98) + + mstore(0x1c0, 0x0dd55f006559bb6747b254d29a73f5ea7174c6b6067e730a5f9a9908186308e2) + + pRound( + 0x047aa61e4bf0721ac4e0a2f291e62124bcc2ad3949dcf96e875f45df7eeb5437, + 0x263a511f033e1fbdc6d282b52712a09bf5d1fec21ea8bbfe2eb1ef5bc4f21148, + 0x226520bf730486e2d8c859b449bbda7631b86432a2c100dd7386c9b1f993f34e, + 0x2baef27107a52854788f0c5a940f5a4df0d18d38b893cbb1157b386a7d356357, + 0x18022cca17f26818d54e60e300b5c949d9c92122f7de5651a60cf70c8da5fc52 + ) + + mstore(0x160, 0x044b56469ffbbc9d0c0f075e20f390d30d11981a767e507b80aef7ed69e7171f) + + mstore(0x180, 0x1507d88bbe10b21c23a94555d1e4d379aa71672e002450393eaf7a23736150b7) + + mstore(0x1a0, 0x104d6752a761b50026377ec798404f71151b3cf6a9ea1be93c6840594824e9b6) + + mstore(0x1c0, 0x25276305cdeae4c16558de60da72941446a9fd2226aa604d44bbff12b1e0ec23) + + pRound( + 0x0993085a8024a598e0c9059d3b919fb2ebc81be408cb96fe38a48a952c029189, + 0x143f3cbf98e40971b2115493ee06e26c7893787bfcfb13b39f165869ec7fb9b7, + 0x0525ff28fa24291b8d033b021395754fa030d497312cc17caafd008524eda07d, + 0x2d9fdc18cd2586b9f449142017909392025095182d5f40d5911f708eb05cd852, + 0x230997202fcd6f051e1bf1e59a9d01188e3621d613fe0e78e6dfb400efb43f45 + ) + + mstore(0x160, 0x2103fee94674840b1aa185a1f8221ee4511a2b5268f1ac96d7b28c8984fde6d6) + + mstore(0x180, 0x1c1396433bb9eac9a02abf2390973c1723ec5cd55297a387a92806f78ef9d384) + + mstore(0x1a0, 0x1befee24005a88d2c9ae9226169e898106996fd32fecb72b0cb4decf109f1b92) + + mstore(0x1c0, 0x1adc49f1f1b405df727a64e98675ea0ac2fc742c806f0d5950c8ac41350f5184) + + pRound( + 0x10f3cefb054d630bd7dc4c7cabd97940dca683dad8cc35a6d0c30cbd9812051c, + 0x0e406cbfa384c6b24ed043ff3cb1d6891baff0585afc4fcecc7cccec809df03d, + 0x18f36033fcf64f1bda0c12616b00b611863efdb8966db7ed3534cfda40aeaf0d, + 0x165d022a34cf10ad3255723635a51a35ba2a6db07572dba106dc56ca6c937c52, + 0x223c8c9aed305b3d18265b56ecb7a4cfc4b10e58baa1365827a539c47819424f + ) + + mstore(0x160, 0x2740100354406de4d94eb857a1c5df1c0e88d8b0b82d10c1276ea7d9f62a05d0) + + mstore(0x180, 0x0b8a9153d3d643f0a9f7dc08f24d70863e4f150d1c32ac8905a6226887c9bcef) + + mstore(0x1a0, 0x25dd73d81ea8918c9c1ff69b0b86a0ed3801ed1aa4059d94eb72cf548b2eea1d) + + mstore(0x1c0, 0x253d813cf05f2ff1c7d6622bdb9faaff277b4d0312a5888a9dcd12891ad1526f) + + pRound( + 0x10a0e0cab76db0b6a00799dab1f2e4a74ef739173cfaab2d03eae240c9c847cb, + 0x1a9aff62d6c66fdfed0eb91b6c4f974c1e047c0b27ef49b10d2933af1af3f997, + 0x261967f6840995daf7411034526eb5ac725f95e21fc36c8ed191873985f95cb4, + 0x1338030f85fcd2fae09eb016f4254086e1af2f88fe7dbe29d183c89ed5286098, + 0x02c53745d1f0e66499ff109e777727e750c1134914cbb4d52bdf1649c7911ada + ) + + mstore(0x160, 0x165130ddf77a82db84278a31841109da4108d364bbdc6acbb1b0fa7aa5175dc5) + + mstore(0x180, 0x2fc1fe031dcd4538d5d8b1340d0d37df5505e965b7e7dc4c19895b9f6fceda6c) + + mstore(0x1a0, 0x0e1ead2be6f64559d903eaeb6e02a7c85d546422e7730e360a1e4bcc0f62f16f) + + mstore(0x1c0, 0x0a983360bf32392d5df30a2e4b22535a4f161fda3d05b1a5067d278e21c8e54c) + + pRound( + 0x2523322d2d2a78cc54c944b57752bdd8d2c8e62e3af51e020eb2c15ed830f5f6, + 0x2ac9c2d60d456848e8dfd47499cdbd4f2377f3b4ac98e10e2ae3e4f83b0071b4, + 0x2a4e35f1df833442f9ccb8c75523b1ac8a9716174f47fb0830d94f9bc4386bcf, + 0x270e7f6b15f2c0e0926147cbf79a7330b676d174acb65b730522dccb096f9fdb, + 0x1933ef75d4b862f2274634e1f5a4e50ce899f15214f0b8feaebb2ca2ef52ced2 + ) + + mstore(0x160, 0x1d2238d8d9768dc639d06ca5870e3503f3f81ef863300944c87b77628ab6d84d) + + mstore(0x180, 0x0d164e32fca3c3c8da3ae332a831cc9a95e75d4833ae232ae382bdc6b790d91a) + + mstore(0x1a0, 0x02fcdde6d6eabd7f2fa19234fb157661b762a5c47b57739a62000d7f6ca8ef3b) + + mstore(0x1c0, 0x0f133b8b1e54f43484574647812ca377c802a1590df5e5b8f9c8c21908efbe37) + + pRound( + 0x2e27e61828693607c17eff9bb1e5ed0baeef782e879c5230b86d6a79d729f4ce, + 0x0d1cea26a08207e522ace505e837caa2ce7b105cbd04e7c838c1acd006ffa53f, + 0x0b958dabc9a8066de9e4cef89abc82e3396a03568376fb44ccde4c38cb2a1944, + 0x16f5b42d88f8d4f787ffff796bcf8175b1cdce307261dec86cf2034a9b88bbe8, + 0x12b68aec2db262e0a61f0fd4b976b00ddbcf7546ef27f47d7435a288c2b6c63a + ) + + mstore(0x160, 0x1bad1d9637a6ad6db5cbd19ba7b955a45b9e8089d1697445a130743e03ed3caf) + + mstore(0x180, 0x2b96f520dda8251a878b28bf96d281855b9c43220b0a3279179753f740edae80) + + mstore(0x1a0, 0x041f97f76c60b28e0fdf7974bf922b7a0999e0e0e40c654378ae12843212909d) + + mstore(0x1c0, 0x13b5cf57475057a2f5fb6d08093123973aef9726cbd9835b95616c2aed5588e0) + + pRound( + 0x03057ea8932e9bf7d1a4bad8241e14f1e60afd13ba4e90afb472d9dd29c42bde, + 0x23dbcb6ecb4807740debdc825f7764571bc93f33645825d0e45c88b0088a9f18, + 0x01b90754a2058217cdb64ab45e24c2e29423bc3a76f8289579927ecdf63edac9, + 0x28db800ae16d7033c8e107e198aeaabbf9d0271c74d957c6bb9514a0f038fa91, + 0x02f97a36ef93a7904cbdbdc36e5ef374e58eaf37b5b9439473cbe477c3fab178 + ) + + mstore(0x160, 0x00cc850e959c567bed20058b6769fc27a6c70cf72f222b80879e9bdfbc6711a9) + + mstore(0x180, 0x088947910eb3b43ebd8688695c64ac020e19d0bbe875a7f3a0b699bc60f18cac) + + mstore(0x1a0, 0x2c25c236bb48035f45fde5b178105655ace9f3f9afb09071e790dc4babdc86be) + + mstore(0x1c0, 0x12dfe1bc28654f5c9ba65865769c9e47f2bde0d79ddbdda21704904b2905da68) + + pRound( + 0x2ca43aed5aea162e8c9be92a15e7ad0af84d44f3d2e398b5f7491fa2df12deee, + 0x089f6b1ec8b51cd1e6ea69b9649520a6f0f2f96ea11df270ab0c5d9adb5c3df0, + 0x04f510cfc7e528370babb8ed7c50c34c6041772627793a0f3711d1300b4d1275, + 0x260e12c47d0ab52563affcdd5c2862f4bad5b7af4ee037ea5f8164d0f13d1059, + 0x1a656424760e75468aedd8515b3111e16cc0d60f8dce451f7bb35b12dec772b7 + ) + + mstore(0x160, 0x1318105fa9fe1549f04ef48679c73d46b91ee0bf27b4451195de945c8cf78aff) + + mstore(0x180, 0x1408a4259df52a491775936b2c2d476a121708c312e635ef8d1f843c3ba3438d) + + mstore(0x1a0, 0x10cf20dd5734c18880dec5be44ae2ddcc4f447f20cac98c95193eb7571585d07) + + mstore(0x1c0, 0x2787fe4623bd3264e0c8b5a471974ac1feb1e37fbc3a9c8a4ea74d6010b7d08e) + + pRound( + 0x05645b68f99a564ff08f745e1413bd83ab5b0442f0b8efaa2a986a6cfb2fd8fb, + 0x17cf3ec9831b4d6ead640d912e41b4c72e9c259126bf6310fa4b110e43864c75, + 0x12b15f28fefe5d6fa519ab9cc67a78c57dd721ab44af286e72fbbd5689a66f61, + 0x2da44f7210520779cbdacfaab2e1ef01edda8eedb6fe6d037ffaf8e59842a00b, + 0x137ff7323fe757f32afa165f11588b403bd393d5c9a961cd2f7da2e5d9a894cc + ) + + mstore(0x160, 0x170a5f4518f58544330671ad2a361f2c803c0d355f3e10a5784951f2abefa707) + + mstore(0x180, 0x21b3a23c3a553d401c08502eca497be938776af671edfe44c784956acf98865e) + + mstore(0x1a0, 0x224dd497bf3a4247b9c48c9ac3cee5307490e824a14204ed88c2b1166e8e479a) + + mstore(0x1c0, 0x2654965a3bf3c92422fb54e676ac8401baaf0f68d42664e300624a375302e0ef) + + pRound( + 0x1b90e21074907545c1dec3c59dbf2a6b1f703258bc03707e33db582d45ab172e, + 0x0b8e912a5ec5a0bfb779a0801b90863edfd9429a7b3632bb5022fdbc40636cfb, + 0x0d9982378cd9a8370bb7a555c34df3183ee6b0d8abf31f1f547a3993044188db, + 0x1e497bcfd5c95cdfd630b0afbf6d376f29a468d1cd3ecde56f6940221d248af4, + 0x2d602401cabbc69dff3dd552e271eec29a5a4acbc935686ccff9a15076585b7a + ) + + mstore(0x160, 0x14cb3e56b2b8c6605ba04261a8b117791caf26f7c233bb183f83f72ef4c8f345) + + mstore(0x180, 0x2fd6b4e6c892609fda21414dd8712de845eab305be627df4d36c8d325c9bd7ac) + + mstore(0x1a0, 0x0325898c8434f7ca32ebd73f53df3b1adb0c9940a69e9191fd996a4a96157bf8) + + mstore(0x1c0, 0x08f50a7b584dc022b85d6a16a0d3dff6b8a7ec4dcf5ec066f99fc4644d6d5d48) + + pRound( + 0x1d525f4105f51b69c006828670e7785b726e95be160ee1a3e299677820839f32, + 0x28f88d089f421ca2bfe697270fc0f34f50ec41a1ede53612c52db74479b4b323, + 0x082e621153ee34324e9fb7ff3d123fc9560ef9af0fa0f948db24d1c8e6f07a9c, + 0x07f8578337523867b1d9403e9ca61ad99c0d7d5bcde4f19d8752e12a4d5805f7, + 0x2e52f30dd05931adb7d7e85255849b062ba1cf2eb8d59208b5bda8e35d69819a + ) + + mstore(0x160, 0x2f56c8c0387e5e44cf4921abd33b1590cad0719e932a36195c5138e0c6ac83c2) + + mstore(0x180, 0x1109db87b7684f4927b2afeeff00608af5f211920eb8d638e3a7c943b293fede) + + mstore(0x1a0, 0x1851c29804025b6f9c69c80891035590a51d13032cd576d332ca89222bc75787) + + mstore(0x1c0, 0x0909e4cdc0bc47f2df4898106b5c40f25c7137e1d5ac9a986c9f66fd5dfadfba) + + pRound( + 0x29c5bbb8eb214fb285ca30a43cfd7141d9ceb8a19ff3c970f2bbf4c9bae9e11f, + 0x1264cbd9ec001175211e2856a78901e4088f1eb7eaf5934999e1997307e7432c, + 0x28a0e7819aa0251e9cf2bdabf64fadbd51dc9416533ae33f7cb97fd177688504, + 0x1a9be651c412fee6c800848477cbb67e4c52fc23e51ade9c48f6af307ec621d6, + 0x1bf70a24fe7fc8946fdde6f556b3ed4b03c33005cbe7f34ac11296e5b0c75f6d + ) + + mstore(0x160, 0x14c4162b9c9eefb97941b1f133bb18225d28294d092cb8917afcb3e08abcd9cc) + + mstore(0x180, 0x19921fd625c66ec67ecd8af3d6ff0e0a3cb650e1e72b3fc98884b00354085b32) + + mstore(0x1a0, 0x1c852aefc9296753e1268739ac15d2c6d21de3436c816f75f93b8debf37eb6ca) + + mstore(0x1c0, 0x04bf4a69b1aa4f304afaa1dd1bf60de1f559e8167edddac1eb88ad9d02745fb8) + + pRound( + 0x2ae3e90e2650e286d5913d4dd1e71d4f233659701b319aa228e16af9f010e07e, + 0x06a6c015f95173441f7a40d4f1bde04eb60fbc4dc72fdab7dd81ec557235d530, + 0x2f6ab5d35ccfe9ea366da257c8596fa6ff30d6c46816a3bd3d484c97f8d2446c, + 0x01f9c60308182eb6d4a83f9272bc220a8745d9c9127050899bf6426f7ab57cdd, + 0x2f514c412bfd9754e6798e4c3cb13d5e4c4b29609d3ea5617ded35bc01d799d8 + ) + + mstore(0x160, 0x2f03b46d9eeedcd7f8f4cf2cf710e48ce3f31d1364f03345b2a7964b01e6347c) + + mstore(0x180, 0x0fef583e7e8e102feba879f7bd60241870a0291723aa354a35259e0a40050d45) + + mstore(0x1a0, 0x2e07b5d70ca583cf4d9baffacd02d7d80fa5e523abbd895086a36288b969fa6a) + + mstore(0x1c0, 0x24599dbfa1dd1f4714d585248cf23ca1394b858af8e904c0517baedbf2f176df) + + pRound( + 0x240a791f3b8bb62d5d9aae80f341cb569fe3fe72e7183d8e5830165e4d123753, + 0x151b295b4242e0c09fef7bc5ef40f1e3c8551654186d62cc663ee4f28ff5e764, + 0x086eb3d30bc4d80664a074a09739dc8c497c93cf7e657954b0cbf7676165f23d, + 0x17aa8992d7b901eade7eacd95a8e89382a292a7121ab0ebbebe0dd62622c21c4, + 0x1a5b3345a4c0d875663657607b5c7ff832f489b23a3c43962008570f96eb8de8 + ) + + mstore(0x160, 0x04f915a4fabc8ab208a615dd89fa207d367700bbb9bc061d07fa90a70feffda2) + + mstore(0x180, 0x2e04b7c1aa853f9ee5e4fbb5cd7b6e60ccea4ed5928a34f4e59ea9eba8794708) + + mstore(0x1a0, 0x08700df51138b36c0ef2bed12bd78340ec69b04a2e1b865108036391b4b6db3a) + + mstore(0x1c0, 0x2503336398f165bdea8d4929db1dd0b3710416fd63d7aadcec41bb7062c24782) + + pRound( + 0x00a826afd370bcb65b66189e8d986777e61377388d8727e407b500fb5291f8ee, + 0x28745950870bc1848adbc5f4bc03415f0a2bf23e905e7d33cad03de907081e3b, + 0x219e6dcda590fc88d405673d2cb4710f8b5747b46dd9914d1be4081714cace58, + 0x296692077b42e972399f17ba71ffededd95185ff7253d9d1f41747c6f27dbe6a, + 0x2ccc5f0e2049d426841862f32f8062829fb5d826a6a483dd5078de859f9cbceb + ) + + mstore(0x160, 0x27623d101b1f922899f9c5783e1fdbb1e7552826e4d6b58d6df8d986937cdc82) + + mstore(0x180, 0x247328a4d9ce81603e37ea72cc5d1c895c21f09305301bf1411c0798602a6268) + + mstore(0x1a0, 0x1921909aaad03cc78a6cfbed6c1056e3d93a25a5496cafaca12af4ce324c6081) + + mstore(0x1c0, 0x0a85c0358cf388b47d14d42feafbdd4392df154f649b7213e29cf101aed00d80) + + pRound( + 0x05633785a50a9c77573ab10d893341a0cc2df072ed8eab9a2996a47a527bdaed, + 0x0ba4084e44c50e1412a4c982dc0d8a0d4622513b7c96e9fccb2c3be2d3901e1c, + 0x2d6f32cb761406dfa9e03d7ff8a43bae106dc4519c61c3996cc9cccd8f307c86, + 0x2f959c830737e631395846373b1f7d003c8e6bae3aea2edb73491244f8373687, + 0x14863af59792adb1bb40901664349217498d999250cc0a858db27aed54fbaa38 + ) + + mstore(0x160, 0x2d2daeaeaa93a5f9d8b6529f00c4c6d691c3bc4efbfc8e7c2f08ae3e44e1f4bb) + + mstore(0x180, 0x0ab08914b2de57397983bace0b327f98c1a9c1e58c76ef2e716cc305727a0f72) + + mstore(0x1a0, 0x2758796cd1c178ed0c433c4f1b6b19d42ffa1bc884c3cd1ccca107cb2bc91998) + + mstore(0x1c0, 0x063df5b0349016e7bda4741ec898c74e4a30fc4f1b59fb713a824992311e30f4) + + pRound( + 0x01bac04734a5920d65d67aaee04165de621beb56f902ca483860f7077537512e, + 0x1dd1720966b3231bb00b08d6b8bac6c76dee5454f784134b93d8c70ab3eed999, + 0x22897debc6eb2a7f36bee1e7f42ed4b0d37ad696535d82d39ccfbbe92e86c08e, + 0x2ad01bb42b95d113b3b91ad88c69a33c1e94dc85512bc5168ee73065b387e175, + 0x2e82bd0a053ce03af9aa947df5f131791529a57f8360a2cd697eaa177c6000b0 + ) + + mstore(0x160, 0x02f41c21b73dd4e7b510dca16e7b4b4277301da5fbbd59db03d3a32b89c57b7c) + + mstore(0x180, 0x253f09ce9ecfd2aeeae98ba1b29806bc2871e5fc67bff13e303db99618e1d0a0) + + mstore(0x1a0, 0x04395eb655582d03f25775e66ae67be0aaf7c63ceffbbea9226b04b0e795bfc9) + + mstore(0x1c0, 0x13711235c3d21dd749e3e41bd048a32bfa2e796e26b72e05c999e6e6126e402c) + + pRound( + 0x23713016555546753d41abd69e6fb91e4344b7c05838048ed0641cedc5fc6728, + 0x26bdfc0a894998e693b7e2059d6a528aa86ab57eb031b96b53fe8b5adb74c075, + 0x08897118f75cc8e9115dac581b9553cb407a1de135b632541bb734f53985286a, + 0x02ef8eb2c7b26f7a57691ecb1e15a40afa9b3a5557abe81146ea6f6d4960c346, + 0x254e8e5fc11b992348fd7a2c9f4a5a0b586bcaaf12603658b25910f63cf08b01 + ) + + mstore(0x160, 0x19a869e15b3f9b965016feca2cb82a2f14c800945ba49db74aad8e9346af07f6) + + mstore(0x180, 0x2b01c5a2baa16f9569d4670098466f05bf3ae097aa930771b76f24afa6be50d5) + + mstore(0x1a0, 0x0586148573b6b56617f94602fd6c86ad4a71b3fc67a35448d64eaea532582124) + + mstore(0x1c0, 0x040352e19809dd93bc7a2c549bc19cb007872e0599a3127a3e7704411894f98a) + + pRound( + 0x083c75117510a37d43b5513963fbd0f9f33590ddcc297e3cdd9ea42add7a175b, + 0x26cc9b5718d84e606582d35d8fdbda944c6525ddcd7488cff21d4d0d823dcea9, + 0x0e8978f047929b1a94601499634a8da020b9a46d0b1187d54504ed8a344d56e4, + 0x2b11423af39a5d15be397439b5ca50aa9a6d41234acabed2006247688f6fa805, + 0x21a56381040c702dda5a31a5aa275ce692685625e5aa77bbc430382573b402b6 + ) + + mstore(0x160, 0x202de33a6fce9dfe8aeea34af1ed5c74093386c8a553d3a3da46e134731dde14) + + mstore(0x180, 0x07372d41054dbc009e3e91f902d57a213f043575f3427e35768a5a52482b1b7c) + + mstore(0x1a0, 0x02f7e35a4bbe9699949a819262943c97e8e938cd999cd911a9edbc716e2454fa) + + mstore(0x1c0, 0x2a27b84a7422e29b8cc73bf54bf535b011606c819b4baa6824b6123036d73ff1) + + pRound( + 0x2d6486b8e7b9549ea86cf044e8950ffa36974e842e1fef876561e1346c5a893a, + 0x2ea9d2e1b7d07c9a3895565840e25843c9debe589044f305c1b5872c74e5a49f, + 0x12e0dc4105acd8692b7cea0bd76da34aaeb8f6d00ecf84b4f062270413a8087a, + 0x0da9c10656e6f42c3ce7c980a70c9d793db4df8307599a33a491f24b6368290f, + 0x02f3551c6a648387da629c96633d5cc99360d9b89aec23c18ac76af21b11a850 + ) + + mstore(0x160, 0x234901ff3ec65e0a4f629bf6e96eaf379aea7c808ca9ee79b6b796895917684f) + + mstore(0x180, 0x28a529a627cfc689ba1bb3372072518c7720b450975339e87865c36be526e5e6) + + mstore(0x1a0, 0x1a1af260473d83489a6a466ddc1855fdc6e83d73b5c5c0fed554af11c6cef5eb) + + mstore(0x1c0, 0x2fd594dc14997e8e0123f3af16c9289d088264cc16a8119e8f02ab7270952924) + + pRound( + 0x19527e9093b313d5d2638c863499839ff5d8e5f98e74b312fa0c63aff7161a3e, + 0x08571a6b8b730363299666231e3c49ed231d1e355d93894c8562ba033147f025, + 0x2c0f32778edfe932d912961c81d88e98d4fb64caea2cc2d4e3f213a5d2a1b9ed, + 0x2710a63e84f8bf3b15da09e69bc24c567f84a4577610b19cc58191b2b1453ea0, + 0x2d4b8440f168745ed84c3e393f75bdc0b0fb3f148e4ee77b525ebc258a953dd7 + ) + + mstore(0x160, 0x072b770a70dab242ac30d03f5d2477595cf521ba7c91478d72e45358569ef30c) + + mstore(0x180, 0x1e399a42196a8061079e9d61ec97ff8c837195bb936206997f5a93021b70d275) + + mstore(0x1a0, 0x24f50ccc3a68ab3e2cba453ec40a8796a3c59735dd3303bcfadb6218aefb7d6a) + + mstore(0x1c0, 0x14fe92dc9227b42df23f8a5a0a7a2f50bc119f01dfe708b9118f75616714bd3c) + + pRound( + 0x0d3564e44716de8c02d8f8278b0d2f819658234bc4db59147fa3a5dc23eec833, + 0x293e9ac448bada42377dd8b02d5ae5695e886e0f8e43f01b38266aada3cfaa0d, + 0x2186e961df0728bcd7b667d35e95f354cfb1ee1288aefb7e0b2381296daecdb8, + 0x1b4972ee03b2787a27219cdeab7acdb5dce44bf8368a0c43e1e3b8c8a7f49e74, + 0x01105ad26651d5ac52e817c32d86a3b10f05738fce996b2fa905ce1c3279522a + ) + + mstore(0x160, 0x264e4841309ac1aae92ddd9cb4d973e237406d50d2849c7091bf1c1bf5c1273e) + + mstore(0x180, 0x1238beacedd4f53b35b578af1c30c077f4289680658fb26ae1b4c0b2f710e604) + + mstore(0x1a0, 0x0d90474c262aac1913f37459d4f2055dade903de9bc02fa5fc7c137cce05fe35) + + mstore(0x1c0, 0x0f5aaf4827d5f40e00235ebd1cd1b9f6ebf3388383e692573b95cae4f653ad82) + + pRound( + 0x24713d85951736c77b66941c007d170282271958c98fd42d6b12696a7065916f, + 0x05cf2ad05c75de38238f63258c8dfce0d1b698dede7feea9a97b263cce815ceb, + 0x2d62695c7008a11d0c874b40395a695fffaaea6e6bfce85ae1580dc48218aa26, + 0x19e47227e74d5563126770fa5ba61405ea6f348565c3aadad0830b3ef5d775a0, + 0x20e43ff580378bafe2074a6b2fd50c74594537f98565f2d65ed8c15e5ca1084a + ) + + mstore(0x160, 0x0b488b6a875f238bc324f04288ad865c8577e8f906a971ad4bb9d91775645730) + + mstore(0x180, 0x275928b25e503c9c95c01b18a5d30081bb0cd31c36cd172bde1db83287f5f5e6) + + mstore(0x1a0, 0x1fde053dd87291d7e14f0f2e7b7461b49f60e4afc39cfdcde65d70f65c3b026f) + + mstore(0x1c0, 0x29b2c386816e9d3f76100e8fb9543329ff88ac29199a181358dc231aa1dd3e0b) + + pRound( + 0x2cdda4350f35334773cd823df37097ee967c28d62d0c45c34d0cee4008834893, + 0x1c0c8c2ebb6860e64dc46755a7e072795bc2c78832a618bb6a2d5d0911b7d768, + 0x269fa26069db1cf0cb705bc3584c0150b85642d4f243d5e68d7240b8e8c03276, + 0x09b443b0a7676575b9a6d3f003609fa7c7b6226341ac8389258881d994fa91c8, + 0x191b4697a8e295ab80f81b25743fe13f3fb6998e9131e99a86f22bd33e7bddbc + ) + + mstore(0x160, 0x16af0f387b9ba94c0ba6d176df30701ff378b3524680aafda4f7c4df4b088b07) + + mstore(0x180, 0x1bfad9c1a92234ed97c51ac7dc2d80f2e908c098b28bbe712cb75b92797a2103) + + mstore(0x1a0, 0x29bb5064073e9a6aaec7bfd94d48fe2207d90ea8962530f388442ca4d95e6256) + + mstore(0x1c0, 0x1cbe456ec3f8d8849e10fea36509acc3647edc3e765f4de7489264f5e34033e5) + + pRound( + 0x04987de3e3121811ec3c10421005e133fe1ce9c2aa7d7c54a26f425cd19767c5, + 0x19a23ba97426bfa81b757e35aa3559050628665eb496ed8732d409942fb6e16b, + 0x12333e97d1f0e3280b5e2f9d96561b2c04d001d2b393791a861fdc26c1b7f767, + 0x23e48a5b646d353895d06928a181d75ad25c95a7672f3a1f4917ca03baff3227, + 0x1b6bff423317d2c2721965972823ca2e93b8f2bb0a52245cedcd94587d596382 + ) + + mstore(0x160, 0x131cdc252f00cfe48cd6cb1b15344b6fec8b176c1ca5584d76d6f9f6ad26bb13) + + mstore(0x180, 0x1bd570cf878b3dc1616ca32bf55e0b3fd898444d0e70d64909ec789ff11e8eed) + + mstore(0x1a0, 0x1e5a54e71ef7b9eabf717c01dd99b7262c3b43d1d6960094b8e508d1e11f03cb) + + mstore(0x1c0, 0x21c88de360b36a24fb641014feceacee94856233dfbccbdd1e9f0f35c9e7fccd) + + pRound( + 0x0087a35062dbd735636f76cef6fab3b412749781f03b39b181495a62aae42424, + 0x1f1219145ff0bf15d9645e347879a7347f9a6a5f3dea9a9bf9495174d228bcc3, + 0x07f93fb41605d3cae1b42b92d527b2ce7cef14ad2b907702afa13d76ce02f88c, + 0x0ae3de8a6edd589ab62767e92f3c19efbf32115679d2629a5ebd26c1c7d34299, + 0x15b6688e877724b41ce08fb17695347b5eb8844423c71a98ebcc188c23888dcb + ) + + mstore(0x160, 0x2f0bbec7f6a255512df348122df4b91778775ace589d4657dcc1223aafbf2586) + + mstore(0x180, 0x180732ee6d3ae2aa4866158f54f4d8b980013cc671d68c69a72d5955678703d1) + + mstore(0x1a0, 0x05a0b0ba16b7b0631dbe2c92f9121284974a7033a69be30407bec6b153590703) + + mstore(0x1c0, 0x2908a5a3204a9a144f6565e561bbfe9a4b664edaeba4106e1a57ac77290193db) + + pRound( + 0x2ef387dc1012ae94898b8afc9aa54a3be1f91820b61ab86f45ecb3ae21e23ac3, + 0x283914da97f036349936af1157c536d9c2873fc3c1543afdbfc1c0c55cc6d5f4, + 0x276ad4f7ba33971e4db2292c7ff704d15a14246a6e7d76ea79f1189066dd42c0, + 0x24ca7fd6a2014d9821a624bf07950e8f64f5e6892d48e4a71cd4f63e9e2c63d8, + 0x0fe8f370d24968de4dec0fae5919d8f4f666673ecae78bd7e22dc2276364afd5 + ) + + mstore(0x160, 0x2bb9277b8021c5d354300da09101d24c72a842f97627a82065e5e67a22f465f9) + + mstore(0x180, 0x14f5ee46878e605585b3ded3fa8b9b7fd62a2017b6d2f30ed61339cca435e348) + + mstore(0x1a0, 0x114578668b59522fc7d794abcd2497baabd855f3fba503d5f5e0486047bf3fc4) + + mstore(0x1c0, 0x20bc06a35fe07cd507d0dd0a9da6987f228017055096ee68cd33eab3773a1146) + + pRound( + 0x18c860a5d2537a84944a1075e804c32ec66cb5979908a8ca8cd7f2d8a7029c0f, + 0x1ef80617b025bd54de5361dc2fb16cfb90c364e37f7a1f07ddb9ab292afc0e91, + 0x2ab495215ccdfda498510f6d5dbfdac1429464e7788a229feae561be3d62c2c5, + 0x251dc073bf23010a06bea25560e1be3ccb2c38e67d64eac680aea6c19952a7ec, + 0x02201c3662a59685a511e2555643567df50772e8c150bcec0943a8af3f106847 + ) + + mstore(0x160, 0x100a3118e3248ac400e6aab0e4e6b10f07e96de582c2c923a99cd14e45d6f209) + + mstore(0x180, 0x15872dba1f1047ac1faeac076b57513ad92ff71b6a6a2b32f27adce084894e10) + + mstore(0x1a0, 0x1f68a35d81c05733a573076ccd7946a4039da22e42959520737e4a6843283fa9) + + mstore(0x1c0, 0x2a165a1a2b018ab2fa4e581d7cb567d9b1515db27ea710af3683a8919e99a282) + + pRound( + 0x184801f655e82f8d32b94fb0612baa4ec983d1cd94cada67237670051d5fac5f, + 0x1404d5fc7a2e8940778158fb2d303364892147a64bfee54b25d3906ab5b3490f, + 0x251df4335e5164fcbbae73beb8cb57b809d71cb59d6e303db0560b0c1ee79e0f, + 0x09a45be49f35c4f987b58d749c78c69082486d3f8777eba4103eac7190faad57, + 0x2ede228b9b96b21dd5e1e6ea260a87f902c0051f1f203c788fb907df00e51177 + ) + + mstore(0x160, 0x26c9af69ab4a7e08335cdfdf33ce102a14cfafb05ad000afa7383f01b9b5b892) + + mstore(0x180, 0x14bc5140566915518f20d51498ca60f6e5e48678f97c1bb58e17af4db8f232d4) + + mstore(0x1a0, 0x22fe06bbaccc5b18b4a8bf2cc8c47e351291bacee5c5226fbd0cdb308734339c) + + mstore(0x1c0, 0x1dca1403773581144b083aa9b9768db5a81902626de0d81d80f53d75d247af04) + + pRound( + 0x064ff94b98a0588aa924e943ca627fcbd2ef854c66f917ae526f719fb40c6759, + 0x1c8349f898cbf2d1fe6db936c53bd3564b673b72d673aaa39f9691e08283d5ef, + 0x2e4628a8655d2fc84a32f10e0a95e92d0576739c07050bcb0158f156db6e7c5a, + 0x0068316de71fed80213380a8757b3a9d517e7ea1e4800a22c510755a4a1ec152, + 0x229e32cdf952fd49ddac8bacca9ec0a85b9f5f1e8b4ebbd995ec5b8289a54289 + ) + + mstore(0x160, 0x19cd3a66216e859e433f64e4f9f3e2ad9c58d993ee168ceae5ebed3049ab2f87) + + mstore(0x180, 0x0d01aa823ee846c2cb695543c8499803101fc0ef222e3c2b44d8680e8a76188e) + + mstore(0x1a0, 0x2e17901918cb6f4fad9ac0d387757aa77c7207924e177d0826ebcc45c76488b3) + + mstore(0x1c0, 0x2e30cc49639069e2101cb479c7281e8715ce5f34d17c016430a9fa75bf484ad4) + + pRound( + 0x04152e8ca329e892a4503613f3472ee94b7e3025a592d4625f420c45c56a1f52, + 0x13ce7edc9f1c7d2ed533026150f2bb6d261f379f1fbb48a8d556cc5ad7914e36, + 0x24f4fa36a48be01d0bbe57854d48399d81ec03c394fb2eec544a631f4e1cb1de, + 0x26e0659af8c838aacc352710f1433d9df9ccefc47bd5c487a0b3c29a01e559ec, + 0x222f80f3327ff730c8ca585c067b5ce946724707601b7a4a72476c4f73e7818d + ) + + mstore(0x160, 0x09220ca57e2ddf5a1b2f2971627d1a74b7c1b837ade64a37e8e1f0d436051a7e) + + mstore(0x180, 0x22ee5c6d36a980b7a428f8afc999eb09868adc52b4fccfdb68b3f5fba518e03f) + + mstore(0x1a0, 0x1b70154b6e76cf9bcf4411203db1c19c77bc0ca8bef907ae8a4b4aac270842c1) + + mstore(0x1c0, 0x1a2ad9a834a4d41bc0d5bac3b7e9453100f58c8605fd112ef6b7a25baa7dfb88) + + pRound( + 0x18694d18fe6758b36c38ac70d1344c6d2b70249db92a74e1404683b2f00dee5c, + 0x2597efc11329ee3e0c8bd40b4a78681738b4c52af4e55fb5be529996b56bffbc, + 0x003ead8cba0d24715aea9ff5443d25ee640893186e6ff6c045dfc91edbbd1c94, + 0x1e17e4583d68f0e1e7234d41915f2fa3c7b7c04cc2afaabd7f3bbe071cf1ca2c, + 0x2d05098ef2828d71e8758837f5c973ec97b7547bdfa1433a5527168ee9f9d5c0 + ) + + mstore(0x160, 0x29dec9bfa2a12f2fa1bc9158dc1d3d1ebad1d849fad58d34163d741923f8fdac) + + mstore(0x180, 0x27d590c95d3dddcdd43e3c40f7579dde645f33c7b0ce03d55e07978096257f88) + + mstore(0x1a0, 0x0c32e71be02fa8302d8abcb8ab2c6a3dc4e962e75955401c1e6a66157dfb965c) + + mstore(0x1c0, 0x0cecd591ea4f3cfe0c7d3edf52f4f93d60a3126433bf9b9e47710d298c31e9d3) + + pRound( + 0x075aa06f43a273433cf8ee196e8577e5fa28844595b1f2b36f6473ffda38380d, + 0x070f884d5d0093ff75fb09ce934c8733008f994efa4f556520f11ee8bcedf82a, + 0x07d5a9301209de0fa56d9dee45f8480b12d33a73be02f078f7b9df6f9225ddf9, + 0x0100dd4a2833b127fd800d28af04254a018853218ce565a8f615995a0f2466ea, + 0x164c79e2906202e73bcfb8105c5c10829397bcb0089ce03bafc5f0e627e0d836 + ) + + mstore(0x160, 0x0ddef510d2c7ba32e4331ddba93aa688bb9fb86173625037b86ba4c62a0600fe) + + mstore(0x180, 0x2339cd5cb769acf2dafb5073bd988be15a65bf8ad06c38a82d38d317f0febe8d) + + mstore(0x1a0, 0x26fb4a101c97c06acc999150483d44aa762b585c422bf8dcb37afbfdf076ab49) + + mstore(0x1c0, 0x077d5874dba21d260cb02f280c5fdf78fb8ed9e0acada998ab5cb833b09d1858) + + pRound( + 0x070627a0421fde844216f5f24789b3f54d44f1a06184aa81f75aa227335f264e, + 0x116f5232abcabac8a8b9f1a3ac86bfa97fe285811ec2cfd733f1206f449d1de6, + 0x2a8ecaecf1355850d03fa2f1a7904cf3a2ba7d3bae30aad7a35cfb4a6d7dbec1, + 0x252ee8a2dfbaab265c060600b3f6e19f24e491ddd37195211f95918d3d39b911, + 0x23ed5e73a4223df85afe948fdef2b6e0d3c120aa31e2f1b4c89054d5218258e8 + ) + + mstore(0x160, 0x0be3e9d472b8118ce3d01a92fc168de78549347b44526893312fd5ec3d2726ad) + + mstore(0x180, 0x27fa8f235db616a5909a2f31896dc8de9594798707b477f343b48ff528e49b8e) + + mstore(0x1a0, 0x17226412ab2fab6223eeda0b848333816a4dd6495e29ca47ce8b96f8c87aea21) + + mstore(0x1c0, 0x008a2aca609e6344086eed8a710a35469bdce68646a435a6918277a21d03d4a8) + + pRound( + 0x22ddb2bebc8cd1c946f8522d7326702328511313b40b4a9e812b69aeb6113220, + 0x2e7c43c6222e6323f682c05c571f6aa62a3da64be2c3f381698e2c0ddadc93b5, + 0x19ee0e60fc2da7a295371c667ce850772acdbbfa0a9eab7a7c94a50c9c682de5, + 0x04d46d32c131ca79258ef2c525659b8138c0e199ce5968e57a82e780f1fa79b9, + 0x2ddd25bd37dea23386a030f4bcc1d4382635a6dc7ea3cf3889a5e8faca46bd82 + ) + + mstore(0x160, 0x0f425f81861ada856f01fcf0d5ef108acea281735a913d24eea75b55833b328f) + + mstore(0x180, 0x1e562f2a3a83be1321eeaf564fb19f57aec9c66e6cc8fda18999d5baa0b4630f) + + mstore(0x1a0, 0x0627d8f4c1a8c8f8c5e1eb617598954aa814a756782e2cd85b79e8e1e748c705) + + mstore(0x1c0, 0x15e5ad36f719cca83a41f67782388cca380c25992e5cd14c670fd3c317b0ea5b) + + pRound( + 0x27a10619eec3b5211b7ce9c318df7edfaecf7bc84098dc1c58232ac25093e35a, + 0x06def2df638eab9899865393563ec8bc81897fe0f1adc5c0499755f25497fc46, + 0x0c86bd5b00467b98563b7ad1b362a058538a7faa110a438b9d0ec7be8c50c098, + 0x02237c3870ca51c0c9daf086524707a78be8845df471e4d4fb3f2e7f30d90214, + 0x2aef4c14a514a36ce1afa9f2c5f1ede8d00530e01e2a704d70494cfd3c2982cf + ) + + mstore(0x160, 0x089b6683b1f849dbbab0f1092ca04880f8b894d7f8bbcb95cade4e736ea28998) + + mstore(0x180, 0x2c2dd8e6610a0495784aa08bb9661fbe25c908396b5c3f2bd51109517fa28162) + + mstore(0x1a0, 0x2b9627b579ec4019306886e1ff4003aeb3a33249be5cc6b56dc3607b17e42477) + + mstore(0x1c0, 0x178f70a99501a6e05bf4ca79b2d6da47049f8c988936696519344ddd931174f5) + + pRound( + 0x0cc8d138d0854f9b62697b7791da960be500e3529cdefd4f0b18d16c5e757ce2, + 0x17ff555b52d28be1b3c46c80946df519e9de247d2cf8d8175086f975d24c1e8b, + 0x0fd5dd57c2cede876671978d2fd289aa0a02693252b74f7fdee8bd404e6c79e6, + 0x203144a77c72ea89fcaff39b141def7e93a1da1fb9e22b7d0c6733bd72f06f69, + 0x1979320524dfa45aa8ef35eebbcf6f621e1c855b5704d8bf755bed7daaf721d4 + ) + + mstore(0x160, 0x123fc6d306f17fcd5a4309d4fe6e0cc1ca00fc23ea9447a7c6b68c7f6ba50005) + + mstore(0x180, 0x22162170a1f845eb0aa1ee7baea486212a09814a9557bcb9fc72cf90f0a29961) + + mstore(0x1a0, 0x13e385a5cd2fbda978dc7740e927ce8d422c9ee861c43036257242484e497e3a) + + mstore(0x1c0, 0x13bebd80c2022724017d8e3eb84c269810cecf47f9f57e237bb4be69410a7803) + + pRound( + 0x224ffa0f9d0d57eb0c7d718e99cf3b6ba01b523548ea0ca23a3f156c04083abe, + 0x00f2ee1e2be1ece2cd8aef1dbfc826997d304d88cdee555ef67a799759c39ed4, + 0x25757740ab14ca93745a76000e24328eb1a3d21d3cbed1930dd1ba2cbf7de236, + 0x0fa6b963bc65bd930510b3ca6e1ae62c1b4675edf79ee79a7f280eae6496f16f, + 0x0ccb794ddf870bb92a9cba5f859fb3cc3f4eb1f1117d14c1caef37beced0e32d + ) + + mstore(0x160, 0x1d69a3852720a88758034d954dea602e5989114a4667251b0da5915412ac5ff4) + + mstore(0x180, 0x1b8e232710f6c1ceeff9c1086d49cd8d2e647f6926da913cb5e10337d7f3d7e5) + + mstore(0x1a0, 0x2d40d3f8e6f9e3aa6014c69630dbfdf3169f88067574ffc9210f7da599c4fb3d) + + mstore(0x1c0, 0x24e1c2f60b1cd36101770cefc4334a8c02f00cc696df64f76df54a6fb6f0508b) + + pRound( + 0x13ed291502566a7033b4c4607245156a158a6fc84f4ba6f0246c1de057d8ff1c, + 0x2ffa06928536af91c7ac3b7714f204e26c541142742179217095a6e54f743247, + 0x2a6df655e926c4aa029749aaa7c9a40a10fd55a368624c148b5e528d4313183e, + 0x27d8531ec6121a3eca74db524323fc100db502a580b8a4cf8651f1bf6b9b0238, + 0x1ea104a44d82fbe1bc1ccfd4626cea0c06693422b3846b3a2b4aa12a3b0e747d + ) + + mstore(0x160, 0x1cc0af33d07e50b2adda3346723006250fabad8fa3ddb365c1d8582f4dc65f14) + + mstore(0x180, 0x221f2bc4b7dce9195f9ca9ce8fdeaefcb05440c20dd9754bc59c11447caecebc) + + mstore(0x1a0, 0x18ebd5c63b0bf20f45d238fd0cab5dec8dbf1996bcd1b3489f3c2499ecf92b07) + + mstore(0x1c0, 0x2f338bc5a586f2774af3beb92aa92ce8e58a5efa19ddc891be47a5e77e9f5a4b) + + pRound( + 0x2408f2eb6b1e958ccadbff81c9a44913ac0c9cb5cbcb4b4054017abb3db8c04d, + 0x0e3c6ecd281ba2e16aa37dacd2abc38eb07c1353dad96e87d14e5ea33ff8ecde, + 0x248c7cfb7ba2e71819bfc755eb9e9a306cd0f6e3212e254090f0006d9ec543e8, + 0x267fdcdeecf69d799e79f68632217df51226d8ce39574d72b4ae4f39d21721ed, + 0x2bd9173ef276b7d4911ebf78dd15342eb261603c2c9afcf4ad831de9fa34bab9 + ) + + mstore(0x160, 0x0eb8645b0d2b8f0c3927d4643574c0b1a588272465d319e15fcc6c3262191aa9) + + mstore(0x180, 0x0e48af0cb275af55deb825a34ca48904a47c31b5592c4afa9077d60e5e7ea655) + + mstore(0x1a0, 0x17dfbac5a26f06fff967cfef597a6da11b5bc894ee6b62e626a62e85a3ea4b66) + + mstore(0x1c0, 0x0dffbd016ffd2b795226a83edbdb3c5a6f78917d7fbdbbc1b3631027c866aaa1) + + pRound( + 0x0556b9c3784145eb4f2ff6e0c88f41989da5907f8c7118ae492939bfe4e9fb1e, + 0x1ec100367f65684538bc6956805ed37051238a3637e47022a3294cbde38b2284, + 0x1645a29dd4527ab91a4b798c7096e832073c8baac6e5db87e26c215bf448f84f, + 0x22a78abf7d5b362a743ed52ef2737bbbddd375e9b3bfb42409a95ad105ac9350, + 0x1a9921dead26c55aafb3ac9f3f35acb61a49d5f181e8036540830bb18686eb37 + ) + + mstore(0x160, 0x2e78d35e1dd86776a4ddaee1192c055aa8676363bfcf3165317dcc98017e6c75) + + mstore(0x180, 0x19f6e589ba384db3c36adae4bc034fb9a444da42164b6ef289009a2cd7d15a6e) + + mstore(0x1a0, 0x09fed90b1f10f84f6739bdb1b4b508957acceadace687aa735dc9f6ab14404fe) + + mstore(0x1c0, 0x055e35bbef7ce5ee7a3603222e09005dd5192adcd70dc33721714137221f4831) + + pRound( + 0x2f948d5f70856b5f23a4338d244f6ba7e7ebfc750e16ebd1e2c2d13825094310, + 0x194c9f7615cbe3eaa0f885c59e420bb89dca60fe174ea321d80435301511713c, + 0x16e81a0540143cbbe662c7ae726051ec663d621562fb3701240cbfbb4b17b3cf, + 0x11ef0c2d88131f715e47e9a4953f789fec78decdbeed34bc8eaa42927ea6eee2, + 0x0876e45a4f862901bfc620a55951802a1d1d5c3e1414308db7d548400f668535 + ) + + mstore(0x160, 0x0854d9c3be72187a2f198590decd43943c5aa6140a858f21595b9a08da85b323) + + mstore(0x180, 0x1e3d592b71a473c85b2104acc1d8db8cb9101a3cce55c66801a0d379497deadd) + + mstore(0x1a0, 0x1eb27377cfa38a3967a71e697725c195bc1d7ce047e83d0e069dee8b95a9a70a) + + mstore(0x1c0, 0x0045b9fd1e0f115801232c7aaafb5e73bc2d657c47b122f4e3ea30a659bdd9be) + + pRound( + 0x05e8dc359ee98d3bb6990fd928ecf056f9bb736e0d47cec22a96e7cac65a9828, + 0x0c732297f8b0c272fac76944ee969930752a7bd3943c7b97e038bcd2315d290f, + 0x16703fb8b02c94ade315d5b62aa1bf7834de248310887dc13cfd13fb6c2a10ba, + 0x28715ac5265d7a812af4e39e43bf9ac80059635d01fd6fe40f3f1e059d7f7f4e, + 0x2f683b0027994e095e71eec8475730fe227b480a6aca67ab1593ce6f837bcaf8 + ) + + mstore(0x160, 0x28b749b2a9becb34665e38f3c49b767f20738a481a7a76a19bf1030008a252b3) + + mstore(0x180, 0x1f5252eb629922c70f2fc1b5ec5ea0a0e0acee47da26c40436c3f1ffca690356) + + mstore(0x1a0, 0x29324c40ee7bc85d33a056c3fa8f44d6a7724da53ccedb3e56cc26b73358aa0e) + + mstore(0x1c0, 0x00567e9bd8a2b947d75b376a9a1af17bf8bec6c9abede582054fb3ecf7860cde) + + pRound( + 0x027aefe3d1130e9394b61a804dfe2231d68295910dd39245f1e1de65a87dba6a, + 0x2e4c5fa1a42064e556fc50dd7fca7b48625e4c169415487d4df0482a9b1df4eb, + 0x05767cb28f1019a39627a19196a7e4672e82441be0b90523c7b9b9f74dd3315d, + 0x17e443e32ab352d209d3e038d1364b24eb3f945e99a6809502c5439c807fb4dd, + 0x017a0c0d83cead8ffb70978edec1bf3c4acef4a2cdcfd8c335bce42793513e43 + ) + + mstore(0x160, 0x18658643fcb63644520c0fa02dce232935a4ce8d7b733a9b17a866e50b3ec8a9) + + mstore(0x180, 0x2fc94cda5238fc785871bca97960b299ed0df05f6c6b28a3834865fd4974bc21) + + mstore(0x1a0, 0x1a54a91a89dd7e0ce87530303c12ef76244fcf42c38db35513d65c6d5994ab6f) + + mstore(0x1c0, 0x15610d8d64ba02952f4170eaf42a27cfb2d13f04d4673537b72510c5c4c3da22) + + pRound( + 0x1e96bab6ed6f45550f2621c0adad747c2fc9988485f6184355c3176d5c11e8d6, + 0x08d47dc23b1ff527992c9eddc91259a748f6cd7c1f61874a0836f599e995a399, + 0x22733cdd318150f40d89d1ac142f26750809a0b888c85743af671050cf6736a2, + 0x2168174bb9c45be2ee87441174a24fd41de6bff4a377803025864c5ca1927347, + 0x0b48fdaba88524ef8d0495ba63e8713b65af4a9267b5d62083e7b8726043a1e0 + ) + + mstore(0x160, 0x1dc5bee6477d7e7879fa2f33ba9adce878a57fad3845e7c9eaf4be54ab844f61) + + mstore(0x180, 0x1f16f7f1cd61d9563e064c86b508afec41d614abc7b34bb45174b40d3877155c) + + mstore(0x1a0, 0x28df04cdd7f79cb06fbf044e631ab11fadf9691e4ea5f6209f8751af58c8eb15) + + mstore(0x1c0, 0x18aa6490047ab52105dc1e60f448762461b7075d38a7c0b2ba95646526588fb6) + + pRound( + 0x13597b4707657f437ee42087cf8b589042b277467d8a0436cf66ea44a6661212, + 0x2dbb95e5114e740028bc5edf58b2e9fc7e3871d3f16ad0c3845d5e961a87837f, + 0x2cb3a3e7ce16cad9596eab92d772f6b8afb43cb6492b2c363ec71e11f86c52f9, + 0x286e8b9468bd2d392dad5d90ef65d28dec27de7147ce50b8edffeca5d70020a4, + 0x166e762a73b519001d753737d7d908ef226237b077cb76ed9f6bbfcce9989317 + ) + + mstore(0x160, 0x0dc489dcf61aba1104925eb9439a4f44228d06dd4567fce1444965a749567975) + + mstore(0x180, 0x104470f92923d3b9dafa39eabdf7eaa23b6ff11b2ebb64a63bdb912d43865fa1) + + mstore(0x1a0, 0x14a490ce09c929505ad223e2f397186135aa6586b27cc9ccd4f78efbec993a6d) + + mstore(0x1c0, 0x206893bb747ca2504461fb24a2f72eae4cf330835825fb8ac9563fed9a7853ea) + + pRound( + 0x0076ab8143a290792147c6a6465c9a83bddf4f65388cae8357bc6bd9400ab99b, + 0x2616217a94f407053cef3b234cc11acbbd2e344b403bbd8a26f821bcb6f1f8de, + 0x2296862cb9a14424a34d3a11080d6ed5bfe1bc4e0301ec1cbd4e260d81675684, + 0x0828428022a299903406314c159732bc0fda227a3e7a40a4834e513f3ef97c53, + 0x0771ff9f397469dda6f20cf1841e702c1780a0719b3f590175b394f38279c77b + ) + + mstore(0x160, 0x2042016e686c984057a28aa2ae13c981ad8dd02ac7d4663005e1380c54f843b2) + + mstore(0x180, 0x1fc295ac71911a59a81d087f967f16a3a887739d7cee663fff5d6e0710cf4a42) + + mstore(0x1a0, 0x05922697b04ae608cc3bb0d9d345cadeaf4fa291de888e9b1dd32c19cb1a8777) + + mstore(0x1c0, 0x271b87d8b895c6e1d864b9cd030729e523bc90b469cee37b51144bb3b0e4b9db) + + pRound( + 0x03c2a738e753f35b068c6ac8171244c23fbd4f37c80ba508618c800acf626546, + 0x129edb7a013029be80efc7400212cd7af1308100d34a569ef3646b52cfb06e16, + 0x0874b0edfee05d8cddac89e7b562f917c7ece1ec2e262f226f4d1524a1ddc158, + 0x10a0bab2786cda30537c696bb1ffaf898078841896f7be41cdf30ad2517b2aae, + 0x0bab661c2a17fbe0221f435ba90520bced928364cac984e17a6c72a47e13fc2b + ) + + mstore(0x160, 0x187cffd76c5fb29795523ebe065c9c2115e73784ac6b15c596fdd68469d1ad0e) + + mstore(0x180, 0x18d2ff882c52b396a8c068f88c3d23f9d11d9f91c0f7fde9ef6af2180a007392) + + mstore(0x1a0, 0x0a878a77de615e83c3d430f11f326b785c1ac114e599c24e5adc1d9fb91b31f3) + + mstore(0x1c0, 0x286b9c6381700288bcc75d020ea09c45957a615576d7620a0b9af2609d39afcc) + + pRound( + 0x24aa401343e4705f22900fee892cca269d0c0ffab8f55c21c674edb9d7bba552, + 0x1b07068cafe17b55b5e00f7037c9ac37ef0268d5d2b76d7271c617004f05922d, + 0x1e35bad319a036cc6a2094f2a1bf2d1984a2b74aaf3e5b13a6ee30c90097cb33, + 0x2ab91b9a85ce69e7bea68f4fb5b1fa0903945e039c4ddbe05eff2d5e754fc219, + 0x21e979fa3a2594d2365ec70b5b3e0ddc5edb8e28fa7ec307aab14b547858f666 + ) + + mstore(0x160, 0x1919839ad91604c370f237d2a0aa98efac29246f93c24a1bd0f9d2b60709b6fa) + + mstore(0x180, 0x15bf65b02b92f40b9f0ea893ddbb0572f49375acb5958bf944c77ff6c3561a41) + + mstore(0x1a0, 0x122e02f2e0169809b22def001acc797b202d335af7bd2cf032e3a7c75ef033b5) + + mstore(0x1c0, 0x12075100dddb8098654e718605211f7f6a21f5176d380141fb39977305182469) + + pRound( + 0x1c4e5ed7db96db52059ae2da709879d489a1ac5031c35ee1b6c422d9080c3f12, + 0x27141679bb9260a693b880784ff5fbc5d59457b96630e0a5c04912092a4d2abd, + 0x15e337c65fa58edb6a74fdbe7cdd1901b5d019ce7dd4144a8b49eba02bf085fe, + 0x08256792218c8227eca89f5114f1e7f091d88a557c69b2a956fd2dc90cae3631, + 0x0c08d19af9c30a31acd3928ffb5a57de5e83367204ee67209ee7ed1bca5185da + ) + + mstore(0x160, 0x0079e1be1622edc5742e4f811ea2c0379bff4fa82b79fde5d0c9a0d174df130e) + + mstore(0x180, 0x27e48eabb0ef3b22305ab720ee4c7f414e8d4dbf4360c81d1ffae4d7683f637a) + + mstore(0x1a0, 0x15571becc7f5454e45ae416a6b3576274767215f659c91ba354372d999881d5a) + + mstore(0x1c0, 0x2e6a4545ebf7c2e44af91ca7192eec4aedddbd2ac1df4f5101f7f8cdd316655e) + + fRound( + 0x2dadbbb8fecf5ccdf01f73d0cc60b15f1bbef018a63f50f68d00b72d8adf0878, + 0x14334ece05a631ab375e7cfe7b89fa0d8092ec0cee24c9fa3009edcd62ea8b71, + 0x09a51856d49ec654f7d44aca57b174365ba5479d8714a09f0f6de08b34e3942c, + 0x048e8feea9b828528dbc63cd3d811ed05ce9de018f4a4647ac1f685bb8f6715b, + 0x204ba6f18193f747ff10980957022ecaa8fa4c13e7fa4e89730a76253c9b07f6 + ) + + mstore(0x160, 0x281de0191d30af73105e39dc174015d65dc7ff12d20888d02cec650e1a245a3a) + + mstore(0x180, 0x0f7e76af800ebab14281645d290607eabb062bf0afe1419133e1ffdcf70c808f) + + mstore(0x1a0, 0x27ea405bdfc6557a4dd338a2bca9819547501f6f77a588a75c014d46283f75b3) + + mstore(0x1c0, 0x0570af543efefdfddab63fb05d31edcad395ac82381491a80c825c621c7ac22b) + + fRound( + 0x2de19fcc78800027b1932cdf6f9e959208606cbf8a07524457492867f8f6bca5, + 0x2e1ca8efd1876e209fc2d62cb14446e8f3c4bdd53d6382ca86b113f3209d55f2, + 0x154b3f85eaed8b65718e733ca2ca7c8af03cf8f23befc4d7c6177ac00ebad368, + 0x29e58f39555d9dde7bac3df18d8eaeb2a5a50503860d20c5cd0ba2a2cf6373bd, + 0x032d32032e52103ad798fb36ef7c0681504cd2d86a12c7d937ff518e57b4c3f0 + ) + + mstore(0x160, 0x0b7a6e33808d217a9e55c23871cfdfe495c10d62b8b981784b0487e63df03e0a) + + mstore(0x180, 0x28ac790d462bb345ab80cd1670403943599b79edef17cf70236ecb1ef872cbc9) + + mstore(0x1a0, 0x2f8d745b1b4750fd2f932f7913095515c498be314210180c6c3077231226bb94) + + mstore(0x1c0, 0x2a3ef20e60142f17d2f3b82eef6135079523956d8bc684092eecb7a7d56d71be) + + fRound( + 0x027a797e0014302478a413cede7a45cd894b0a229c8e89f56ebaec4c46692bfe, + 0x1dd0e283a8ef7d0f4966a517687fc53243554a8d3c7e41d91719b36bace81516, + 0x2006444695987560869df6dcde2673e5b73ee5bccbb43a05c2d8be6c59979242, + 0x271926392e5f1c94437afe2c2969bea4ff3f6d83ee71394008831d24bb1b6cb6, + 0x1b607ed2f130580d9a8c20ea26b33b478d6e1f00cc82f00176935a8b54cabf8e + ) + + { + let state0 := addmod(mload(0x0), 0x08119b14b83922e4b224697c2c6536cf772d067489d42672b988cb638c71a0f0, F) + let state1 := addmod(mload(0x20), 0x1a4bae6c9cf73ea22739a275bc722c8cc83d91e7ddfd5110614a52d84ce73205, F) + let state2 := addmod(mload(0x80), 0x1d659aebe4b37b888be3a7d7f23e362c250046c09d5326312d8d94cdb384d1be, F) + let state3 := addmod(mload(0xa0), 0x28e2fb92bf6da4e6b96730479f170760564458d95f732aae2406af4c03969f8f, F) + let state4 := addmod(mload(0xc0), 0x10f4ec3ad6f3ed3387729990456c9685786ede8e6e14b7c66311d47b8778aa68, F) + mstore(0x160, addmod(mload(0xe0), 0x2ad366d90419107866504d4d34346e0a3c595de6e0aa51c805272ae1bcddc2d8, F)) + mstore(0x180, addmod(mload(0x100), 0x02f1dc29a06c64c9e43d3379db0f2e8f0cd8f80351724d313ca02ad24c6dac81, F)) + mstore(0x1a0, addmod(mload(0x120), 0x20086a672c397e65cb37cfb64ddab08074f173f37d0e4a1747b7f020652da64e, F)) + mstore(0x1c0, addmod(mload(0x140), 0x0ef2861f4ec9ba5fec74ba22c0b7af9d458c3cd8f90c825c1f36110ca2ee9076, F)) + + p := mulmod(state0, state0, F) + state0 := mulmod(mulmod(p, p, F), state0, F) + p := mulmod(state1, state1, F) + state1 := mulmod(mulmod(p, p, F), state1, F) + p := mulmod(state2, state2, F) + state2 := mulmod(mulmod(p, p, F), state2, F) + p := mulmod(state3, state3, F) + state3 := mulmod(mulmod(p, p, F), state3, F) + p := mulmod(state4, state4, F) + state4 := mulmod(mulmod(p, p, F), state4, F) + p := mload(0x160) + p := mulmod(p, p, F) + mstore(0x160, mulmod(mulmod(p, p, F), mload(0x160), F)) + p := mload(0x180) + p := mulmod(p, p, F) + mstore(0x180, mulmod(mulmod(p, p, F), mload(0x180), F)) + p := mload(0x1a0) + p := mulmod(p, p, F) + mstore(0x1a0, mulmod(mulmod(p, p, F), mload(0x1a0), F)) + p := mload(0x1c0) + p := mulmod(p, p, F) + mstore(0x1c0, mulmod(mulmod(p, p, F), mload(0x1c0), F)) + + p := addmod(addmod(addmod(mulmod(state0, M00, F), mulmod(state1, M10, F), F), mulmod(state2, M20, F), F), mulmod(state3, M30, F), F) + mstore( + 0x0, + addmod( + addmod( + addmod(addmod(addmod(mulmod(state4, M40, F), mulmod(mload(0x160), M50, F), F), mulmod(mload(0x180), M60, F), F), mulmod(mload(0x1a0), M70, F), F), + mulmod(mload(0x1c0), M80, F), + F + ), + p, + F + ) + ) + return(0, 0x20) + } + } + } +} diff --git a/contracts/Test.sol b/contracts/Test.sol index 77aa3ab..c480ce2 100644 --- a/contracts/Test.sol +++ b/contracts/Test.sol @@ -35,6 +35,38 @@ interface _PoseidonT5 { function hash(uint[4] calldata) external pure returns (uint); } +interface Poseidon6 { + function poseidon(uint[5] calldata) external pure returns (uint); +} + +interface _PoseidonT6 { + function hash(uint[5] calldata) external pure returns (uint); +} + +interface Poseidon7 { + function poseidon(uint[6] calldata) external pure returns (uint); +} + +interface _PoseidonT7 { + function hash(uint[6] calldata) external pure returns (uint); +} + +interface Poseidon8 { + function poseidon(uint[7] calldata) external pure returns (uint); +} + +interface _PoseidonT8 { + function hash(uint[7] calldata) external pure returns (uint); +} + +interface Poseidon9 { + function poseidon(uint[8] calldata) external pure returns (uint); +} + +interface _PoseidonT9 { + function hash(uint[8] calldata) external pure returns (uint); +} + contract Test { // Benchmark poseidon-solidity function benchmarkA2(address p, uint[1] memory inputs) public view returns (uint) { @@ -96,4 +128,64 @@ contract Test { console.log(g-gasleft()); return r; } + // Benchmark poseidon-solidity + function benchmarkA6(address p, uint[5] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = _PoseidonT6(p).hash(inputs); + console.log(g-gasleft()); + return r; + } + + // Benchmark circomlibjs + function benchmarkB6(address p, uint[5] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = Poseidon6(p).poseidon(inputs); + console.log(g-gasleft()); + return r; + } + // Benchmark poseidon-solidity + function benchmarkA7(address p, uint[6] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = _PoseidonT7(p).hash(inputs); + console.log(g-gasleft()); + return r; + } + + // Benchmark circomlibjs + function benchmarkB7(address p, uint[6] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = Poseidon7(p).poseidon(inputs); + console.log(g-gasleft()); + return r; + } + // Benchmark poseidon-solidity + function benchmarkA8(address p, uint[7] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = _PoseidonT8(p).hash(inputs); + console.log(g-gasleft()); + return r; + } + + // Benchmark circomlibjs + function benchmarkB8(address p, uint[7] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = Poseidon8(p).poseidon(inputs); + console.log(g-gasleft()); + return r; + } + // Benchmark poseidon-solidity + function benchmarkA9(address p, uint[8] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = _PoseidonT9(p).hash(inputs); + console.log(g-gasleft()); + return r; + } + + // Benchmark circomlibjs + function benchmarkB9(address p, uint[8] memory inputs) public view returns (uint) { + uint g = gasleft(); + uint r = Poseidon9(p).poseidon(inputs); + console.log(g-gasleft()); + return r; + } } diff --git a/hardhat.config.js b/hardhat.config.js index bcae075..7b0f32d 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -14,6 +14,7 @@ module.exports = { networks: { hardhat: { blockGasLimit: 12000000, + allowUnlimitedContractSize: true, }, local: { url: 'http://localhost:8545', diff --git a/src/T.js b/src/T.js index 076b57a..c239c8c 100644 --- a/src/T.js +++ b/src/T.js @@ -1 +1 @@ -module.exports = [2, 3, 4, 5] +module.exports = [2, 3, 4, 5, 6, 7, 8, 9] diff --git a/src/build.mjs b/src/build.mjs index 1fa14fb..22bde11 100644 --- a/src/build.mjs +++ b/src/build.mjs @@ -8,14 +8,16 @@ import T from './T.js' const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) for (const t of T) { - // const c = genTContract(t) - const c = prettier.format(genTContract(t), { - parser: 'solidity-parse', - printWidth: 180, - tabWidth: 2, - useTabs: false, - singleQuote: false, - bracketSpacing: false, - }) + let c = genTContract(t) + try { + c = prettier.format(genTContract(t), { + parser: 'solidity-parse', + printWidth: 180, + tabWidth: 2, + useTabs: false, + singleQuote: false, + bracketSpacing: false, + }) + } catch (_) {} await fs.writeFile(path.join(__dirname, `../contracts/PoseidonT${t}.sol`), c) } diff --git a/src/buildPoseidon.mjs b/src/buildPoseidon.mjs index 113ee99..36b090c 100644 --- a/src/buildPoseidon.mjs +++ b/src/buildPoseidon.mjs @@ -16,37 +16,54 @@ const _ROUNDS_P = [ const F = '21888242871839275222246405745257275088548364400416034343698204186575808495617' +const MAX_ARGS = 5 + const toHex = (n) => '0x' + BigInt(n).toString(16) +const mul = (v1, v2) => `mulmod(${v1}, ${v2}, F)` +const add = (v1, v2) => `addmod(${v1}, ${v2}, F)` + const buildMixSteps = (T) => { let f = '' + const unusedMemOffset = 128 + 32 * (T - 2) for (let x = 0; x < T; x++) { const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x - 2)) - f += `mstore(${mem}, ` - const addCount = T - 1 - for (let y = 0; y < addCount; y++) { - f += `addmod(` - } - for (let y = 0; y < T; y++) { - f += `mulmod(state${y}, M${y}${x}, F), ` - if (y === T - 1) { - f += `F)` - continue - } - if (y % 2 === 1) { - f += `F)` - if (y <= T - 1) { - f += ', ' + const muls = Array(T) + .fill() + .map((_, i) => { + if (i < MAX_ARGS) { + return mul(`state${i}`, `M${i}${x}`) + } else { + return mul( + `mload(${toHex(unusedMemOffset + 32 * (i - MAX_ARGS))})`, + `M${i}${x}` + ) } - } - if (y >= 1 && y % 2 === 0) { - f += `F)` - if (y <= T - 1) { - f += ', ' + }) + if (T > MAX_ARGS) { + // split into two additions + let _add = add(muls.shift(), muls.shift()) + _add = add(_add, muls.shift()) + _add = add(_add, muls.shift()) + f += `p := ${_add}\n` + + _add = add(muls.shift(), muls.shift()) + for (let y = 0; y < muls.length + 1; y++) { + if (y === muls.length) { + _add = add(_add, `p`) + } else { + _add = add(_add, muls[y]) } } + f += `mstore(${mem}, ${_add})\n` + } else { + // one addition + let _add = add(muls.shift(), muls.shift()) + for (let y = 0; y < muls.length; y++) { + _add = add(_add, muls[y]) + } + f += `mstore(${mem}, ${_add})\n` } - f += `)\n` } return f } @@ -55,6 +72,7 @@ export function genTContract(T) { const C = constants.C[T - 2] const M = constants.M[T - 2] const ROUNDS_P = _ROUNDS_P[T - 2] + const unusedMemOffset = 128 + 32 * (T - 2) let f = `/// SPDX-License-Identifier: MIT pragma solidity >=0.7.0; @@ -92,14 +110,19 @@ assembly { // state3 - 0xa0 // state4 - ... -function pRound(${Array(T) +function pRound(${Array(Math.min(T, MAX_ARGS)) .fill(null) .map((_, i) => `c${i}`) .join(', ')}) { ` for (let x = 0; x < T; x++) { - const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x-2)) - f += `let state${x} := addmod(mload(${mem}), c${x}, F)\n` + const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x - 2)) + if (x < MAX_ARGS) { + f += `let state${x} := addmod(mload(${mem}), c${x}, F)\n` + } else { + const _mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `mstore(${_mem}, addmod(mload(${mem}), mload(${_mem}), F))\n` + } } f += ` @@ -110,21 +133,37 @@ function pRound(${Array(T) ${buildMixSteps(T)} } -function fRound(${Array(T) +function fRound(${Array(Math.min(T, MAX_ARGS)) .fill(null) .map((_, i) => `c${i}`) .join(', ')}) { ` + // for (let x = 0; x < T; x++) { + // const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x-2)) + // f += `let state${x} := addmod(mload(${mem}), c${x}, F)\n` + // } for (let x = 0; x < T; x++) { - const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x-2)) - f += `let state${x} := addmod(mload(${mem}), c${x}, F)\n` + const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x - 2)) + if (x < MAX_ARGS) { + f += `let state${x} := addmod(mload(${mem}), c${x}, F)\n` + } else { + const _mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `mstore(${_mem}, addmod(mload(${mem}), mload(${_mem}), F))\n` + } } f += '\n' for (let x = 0; x < T; x++) { - f += `${x === 0 ? 'let ' : ''}p := mulmod(state${x}, state${x}, F)\n` - f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + if (x < MAX_ARGS) { + f += `${x === 0 ? 'let ' : ''}p := mulmod(state${x}, state${x}, F)\n` + f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + } else { + const mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `c0 := mload(${mem})\n` + f += `p := mulmod(c0, c0, F)\n` + f += `mstore(${mem}, mulmod(mulmod(p, p, F), c0, F))\n` + } } f += '\n' @@ -154,16 +193,28 @@ let p f += '// load the inputs from memory\n' - for (let x = 1; x < T; x++) { + for (let x = 1; x < Math.min(T, MAX_ARGS); x++) { const mem = toHex(128 + 32 * (x - 1)) f += `let state${x} := addmod(mload(${mem}), ${C[r * T + x]}, F)\n` } + for (let x = T; x >= Math.min(T, MAX_ARGS); --x) { + const mem = toHex(128 + 32 * (x - 1)) + const _mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `mstore(${_mem}, addmod(mload(${mem}), ${C[r * T + x]}, F))\n` + } f += '\n' for (let x = 1; x < T; x++) { - f += `p := mulmod(state${x}, state${x}, F)\n` - f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + if (x < MAX_ARGS) { + f += `p := mulmod(state${x}, state${x}, F)\n` + f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + } else { + const _mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `p := mload(${_mem})\n` + f += `p := mulmod(p, p, F)\n` + f += `mstore(${_mem}, mulmod(mulmod(p, p, F), mload(${_mem}), F))\n` + } } f += ` @@ -183,12 +234,16 @@ let p r++ for (; r < ROUNDS_F + ROUNDS_P - 1; r++) { + for (let x = MAX_ARGS; x < T; x++) { + const mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `\nmstore(${mem}, ${C[r * T + x]})\n` + } const func = r < ROUNDS_F / 2 || r >= ROUNDS_F / 2 + ROUNDS_P ? 'fRound' : 'pRound' f += ` ${func}(` - for (let x = 0; x < T; x++) { - f += `${C[r * T + x]}${x === T - 1 ? '' : ','}\n` + for (let x = 0; x < Math.min(T, MAX_ARGS); x++) { + f += `${C[r * T + x]}${x === Math.min(T, MAX_ARGS) - 1 ? '' : ','}\n` } f += `) ` @@ -197,27 +252,35 @@ ${func}(` f += `\n{\n` for (let x = 0; x < T; x++) { - const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x-2)) - f += `let state${x} := addmod(mload(${mem}), ${C[r * T + x]}, F)\n` + const mem = x < 2 ? toHex(32 * x) : toHex(128 + 32 * (x - 2)) + if (x < MAX_ARGS) { + f += `let state${x} := addmod(mload(${mem}), ${C[r * T + x]}, F)\n` + } else { + const _mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `mstore(${_mem}, addmod(mload(${mem}), ${C[r * T + x]}, F))\n` + } } f += '\n' for (let x = 0; x < T; x++) { - f += `p := mulmod(state${x}, state${x}, F)\n` - f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + if (x < MAX_ARGS) { + f += `p := mulmod(state${x}, state${x}, F)\n` + f += `state${x} := mulmod(mulmod(p, p, F), state${x}, F)\n` + } else { + const mem = toHex(unusedMemOffset + 32 * (x - MAX_ARGS)) + f += `p := mload(${mem})\n` + f += `p := mulmod(p, p, F)\n` + f += `mstore(${mem}, mulmod(mulmod(p, p, F), ${`mload(${mem})`}, F))\n` + } + } + let lastMix = buildMixSteps(T).split('\n')[0] + if (T > MAX_ARGS) { + lastMix = buildMixSteps(T).split('\n').slice(0, 2).join('\n') } - const lastMix = buildMixSteps(T) - .split('\n')[0] - .replace('mstore(0x0, ', '') - .slice(0, -1) f += ` - - mstore( - 0, - ${lastMix} - ) + ${lastMix} return(0, 0x20) } } diff --git a/test/poseidon.test.js b/test/poseidon.test.js index 554a775..ae3161d 100644 --- a/test/poseidon.test.js +++ b/test/poseidon.test.js @@ -22,25 +22,26 @@ for (const t of T) { .fill() .map((_, i) => i + 1) const h = await test[`benchmarkA${t}`](_poseidon.address, input) - assert.equal(h.toString(), poseidon(input).toString()) assert.equal(h.toString(), poseidon_slow(input).toString()) + assert.equal(h.toString(), poseidon(input).toString()) }) - - it('should check against iden3 impl', async () => { - const bytecode = poseidon_gencontract.createCode(t - 1) - const abi = poseidon_gencontract.generateABI(t - 1) - const [owner] = await ethers.getSigners() - const Test = await ethers.getContractFactory('Test') - const test = await Test.deploy() - const f = new ethers.ContractFactory(abi, bytecode, owner) - const c = await f.deploy() - await c.deployed() - console.log('iden3 implementation:') - const input = Array(t - 1) - .fill() - .map((_, i) => i + 1) - await test[`benchmarkB${t}`](c.address, input) - }) + if (t < 7) { + it('should check against iden3 impl', async () => { + const bytecode = poseidon_gencontract.createCode(t - 1) + const abi = poseidon_gencontract.generateABI(t - 1) + const [owner] = await ethers.getSigners() + const Test = await ethers.getContractFactory('Test') + const test = await Test.deploy() + const f = new ethers.ContractFactory(abi, bytecode, owner) + const c = await f.deploy() + await c.deployed() + console.log('iden3 implementation:') + const input = Array(t - 1) + .fill() + .map((_, i) => i + 1) + await test[`benchmarkB${t}`](c.address, input) + }) + } it('should check many random elements', async () => { const [owner] = await ethers.getSigners()