LCOV - code coverage report
Current view: top level - src/crypto - sha256_avx2.cpp (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 286 286 100.0 %
Date: 2022-04-21 14:51:19 Functions: 24 24 100.0 %
Legend: Modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed

Not modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed
Branches: 0 0 -

           Branch data     Line data    Source code
#       1                 :            : // Copyright (c) 2017-2019 The Bitcoin Core developers
#       2                 :            : // Distributed under the MIT software license, see the accompanying
#       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#       4                 :            : 
#       5                 :            : #ifdef ENABLE_AVX2
#       6                 :            : 
#       7                 :            : #include <stdint.h>
#       8                 :            : #include <immintrin.h>
#       9                 :            : 
#      10                 :            : #include <crypto/common.h>
#      11                 :            : 
#      12                 :            : namespace sha256d64_avx2 {
#      13                 :            : namespace {
#      14                 :            : 
#      15                 :   13095050 : __m256i inline K(uint32_t x) { return _mm256_set1_epi32(x); }
#      16                 :            : 
#      17                 :   89103275 : __m256i inline Add(__m256i x, __m256i y) { return _mm256_add_epi32(x, y); }
#      18                 :     512415 : __m256i inline Add(__m256i x, __m256i y, __m256i z) { return Add(Add(x, y), z); }
#      19                 :   15543255 : __m256i inline Add(__m256i x, __m256i y, __m256i z, __m256i w) { return Add(Add(x, y), Add(z, w)); }
#      20                 :     113870 : __m256i inline Add(__m256i x, __m256i y, __m256i z, __m256i w, __m256i v) { return Add(Add(x, y, z), Add(w, v)); }
#      21                 :      56935 : __m256i inline Inc(__m256i& x, __m256i y) { x = Add(x, y); return x; }
#      22                 :     284675 : __m256i inline Inc(__m256i& x, __m256i y, __m256i z) { x = Add(x, y, z); return x; }
#      23                 :    4554800 : __m256i inline Inc(__m256i& x, __m256i y, __m256i z, __m256i w) { x = Add(x, y, z, w); return x; }
#      24                 :   86313460 : __m256i inline Xor(__m256i x, __m256i y) { return _mm256_xor_si256(x, y); }
#      25                 :   32225210 : __m256i inline Xor(__m256i x, __m256i y, __m256i z) { return Xor(Xor(x, y), z); }
#      26                 :  108176500 : __m256i inline Or(__m256i x, __m256i y) { return _mm256_or_si256(x, y); }
#      27                 :   32794560 : __m256i inline And(__m256i x, __m256i y) { return _mm256_and_si256(x, y); }
#      28                 :   96675630 : __m256i inline ShR(__m256i x, int n) { return _mm256_srli_epi32(x, n); }
#      29                 :   86313460 : __m256i inline ShL(__m256i x, int n) { return _mm256_slli_epi32(x, n); }
#      30                 :            : 
#      31                 :   10931520 : __m256i inline Ch(__m256i x, __m256i y, __m256i z) { return Xor(z, And(x, Xor(y, z))); }
#      32                 :   10931520 : __m256i inline Maj(__m256i x, __m256i y, __m256i z) { return Or(And(x, y), And(z, Or(x, y))); }
#      33                 :   10931520 : __m256i inline Sigma0(__m256i x) { return Xor(Or(ShR(x, 2), ShL(x, 30)), Or(ShR(x, 13), ShL(x, 19)), Or(ShR(x, 22), ShL(x, 10))); }
#      34                 :   10931520 : __m256i inline Sigma1(__m256i x) { return Xor(Or(ShR(x, 6), ShL(x, 26)), Or(ShR(x, 11), ShL(x, 21)), Or(ShR(x, 25), ShL(x, 7))); }
#      35                 :    5010280 : __m256i inline sigma0(__m256i x) { return Xor(Or(ShR(x, 7), ShL(x, 25)), Or(ShR(x, 18), ShL(x, 14)), ShR(x, 3)); }
#      36                 :    5351890 : __m256i inline sigma1(__m256i x) { return Xor(Or(ShR(x, 17), ShL(x, 15)), Or(ShR(x, 19), ShL(x, 13)), ShR(x, 10)); }
#      37                 :            : 
#      38                 :            : /** One round of SHA-256. */
#      39                 :            : void inline __attribute__((always_inline)) Round(__m256i a, __m256i b, __m256i c, __m256i& d, __m256i e, __m256i f, __m256i g, __m256i& h, __m256i k)
#      40                 :   10931520 : {
#      41                 :   10931520 :     __m256i t1 = Add(h, Sigma1(e), Ch(e, f, g), k);
#      42                 :   10931520 :     __m256i t2 = Add(Sigma0(a), Maj(a, b, c));
#      43                 :   10931520 :     d = Add(d, t1);
#      44                 :   10931520 :     h = Add(t1, t2);
#      45                 :   10931520 : }
#      46                 :            : 
#      47                 :     910960 : __m256i inline Read8(const unsigned char* chunk, int offset) {
#      48                 :     910960 :     __m256i ret = _mm256_set_epi32(
#      49                 :     910960 :         ReadLE32(chunk + 0 + offset),
#      50                 :     910960 :         ReadLE32(chunk + 64 + offset),
#      51                 :     910960 :         ReadLE32(chunk + 128 + offset),
#      52                 :     910960 :         ReadLE32(chunk + 192 + offset),
#      53                 :     910960 :         ReadLE32(chunk + 256 + offset),
#      54                 :     910960 :         ReadLE32(chunk + 320 + offset),
#      55                 :     910960 :         ReadLE32(chunk + 384 + offset),
#      56                 :     910960 :         ReadLE32(chunk + 448 + offset)
#      57                 :     910960 :     );
#      58                 :     910960 :     return _mm256_shuffle_epi8(ret, _mm256_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL, 0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
#      59                 :     910960 : }
#      60                 :            : 
#      61                 :     455480 : void inline Write8(unsigned char* out, int offset, __m256i v) {
#      62                 :     455480 :     v = _mm256_shuffle_epi8(v, _mm256_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL, 0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
#      63                 :     455480 :     WriteLE32(out + 0 + offset, _mm256_extract_epi32(v, 7));
#      64                 :     455480 :     WriteLE32(out + 32 + offset, _mm256_extract_epi32(v, 6));
#      65                 :     455480 :     WriteLE32(out + 64 + offset, _mm256_extract_epi32(v, 5));
#      66                 :     455480 :     WriteLE32(out + 96 + offset, _mm256_extract_epi32(v, 4));
#      67                 :     455480 :     WriteLE32(out + 128 + offset, _mm256_extract_epi32(v, 3));
#      68                 :     455480 :     WriteLE32(out + 160 + offset, _mm256_extract_epi32(v, 2));
#      69                 :     455480 :     WriteLE32(out + 192 + offset, _mm256_extract_epi32(v, 1));
#      70                 :     455480 :     WriteLE32(out + 224 + offset, _mm256_extract_epi32(v, 0));
#      71                 :     455480 : }
#      72                 :            : 
#      73                 :            : }
#      74                 :            : 
#      75                 :            : void Transform_8way(unsigned char* out, const unsigned char* in)
#      76                 :      56935 : {
#      77                 :            :     // Transform 1
#      78                 :      56935 :     __m256i a = K(0x6a09e667ul);
#      79                 :      56935 :     __m256i b = K(0xbb67ae85ul);
#      80                 :      56935 :     __m256i c = K(0x3c6ef372ul);
#      81                 :      56935 :     __m256i d = K(0xa54ff53aul);
#      82                 :      56935 :     __m256i e = K(0x510e527ful);
#      83                 :      56935 :     __m256i f = K(0x9b05688cul);
#      84                 :      56935 :     __m256i g = K(0x1f83d9abul);
#      85                 :      56935 :     __m256i h = K(0x5be0cd19ul);
#      86                 :            : 
#      87                 :      56935 :     __m256i w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
#      88                 :            : 
#      89                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x428a2f98ul), w0 = Read8(in, 0)));
#      90                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x71374491ul), w1 = Read8(in, 4)));
#      91                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb5c0fbcful), w2 = Read8(in, 8)));
#      92                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xe9b5dba5ul), w3 = Read8(in, 12)));
#      93                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x3956c25bul), w4 = Read8(in, 16)));
#      94                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x59f111f1ul), w5 = Read8(in, 20)));
#      95                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x923f82a4ul), w6 = Read8(in, 24)));
#      96                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0xab1c5ed5ul), w7 = Read8(in, 28)));
#      97                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0xd807aa98ul), w8 = Read8(in, 32)));
#      98                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x12835b01ul), w9 = Read8(in, 36)));
#      99                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x243185beul), w10 = Read8(in, 40)));
#     100                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x550c7dc3ul), w11 = Read8(in, 44)));
#     101                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x72be5d74ul), w12 = Read8(in, 48)));
#     102                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x80deb1feul), w13 = Read8(in, 52)));
#     103                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x9bdc06a7ul), w14 = Read8(in, 56)));
#     104                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc19bf174ul), w15 = Read8(in, 60)));
#     105                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0xe49b69c1ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     106                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xefbe4786ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     107                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x0fc19dc6ul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     108                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x240ca1ccul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     109                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x2de92c6ful), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     110                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4a7484aaul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     111                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5cb0a9dcul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     112                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x76f988daul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     113                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x983e5152ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     114                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa831c66dul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     115                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb00327c8ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     116                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xbf597fc7ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     117                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0xc6e00bf3ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     118                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd5a79147ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     119                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x06ca6351ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     120                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x14292967ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     121                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x27b70a85ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     122                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x2e1b2138ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     123                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x4d2c6dfcul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     124                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x53380d13ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     125                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x650a7354ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     126                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x766a0abbul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     127                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x81c2c92eul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     128                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x92722c85ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     129                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0xa2bfe8a1ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     130                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa81a664bul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     131                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xc24b8b70ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     132                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xc76c51a3ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     133                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0xd192e819ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     134                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd6990624ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     135                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0xf40e3585ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     136                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x106aa070ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     137                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x19a4c116ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     138                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x1e376c08ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     139                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x2748774cul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     140                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x34b0bcb5ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     141                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x391c0cb3ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     142                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4ed8aa4aul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     143                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5b9cca4ful), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     144                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x682e6ff3ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     145                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x748f82eeul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     146                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x78a5636ful), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     147                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x84c87814ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     148                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x8cc70208ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     149                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x90befffaul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     150                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xa4506cebul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     151                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0xbef9a3f7ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     152                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc67178f2ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     153                 :            : 
#     154                 :      56935 :     a = Add(a, K(0x6a09e667ul));
#     155                 :      56935 :     b = Add(b, K(0xbb67ae85ul));
#     156                 :      56935 :     c = Add(c, K(0x3c6ef372ul));
#     157                 :      56935 :     d = Add(d, K(0xa54ff53aul));
#     158                 :      56935 :     e = Add(e, K(0x510e527ful));
#     159                 :      56935 :     f = Add(f, K(0x9b05688cul));
#     160                 :      56935 :     g = Add(g, K(0x1f83d9abul));
#     161                 :      56935 :     h = Add(h, K(0x5be0cd19ul));
#     162                 :            : 
#     163                 :      56935 :     __m256i t0 = a, t1 = b, t2 = c, t3 = d, t4 = e, t5 = f, t6 = g, t7 = h;
#     164                 :            : 
#     165                 :            :     // Transform 2
#     166                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0xc28a2f98ul));
#     167                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0x71374491ul));
#     168                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0xb5c0fbcful));
#     169                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0xe9b5dba5ul));
#     170                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x3956c25bul));
#     171                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x59f111f1ul));
#     172                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x923f82a4ul));
#     173                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xab1c5ed5ul));
#     174                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0xd807aa98ul));
#     175                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0x12835b01ul));
#     176                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0x243185beul));
#     177                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x550c7dc3ul));
#     178                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x72be5d74ul));
#     179                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x80deb1feul));
#     180                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x9bdc06a7ul));
#     181                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xc19bf374ul));
#     182                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0x649b69c1ul));
#     183                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0xf0fe4786ul));
#     184                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0x0fe1edc6ul));
#     185                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x240cf254ul));
#     186                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x4fe9346ful));
#     187                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x6cc984beul));
#     188                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x61b9411eul));
#     189                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0x16f988faul));
#     190                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0xf2c65152ul));
#     191                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0xa88e5a6dul));
#     192                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0xb019fc65ul));
#     193                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0xb9d99ec7ul));
#     194                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x9a1231c3ul));
#     195                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0xe70eeaa0ul));
#     196                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0xfdb1232bul));
#     197                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xc7353eb0ul));
#     198                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0x3069bad5ul));
#     199                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0xcb976d5ful));
#     200                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0x5a0f118ful));
#     201                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0xdc1eeefdul));
#     202                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x0a35b689ul));
#     203                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0xde0b7a04ul));
#     204                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x58f4ca9dul));
#     205                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xe15d5b16ul));
#     206                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0x007f3e86ul));
#     207                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0x37088980ul));
#     208                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0xa507ea32ul));
#     209                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x6fab9537ul));
#     210                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x17406110ul));
#     211                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x0d8cd6f1ul));
#     212                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0xcdaa3b6dul));
#     213                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xc0bbbe37ul));
#     214                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0x83613bdaul));
#     215                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0xdb48a363ul));
#     216                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0x0b02e931ul));
#     217                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x6fd15ca7ul));
#     218                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x521afacaul));
#     219                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x31338431ul));
#     220                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x6ed41a95ul));
#     221                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0x6d437890ul));
#     222                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0xc39c91f2ul));
#     223                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0x9eccabbdul));
#     224                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0xb5c9a0e6ul));
#     225                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x532fb63cul));
#     226                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0xd2c741c6ul));
#     227                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x07237ea3ul));
#     228                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0xa4954b68ul));
#     229                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0x4c191d76ul));
#     230                 :            : 
#     231                 :      56935 :     w0 = Add(t0, a);
#     232                 :      56935 :     w1 = Add(t1, b);
#     233                 :      56935 :     w2 = Add(t2, c);
#     234                 :      56935 :     w3 = Add(t3, d);
#     235                 :      56935 :     w4 = Add(t4, e);
#     236                 :      56935 :     w5 = Add(t5, f);
#     237                 :      56935 :     w6 = Add(t6, g);
#     238                 :      56935 :     w7 = Add(t7, h);
#     239                 :            : 
#     240                 :            :     // Transform 3
#     241                 :      56935 :     a = K(0x6a09e667ul);
#     242                 :      56935 :     b = K(0xbb67ae85ul);
#     243                 :      56935 :     c = K(0x3c6ef372ul);
#     244                 :      56935 :     d = K(0xa54ff53aul);
#     245                 :      56935 :     e = K(0x510e527ful);
#     246                 :      56935 :     f = K(0x9b05688cul);
#     247                 :      56935 :     g = K(0x1f83d9abul);
#     248                 :      56935 :     h = K(0x5be0cd19ul);
#     249                 :            : 
#     250                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x428a2f98ul), w0));
#     251                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x71374491ul), w1));
#     252                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb5c0fbcful), w2));
#     253                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xe9b5dba5ul), w3));
#     254                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x3956c25bul), w4));
#     255                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x59f111f1ul), w5));
#     256                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x923f82a4ul), w6));
#     257                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0xab1c5ed5ul), w7));
#     258                 :      56935 :     Round(a, b, c, d, e, f, g, h, K(0x5807aa98ul));
#     259                 :      56935 :     Round(h, a, b, c, d, e, f, g, K(0x12835b01ul));
#     260                 :      56935 :     Round(g, h, a, b, c, d, e, f, K(0x243185beul));
#     261                 :      56935 :     Round(f, g, h, a, b, c, d, e, K(0x550c7dc3ul));
#     262                 :      56935 :     Round(e, f, g, h, a, b, c, d, K(0x72be5d74ul));
#     263                 :      56935 :     Round(d, e, f, g, h, a, b, c, K(0x80deb1feul));
#     264                 :      56935 :     Round(c, d, e, f, g, h, a, b, K(0x9bdc06a7ul));
#     265                 :      56935 :     Round(b, c, d, e, f, g, h, a, K(0xc19bf274ul));
#     266                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0xe49b69c1ul), Inc(w0, sigma0(w1))));
#     267                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xefbe4786ul), Inc(w1, K(0xa00000ul), sigma0(w2))));
#     268                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x0fc19dc6ul), Inc(w2, sigma1(w0), sigma0(w3))));
#     269                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x240ca1ccul), Inc(w3, sigma1(w1), sigma0(w4))));
#     270                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x2de92c6ful), Inc(w4, sigma1(w2), sigma0(w5))));
#     271                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4a7484aaul), Inc(w5, sigma1(w3), sigma0(w6))));
#     272                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5cb0a9dcul), Inc(w6, sigma1(w4), K(0x100ul), sigma0(w7))));
#     273                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x76f988daul), Inc(w7, sigma1(w5), w0, K(0x11002000ul))));
#     274                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x983e5152ul), w8 = Add(K(0x80000000ul), sigma1(w6), w1)));
#     275                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa831c66dul), w9 = Add(sigma1(w7), w2)));
#     276                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb00327c8ul), w10 = Add(sigma1(w8), w3)));
#     277                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xbf597fc7ul), w11 = Add(sigma1(w9), w4)));
#     278                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0xc6e00bf3ul), w12 = Add(sigma1(w10), w5)));
#     279                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd5a79147ul), w13 = Add(sigma1(w11), w6)));
#     280                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x06ca6351ul), w14 = Add(sigma1(w12), w7, K(0x400022ul))));
#     281                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x14292967ul), w15 = Add(K(0x100ul), sigma1(w13), w8, sigma0(w0))));
#     282                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x27b70a85ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     283                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x2e1b2138ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     284                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x4d2c6dfcul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     285                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x53380d13ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     286                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x650a7354ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     287                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x766a0abbul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     288                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x81c2c92eul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     289                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x92722c85ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     290                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0xa2bfe8a1ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     291                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa81a664bul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     292                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0xc24b8b70ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     293                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0xc76c51a3ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     294                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0xd192e819ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     295                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd6990624ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     296                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0xf40e3585ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     297                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x106aa070ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     298                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x19a4c116ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     299                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x1e376c08ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     300                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x2748774cul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     301                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x34b0bcb5ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     302                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x391c0cb3ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     303                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4ed8aa4aul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     304                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5b9cca4ful), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     305                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0x682e6ff3ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     306                 :      56935 :     Round(a, b, c, d, e, f, g, h, Add(K(0x748f82eeul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     307                 :      56935 :     Round(h, a, b, c, d, e, f, g, Add(K(0x78a5636ful), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     308                 :      56935 :     Round(g, h, a, b, c, d, e, f, Add(K(0x84c87814ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     309                 :      56935 :     Round(f, g, h, a, b, c, d, e, Add(K(0x8cc70208ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     310                 :      56935 :     Round(e, f, g, h, a, b, c, d, Add(K(0x90befffaul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     311                 :      56935 :     Round(d, e, f, g, h, a, b, c, Add(K(0xa4506cebul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     312                 :      56935 :     Round(c, d, e, f, g, h, a, b, Add(K(0xbef9a3f7ul), w14, sigma1(w12), w7, sigma0(w15)));
#     313                 :      56935 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc67178f2ul), w15, sigma1(w13), w8, sigma0(w0)));
#     314                 :            : 
#     315                 :            :     // Output
#     316                 :      56935 :     Write8(out, 0, Add(a, K(0x6a09e667ul)));
#     317                 :      56935 :     Write8(out, 4, Add(b, K(0xbb67ae85ul)));
#     318                 :      56935 :     Write8(out, 8, Add(c, K(0x3c6ef372ul)));
#     319                 :      56935 :     Write8(out, 12, Add(d, K(0xa54ff53aul)));
#     320                 :      56935 :     Write8(out, 16, Add(e, K(0x510e527ful)));
#     321                 :      56935 :     Write8(out, 20, Add(f, K(0x9b05688cul)));
#     322                 :      56935 :     Write8(out, 24, Add(g, K(0x1f83d9abul)));
#     323                 :      56935 :     Write8(out, 28, Add(h, K(0x5be0cd19ul)));
#     324                 :      56935 : }
#     325                 :            : 
#     326                 :            : }
#     327                 :            : 
#     328                 :            : #endif

Generated by: LCOV version 0-eol-96201-ge66f56f4af6a