/* The eXtended Keccak Code Package (XKCP) https://github.com/XKCP/XKCP The Keccak-p permutations, designed by Guido Bertoni, Joan Daemen, Michaƫl Peeters and Gilles Van Assche. Implementation by Gilles Van Assche and Ronny Van Keer, hereby denoted as "the implementer". For more information, feedback or questions, please refer to the Keccak Team website: https://keccak.team/ To the extent possible under law, the implementer has waived all copyright and related or neighboring rights to the source code in this file. http://creativecommons.org/publicdomain/zero/1.0/ */ #define declareABCDE \ uint64_t Aba, Abe, Abi, Abo, Abu; \ uint64_t Aga, Age, Agi, Ago, Agu; \ uint64_t Aka, Ake, Aki, Ako, Aku; \ uint64_t Ama, Ame, Ami, Amo, Amu; \ uint64_t Asa, Ase, Asi, Aso, Asu; \ uint64_t Bba, Bbe, Bbi, Bbo, Bbu; \ uint64_t Bga, Bge, Bgi, Bgo, Bgu; \ uint64_t Bka, Bke, Bki, Bko, Bku; \ uint64_t Bma, Bme, Bmi, Bmo, Bmu; \ uint64_t Bsa, Bse, Bsi, Bso, Bsu; \ uint64_t Ca, Ce, Ci, Co, Cu; \ uint64_t Da, De, Di, Do, Du; \ uint64_t Eba, Ebe, Ebi, Ebo, Ebu; \ uint64_t Ega, Ege, Egi, Ego, Egu; \ uint64_t Eka, Eke, Eki, Eko, Eku; \ uint64_t Ema, Eme, Emi, Emo, Emu; \ uint64_t Esa, Ese, Esi, Eso, Esu; \ #define prepareTheta \ Ca = Aba^Aga^Aka^Ama^Asa; \ Ce = Abe^Age^Ake^Ame^Ase; \ Ci = Abi^Agi^Aki^Ami^Asi; \ Co = Abo^Ago^Ako^Amo^Aso; \ Cu = Abu^Agu^Aku^Amu^Asu; \ #ifdef UseBebigokimisa /* --- Code for round, with prepare-theta (lane complementing pattern 'bebigokimisa') */ /* --- 64-bit lanes mapped to 64-bit words */ #define thetaRhoPiChiIotaPrepareTheta(i, A, E) \ Da = Cu^ROL64(Ce, 1); \ De = Ca^ROL64(Ci, 1); \ Di = Ce^ROL64(Co, 1); \ Do = Ci^ROL64(Cu, 1); \ Du = Co^ROL64(Ca, 1); \ \ A##ba ^= Da; \ Bba = A##ba; \ A##ge ^= De; \ Bbe = ROL64(A##ge, 44); \ A##ki ^= Di; \ Bbi = ROL64(A##ki, 43); \ A##mo ^= Do; \ Bbo = ROL64(A##mo, 21); \ A##su ^= Du; \ Bbu = ROL64(A##su, 14); \ E##ba = Bba ^( Bbe | Bbi ); \ E##ba ^= KeccakF1600RoundConstants[i]; \ Ca = E##ba; \ E##be = Bbe ^((~Bbi)| Bbo ); \ Ce = E##be; \ E##bi = Bbi ^( Bbo & Bbu ); \ Ci = E##bi; \ E##bo = Bbo ^( Bbu | Bba ); \ Co = E##bo; \ E##bu = Bbu ^( Bba & Bbe ); \ Cu = E##bu; \ \ A##bo ^= Do; \ Bga = ROL64(A##bo, 28); \ A##gu ^= Du; \ Bge = ROL64(A##gu, 20); \ A##ka ^= Da; \ Bgi = ROL64(A##ka, 3); \ A##me ^= De; \ Bgo = ROL64(A##me, 45); \ A##si ^= Di; \ Bgu = ROL64(A##si, 61); \ E##ga = Bga ^( Bge | Bgi ); \ Ca ^= E##ga; \ E##ge = Bge ^( Bgi & Bgo ); \ Ce ^= E##ge; \ E##gi = Bgi ^( Bgo |(~Bgu)); \ Ci ^= E##gi; \ E##go = Bgo ^( Bgu | Bga ); \ Co ^= E##go; \ E##gu = Bgu ^( Bga & Bge ); \ Cu ^= E##gu; \ \ A##be ^= De; \ Bka = ROL64(A##be, 1); \ A##gi ^= Di; \ Bke = ROL64(A##gi, 6); \ A##ko ^= Do; \ Bki = ROL64(A##ko, 25); \ A##mu ^= Du; \ Bko = ROL64(A##mu, 8); \ A##sa ^= Da; \ Bku = ROL64(A##sa, 18); \ E##ka = Bka ^( Bke | Bki ); \ Ca ^= E##ka; \ E##ke = Bke ^( Bki & Bko ); \ Ce ^= E##ke; \ E##ki = Bki ^((~Bko)& Bku ); \ Ci ^= E##ki; \ E##ko = (~Bko)^( Bku | Bka ); \ Co ^= E##ko; \ E##ku = Bku ^( Bka & Bke ); \ Cu ^= E##ku; \ \ A##bu ^= Du; \ Bma = ROL64(A##bu, 27); \ A##ga ^= Da; \ Bme = ROL64(A##ga, 36); \ A##ke ^= De; \ Bmi = ROL64(A##ke, 10); \ A##mi ^= Di; \ Bmo = ROL64(A##mi, 15); \ A##so ^= Do; \ Bmu = ROL64(A##so, 56); \ E##ma = Bma ^( Bme & Bmi ); \ Ca ^= E##ma; \ E##me = Bme ^( Bmi | Bmo ); \ Ce ^= E##me; \ E##mi = Bmi ^((~Bmo)| Bmu ); \ Ci ^= E##mi; \ E##mo = (~Bmo)^( Bmu & Bma ); \ Co ^= E##mo; \ E##mu = Bmu ^( Bma | Bme ); \ Cu ^= E##mu; \ \ A##bi ^= Di; \ Bsa = ROL64(A##bi, 62); \ A##go ^= Do; \ Bse = ROL64(A##go, 55); \ A##ku ^= Du; \ Bsi = ROL64(A##ku, 39); \ A##ma ^= Da; \ Bso = ROL64(A##ma, 41); \ A##se ^= De; \ Bsu = ROL64(A##se, 2); \ E##sa = Bsa ^((~Bse)& Bsi ); \ Ca ^= E##sa; \ E##se = (~Bse)^( Bsi | Bso ); \ Ce ^= E##se; \ E##si = Bsi ^( Bso & Bsu ); \ Ci ^= E##si; \ E##so = Bso ^( Bsu | Bsa ); \ Co ^= E##so; \ E##su = Bsu ^( Bsa & Bse ); \ Cu ^= E##su; \ \ /* --- Code for round (lane complementing pattern 'bebigokimisa') */ /* --- 64-bit lanes mapped to 64-bit words */ #define thetaRhoPiChiIota(i, A, E) \ Da = Cu^ROL64(Ce, 1); \ De = Ca^ROL64(Ci, 1); \ Di = Ce^ROL64(Co, 1); \ Do = Ci^ROL64(Cu, 1); \ Du = Co^ROL64(Ca, 1); \ \ A##ba ^= Da; \ Bba = A##ba; \ A##ge ^= De; \ Bbe = ROL64(A##ge, 44); \ A##ki ^= Di; \ Bbi = ROL64(A##ki, 43); \ A##mo ^= Do; \ Bbo = ROL64(A##mo, 21); \ A##su ^= Du; \ Bbu = ROL64(A##su, 14); \ E##ba = Bba ^( Bbe | Bbi ); \ E##ba ^= KeccakF1600RoundConstants[i]; \ E##be = Bbe ^((~Bbi)| Bbo ); \ E##bi = Bbi ^( Bbo & Bbu ); \ E##bo = Bbo ^( Bbu | Bba ); \ E##bu = Bbu ^( Bba & Bbe ); \ \ A##bo ^= Do; \ Bga = ROL64(A##bo, 28); \ A##gu ^= Du; \ Bge = ROL64(A##gu, 20); \ A##ka ^= Da; \ Bgi = ROL64(A##ka, 3); \ A##me ^= De; \ Bgo = ROL64(A##me, 45); \ A##si ^= Di; \ Bgu = ROL64(A##si, 61); \ E##ga = Bga ^( Bge | Bgi ); \ E##ge = Bge ^( Bgi & Bgo ); \ E##gi = Bgi ^( Bgo |(~Bgu)); \ E##go = Bgo ^( Bgu | Bga ); \ E##gu = Bgu ^( Bga & Bge ); \ \ A##be ^= De; \ Bka = ROL64(A##be, 1); \ A##gi ^= Di; \ Bke = ROL64(A##gi, 6); \ A##ko ^= Do; \ Bki = ROL64(A##ko, 25); \ A##mu ^= Du; \ Bko = ROL64(A##mu, 8); \ A##sa ^= Da; \ Bku = ROL64(A##sa, 18); \ E##ka = Bka ^( Bke | Bki ); \ E##ke = Bke ^( Bki & Bko ); \ E##ki = Bki ^((~Bko)& Bku ); \ E##ko = (~Bko)^( Bku | Bka ); \ E##ku = Bku ^( Bka & Bke ); \ \ A##bu ^= Du; \ Bma = ROL64(A##bu, 27); \ A##ga ^= Da; \ Bme = ROL64(A##ga, 36); \ A##ke ^= De; \ Bmi = ROL64(A##ke, 10); \ A##mi ^= Di; \ Bmo = ROL64(A##mi, 15); \ A##so ^= Do; \ Bmu = ROL64(A##so, 56); \ E##ma = Bma ^( Bme & Bmi ); \ E##me = Bme ^( Bmi | Bmo ); \ E##mi = Bmi ^((~Bmo)| Bmu ); \ E##mo = (~Bmo)^( Bmu & Bma ); \ E##mu = Bmu ^( Bma | Bme ); \ \ A##bi ^= Di; \ Bsa = ROL64(A##bi, 62); \ A##go ^= Do; \ Bse = ROL64(A##go, 55); \ A##ku ^= Du; \ Bsi = ROL64(A##ku, 39); \ A##ma ^= Da; \ Bso = ROL64(A##ma, 41); \ A##se ^= De; \ Bsu = ROL64(A##se, 2); \ E##sa = Bsa ^((~Bse)& Bsi ); \ E##se = (~Bse)^( Bsi | Bso ); \ E##si = Bsi ^( Bso & Bsu ); \ E##so = Bso ^( Bsu | Bsa ); \ E##su = Bsu ^( Bsa & Bse ); \ \ #else /* UseBebigokimisa */ /* --- Code for round, with prepare-theta */ /* --- 64-bit lanes mapped to 64-bit words */ #define thetaRhoPiChiIotaPrepareTheta(i, A, E) \ Da = Cu^ROL64(Ce, 1); \ De = Ca^ROL64(Ci, 1); \ Di = Ce^ROL64(Co, 1); \ Do = Ci^ROL64(Cu, 1); \ Du = Co^ROL64(Ca, 1); \ \ A##ba ^= Da; \ Bba = A##ba; \ A##ge ^= De; \ Bbe = ROL64(A##ge, 44); \ A##ki ^= Di; \ Bbi = ROL64(A##ki, 43); \ A##mo ^= Do; \ Bbo = ROL64(A##mo, 21); \ A##su ^= Du; \ Bbu = ROL64(A##su, 14); \ E##ba = Bba ^((~Bbe)& Bbi ); \ E##ba ^= KeccakF1600RoundConstants[i]; \ Ca = E##ba; \ E##be = Bbe ^((~Bbi)& Bbo ); \ Ce = E##be; \ E##bi = Bbi ^((~Bbo)& Bbu ); \ Ci = E##bi; \ E##bo = Bbo ^((~Bbu)& Bba ); \ Co = E##bo; \ E##bu = Bbu ^((~Bba)& Bbe ); \ Cu = E##bu; \ \ A##bo ^= Do; \ Bga = ROL64(A##bo, 28); \ A##gu ^= Du; \ Bge = ROL64(A##gu, 20); \ A##ka ^= Da; \ Bgi = ROL64(A##ka, 3); \ A##me ^= De; \ Bgo = ROL64(A##me, 45); \ A##si ^= Di; \ Bgu = ROL64(A##si, 61); \ E##ga = Bga ^((~Bge)& Bgi ); \ Ca ^= E##ga; \ E##ge = Bge ^((~Bgi)& Bgo ); \ Ce ^= E##ge; \ E##gi = Bgi ^((~Bgo)& Bgu ); \ Ci ^= E##gi; \ E##go = Bgo ^((~Bgu)& Bga ); \ Co ^= E##go; \ E##gu = Bgu ^((~Bga)& Bge ); \ Cu ^= E##gu; \ \ A##be ^= De; \ Bka = ROL64(A##be, 1); \ A##gi ^= Di; \ Bke = ROL64(A##gi, 6); \ A##ko ^= Do; \ Bki = ROL64(A##ko, 25); \ A##mu ^= Du; \ Bko = ROL64(A##mu, 8); \ A##sa ^= Da; \ Bku = ROL64(A##sa, 18); \ E##ka = Bka ^((~Bke)& Bki ); \ Ca ^= E##ka; \ E##ke = Bke ^((~Bki)& Bko ); \ Ce ^= E##ke; \ E##ki = Bki ^((~Bko)& Bku ); \ Ci ^= E##ki; \ E##ko = Bko ^((~Bku)& Bka ); \ Co ^= E##ko; \ E##ku = Bku ^((~Bka)& Bke ); \ Cu ^= E##ku; \ \ A##bu ^= Du; \ Bma = ROL64(A##bu, 27); \ A##ga ^= Da; \ Bme = ROL64(A##ga, 36); \ A##ke ^= De; \ Bmi = ROL64(A##ke, 10); \ A##mi ^= Di; \ Bmo = ROL64(A##mi, 15); \ A##so ^= Do; \ Bmu = ROL64(A##so, 56); \ E##ma = Bma ^((~Bme)& Bmi ); \ Ca ^= E##ma; \ E##me = Bme ^((~Bmi)& Bmo ); \ Ce ^= E##me; \ E##mi = Bmi ^((~Bmo)& Bmu ); \ Ci ^= E##mi; \ E##mo = Bmo ^((~Bmu)& Bma ); \ Co ^= E##mo; \ E##mu = Bmu ^((~Bma)& Bme ); \ Cu ^= E##mu; \ \ A##bi ^= Di; \ Bsa = ROL64(A##bi, 62); \ A##go ^= Do; \ Bse = ROL64(A##go, 55); \ A##ku ^= Du; \ Bsi = ROL64(A##ku, 39); \ A##ma ^= Da; \ Bso = ROL64(A##ma, 41); \ A##se ^= De; \ Bsu = ROL64(A##se, 2); \ E##sa = Bsa ^((~Bse)& Bsi ); \ Ca ^= E##sa; \ E##se = Bse ^((~Bsi)& Bso ); \ Ce ^= E##se; \ E##si = Bsi ^((~Bso)& Bsu ); \ Ci ^= E##si; \ E##so = Bso ^((~Bsu)& Bsa ); \ Co ^= E##so; \ E##su = Bsu ^((~Bsa)& Bse ); \ Cu ^= E##su; \ \ /* --- Code for round */ /* --- 64-bit lanes mapped to 64-bit words */ #define thetaRhoPiChiIota(i, A, E) \ Da = Cu^ROL64(Ce, 1); \ De = Ca^ROL64(Ci, 1); \ Di = Ce^ROL64(Co, 1); \ Do = Ci^ROL64(Cu, 1); \ Du = Co^ROL64(Ca, 1); \ \ A##ba ^= Da; \ Bba = A##ba; \ A##ge ^= De; \ Bbe = ROL64(A##ge, 44); \ A##ki ^= Di; \ Bbi = ROL64(A##ki, 43); \ A##mo ^= Do; \ Bbo = ROL64(A##mo, 21); \ A##su ^= Du; \ Bbu = ROL64(A##su, 14); \ E##ba = Bba ^((~Bbe)& Bbi ); \ E##ba ^= KeccakF1600RoundConstants[i]; \ E##be = Bbe ^((~Bbi)& Bbo ); \ E##bi = Bbi ^((~Bbo)& Bbu ); \ E##bo = Bbo ^((~Bbu)& Bba ); \ E##bu = Bbu ^((~Bba)& Bbe ); \ \ A##bo ^= Do; \ Bga = ROL64(A##bo, 28); \ A##gu ^= Du; \ Bge = ROL64(A##gu, 20); \ A##ka ^= Da; \ Bgi = ROL64(A##ka, 3); \ A##me ^= De; \ Bgo = ROL64(A##me, 45); \ A##si ^= Di; \ Bgu = ROL64(A##si, 61); \ E##ga = Bga ^((~Bge)& Bgi ); \ E##ge = Bge ^((~Bgi)& Bgo ); \ E##gi = Bgi ^((~Bgo)& Bgu ); \ E##go = Bgo ^((~Bgu)& Bga ); \ E##gu = Bgu ^((~Bga)& Bge ); \ \ A##be ^= De; \ Bka = ROL64(A##be, 1); \ A##gi ^= Di; \ Bke = ROL64(A##gi, 6); \ A##ko ^= Do; \ Bki = ROL64(A##ko, 25); \ A##mu ^= Du; \ Bko = ROL64(A##mu, 8); \ A##sa ^= Da; \ Bku = ROL64(A##sa, 18); \ E##ka = Bka ^((~Bke)& Bki ); \ E##ke = Bke ^((~Bki)& Bko ); \ E##ki = Bki ^((~Bko)& Bku ); \ E##ko = Bko ^((~Bku)& Bka ); \ E##ku = Bku ^((~Bka)& Bke ); \ \ A##bu ^= Du; \ Bma = ROL64(A##bu, 27); \ A##ga ^= Da; \ Bme = ROL64(A##ga, 36); \ A##ke ^= De; \ Bmi = ROL64(A##ke, 10); \ A##mi ^= Di; \ Bmo = ROL64(A##mi, 15); \ A##so ^= Do; \ Bmu = ROL64(A##so, 56); \ E##ma = Bma ^((~Bme)& Bmi ); \ E##me = Bme ^((~Bmi)& Bmo ); \ E##mi = Bmi ^((~Bmo)& Bmu ); \ E##mo = Bmo ^((~Bmu)& Bma ); \ E##mu = Bmu ^((~Bma)& Bme ); \ \ A##bi ^= Di; \ Bsa = ROL64(A##bi, 62); \ A##go ^= Do; \ Bse = ROL64(A##go, 55); \ A##ku ^= Du; \ Bsi = ROL64(A##ku, 39); \ A##ma ^= Da; \ Bso = ROL64(A##ma, 41); \ A##se ^= De; \ Bsu = ROL64(A##se, 2); \ E##sa = Bsa ^((~Bse)& Bsi ); \ E##se = Bse ^((~Bsi)& Bso ); \ E##si = Bsi ^((~Bso)& Bsu ); \ E##so = Bso ^((~Bsu)& Bsa ); \ E##su = Bsu ^((~Bsa)& Bse ); \ \ #endif /* UseBebigokimisa */ #define copyFromState(X, state) \ X##ba = state[ 0]; \ X##be = state[ 1]; \ X##bi = state[ 2]; \ X##bo = state[ 3]; \ X##bu = state[ 4]; \ X##ga = state[ 5]; \ X##ge = state[ 6]; \ X##gi = state[ 7]; \ X##go = state[ 8]; \ X##gu = state[ 9]; \ X##ka = state[10]; \ X##ke = state[11]; \ X##ki = state[12]; \ X##ko = state[13]; \ X##ku = state[14]; \ X##ma = state[15]; \ X##me = state[16]; \ X##mi = state[17]; \ X##mo = state[18]; \ X##mu = state[19]; \ X##sa = state[20]; \ X##se = state[21]; \ X##si = state[22]; \ X##so = state[23]; \ X##su = state[24]; \ #define copyToState(state, X) \ state[ 0] = X##ba; \ state[ 1] = X##be; \ state[ 2] = X##bi; \ state[ 3] = X##bo; \ state[ 4] = X##bu; \ state[ 5] = X##ga; \ state[ 6] = X##ge; \ state[ 7] = X##gi; \ state[ 8] = X##go; \ state[ 9] = X##gu; \ state[10] = X##ka; \ state[11] = X##ke; \ state[12] = X##ki; \ state[13] = X##ko; \ state[14] = X##ku; \ state[15] = X##ma; \ state[16] = X##me; \ state[17] = X##mi; \ state[18] = X##mo; \ state[19] = X##mu; \ state[20] = X##sa; \ state[21] = X##se; \ state[22] = X##si; \ state[23] = X##so; \ state[24] = X##su; \ #define copyStateVariables(X, Y) \ X##ba = Y##ba; \ X##be = Y##be; \ X##bi = Y##bi; \ X##bo = Y##bo; \ X##bu = Y##bu; \ X##ga = Y##ga; \ X##ge = Y##ge; \ X##gi = Y##gi; \ X##go = Y##go; \ X##gu = Y##gu; \ X##ka = Y##ka; \ X##ke = Y##ke; \ X##ki = Y##ki; \ X##ko = Y##ko; \ X##ku = Y##ku; \ X##ma = Y##ma; \ X##me = Y##me; \ X##mi = Y##mi; \ X##mo = Y##mo; \ X##mu = Y##mu; \ X##sa = Y##sa; \ X##se = Y##se; \ X##si = Y##si; \ X##so = Y##so; \ X##su = Y##su; \ #define addInput(X, input, laneCount) \ if (laneCount == 21) { \ X##ba ^= HTOLE64(input[ 0]); \ X##be ^= HTOLE64(input[ 1]); \ X##bi ^= HTOLE64(input[ 2]); \ X##bo ^= HTOLE64(input[ 3]); \ X##bu ^= HTOLE64(input[ 4]); \ X##ga ^= HTOLE64(input[ 5]); \ X##ge ^= HTOLE64(input[ 6]); \ X##gi ^= HTOLE64(input[ 7]); \ X##go ^= HTOLE64(input[ 8]); \ X##gu ^= HTOLE64(input[ 9]); \ X##ka ^= HTOLE64(input[10]); \ X##ke ^= HTOLE64(input[11]); \ X##ki ^= HTOLE64(input[12]); \ X##ko ^= HTOLE64(input[13]); \ X##ku ^= HTOLE64(input[14]); \ X##ma ^= HTOLE64(input[15]); \ X##me ^= HTOLE64(input[16]); \ X##mi ^= HTOLE64(input[17]); \ X##mo ^= HTOLE64(input[18]); \ X##mu ^= HTOLE64(input[19]); \ X##sa ^= HTOLE64(input[20]); \ } \ else if (laneCount < 16) { \ if (laneCount < 8) { \ if (laneCount < 4) { \ if (laneCount < 2) { \ if (laneCount < 1) { \ } \ else { \ X##ba ^= HTOLE64(input[ 0]); \ } \ } \ else { \ X##ba ^= HTOLE64(input[ 0]); \ X##be ^= HTOLE64(input[ 1]); \ if (laneCount < 3) { \ } \ else { \ X##bi ^= HTOLE64(input[ 2]); \ } \ } \ } \ else { \ X##ba ^= HTOLE64(input[ 0]); \ X##be ^= HTOLE64(input[ 1]); \ X##bi ^= HTOLE64(input[ 2]); \ X##bo ^= HTOLE64(input[ 3]); \ if (laneCount < 6) { \ if (laneCount < 5) { \ } \ else { \ X##bu ^= HTOLE64(input[ 4]); \ } \ } \ else { \ X##bu ^= HTOLE64(input[ 4]); \ X##ga ^= HTOLE64(input[ 5]); \ if (laneCount < 7) { \ } \ else { \ X##ge ^= HTOLE64(input[ 6]); \ } \ } \ } \ } \ else { \ X##ba ^= HTOLE64(input[ 0]); \ X##be ^= HTOLE64(input[ 1]); \ X##bi ^= HTOLE64(input[ 2]); \ X##bo ^= HTOLE64(input[ 3]); \ X##bu ^= HTOLE64(input[ 4]); \ X##ga ^= HTOLE64(input[ 5]); \ X##ge ^= HTOLE64(input[ 6]); \ X##gi ^= HTOLE64(input[ 7]); \ if (laneCount < 12) { \ if (laneCount < 10) { \ if (laneCount < 9) { \ } \ else { \ X##go ^= HTOLE64(input[ 8]); \ } \ } \ else { \ X##go ^= HTOLE64(input[ 8]); \ X##gu ^= HTOLE64(input[ 9]); \ if (laneCount < 11) { \ } \ else { \ X##ka ^= HTOLE64(input[10]); \ } \ } \ } \ else { \ X##go ^= HTOLE64(input[ 8]); \ X##gu ^= HTOLE64(input[ 9]); \ X##ka ^= HTOLE64(input[10]); \ X##ke ^= HTOLE64(input[11]); \ if (laneCount < 14) { \ if (laneCount < 13) { \ } \ else { \ X##ki ^= HTOLE64(input[12]); \ } \ } \ else { \ X##ki ^= HTOLE64(input[12]); \ X##ko ^= HTOLE64(input[13]); \ if (laneCount < 15) { \ } \ else { \ X##ku ^= HTOLE64(input[14]); \ } \ } \ } \ } \ } \ else { \ X##ba ^= HTOLE64(input[ 0]); \ X##be ^= HTOLE64(input[ 1]); \ X##bi ^= HTOLE64(input[ 2]); \ X##bo ^= HTOLE64(input[ 3]); \ X##bu ^= HTOLE64(input[ 4]); \ X##ga ^= HTOLE64(input[ 5]); \ X##ge ^= HTOLE64(input[ 6]); \ X##gi ^= HTOLE64(input[ 7]); \ X##go ^= HTOLE64(input[ 8]); \ X##gu ^= HTOLE64(input[ 9]); \ X##ka ^= HTOLE64(input[10]); \ X##ke ^= HTOLE64(input[11]); \ X##ki ^= HTOLE64(input[12]); \ X##ko ^= HTOLE64(input[13]); \ X##ku ^= HTOLE64(input[14]); \ X##ma ^= HTOLE64(input[15]); \ if (laneCount < 24) { \ if (laneCount < 20) { \ if (laneCount < 18) { \ if (laneCount < 17) { \ } \ else { \ X##me ^= HTOLE64(input[16]); \ } \ } \ else { \ X##me ^= HTOLE64(input[16]); \ X##mi ^= HTOLE64(input[17]); \ if (laneCount < 19) { \ } \ else { \ X##mo ^= HTOLE64(input[18]); \ } \ } \ } \ else { \ X##me ^= HTOLE64(input[16]); \ X##mi ^= HTOLE64(input[17]); \ X##mo ^= HTOLE64(input[18]); \ X##mu ^= HTOLE64(input[19]); \ if (laneCount < 22) { \ if (laneCount < 21) { \ } \ else { \ X##sa ^= HTOLE64(input[20]); \ } \ } \ else { \ X##sa ^= HTOLE64(input[20]); \ X##se ^= HTOLE64(input[21]); \ if (laneCount < 23) { \ } \ else { \ X##si ^= HTOLE64(input[22]); \ } \ } \ } \ } \ else { \ X##me ^= HTOLE64(input[16]); \ X##mi ^= HTOLE64(input[17]); \ X##mo ^= HTOLE64(input[18]); \ X##mu ^= HTOLE64(input[19]); \ X##sa ^= HTOLE64(input[20]); \ X##se ^= HTOLE64(input[21]); \ X##si ^= HTOLE64(input[22]); \ X##so ^= HTOLE64(input[23]); \ if (laneCount < 25) { \ } \ else { \ X##su ^= HTOLE64(input[24]); \ } \ } \ }