LCOV - code coverage report
Current view: top level - src/crypto - sha256_sse41.cpp (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 278 278 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) 2018-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_SSE41
#       6                 :            : 
#       7                 :            : #include <stdint.h>
#       8                 :            : #include <immintrin.h>
#       9                 :            : 
#      10                 :            : #include <crypto/common.h>
#      11                 :            : 
#      12                 :            : namespace sha256d64_sse41 {
#      13                 :            : namespace {
#      14                 :            : 
#      15                 :    1213940 : __m128i inline K(uint32_t x) { return _mm_set1_epi32(x); }
#      16                 :            : 
#      17                 :    8260070 : __m128i inline Add(__m128i x, __m128i y) { return _mm_add_epi32(x, y); }
#      18                 :      47502 : __m128i inline Add(__m128i x, __m128i y, __m128i z) { return Add(Add(x, y), z); }
#      19                 :    1440894 : __m128i inline Add(__m128i x, __m128i y, __m128i z, __m128i w) { return Add(Add(x, y), Add(z, w)); }
#      20                 :      10556 : __m128i inline Add(__m128i x, __m128i y, __m128i z, __m128i w, __m128i v) { return Add(Add(x, y, z), Add(w, v)); }
#      21                 :       5278 : __m128i inline Inc(__m128i& x, __m128i y) { x = Add(x, y); return x; }
#      22                 :      26390 : __m128i inline Inc(__m128i& x, __m128i y, __m128i z) { x = Add(x, y, z); return x; }
#      23                 :     422240 : __m128i inline Inc(__m128i& x, __m128i y, __m128i z, __m128i w) { x = Add(x, y, z, w); return x; }
#      24                 :    8001448 : __m128i inline Xor(__m128i x, __m128i y) { return _mm_xor_si128(x, y); }
#      25                 :    2987348 : __m128i inline Xor(__m128i x, __m128i y, __m128i z) { return Xor(Xor(x, y), z); }
#      26                 :   10028200 : __m128i inline Or(__m128i x, __m128i y) { return _mm_or_si128(x, y); }
#      27                 :    3040128 : __m128i inline And(__m128i x, __m128i y) { return _mm_and_si128(x, y); }
#      28                 :    8962044 : __m128i inline ShR(__m128i x, int n) { return _mm_srli_epi32(x, n); }
#      29                 :    8001448 : __m128i inline ShL(__m128i x, int n) { return _mm_slli_epi32(x, n); }
#      30                 :            : 
#      31                 :    1013376 : __m128i inline Ch(__m128i x, __m128i y, __m128i z) { return Xor(z, And(x, Xor(y, z))); }
#      32                 :    1013376 : __m128i inline Maj(__m128i x, __m128i y, __m128i z) { return Or(And(x, y), And(z, Or(x, y))); }
#      33                 :    1013376 : __m128i inline Sigma0(__m128i 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                 :    1013376 : __m128i inline Sigma1(__m128i 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                 :     464464 : __m128i inline sigma0(__m128i x) { return Xor(Or(ShR(x, 7), ShL(x, 25)), Or(ShR(x, 18), ShL(x, 14)), ShR(x, 3)); }
#      36                 :     496132 : __m128i inline sigma1(__m128i 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(__m128i a, __m128i b, __m128i c, __m128i& d, __m128i e, __m128i f, __m128i g, __m128i& h, __m128i k)
#      40                 :    1013376 : {
#      41                 :    1013376 :     __m128i t1 = Add(h, Sigma1(e), Ch(e, f, g), k);
#      42                 :    1013376 :     __m128i t2 = Add(Sigma0(a), Maj(a, b, c));
#      43                 :    1013376 :     d = Add(d, t1);
#      44                 :    1013376 :     h = Add(t1, t2);
#      45                 :    1013376 : }
#      46                 :            : 
#      47                 :      84448 : __m128i inline Read4(const unsigned char* chunk, int offset) {
#      48                 :      84448 :     __m128i ret = _mm_set_epi32(
#      49                 :      84448 :         ReadLE32(chunk + 0 + offset),
#      50                 :      84448 :         ReadLE32(chunk + 64 + offset),
#      51                 :      84448 :         ReadLE32(chunk + 128 + offset),
#      52                 :      84448 :         ReadLE32(chunk + 192 + offset)
#      53                 :      84448 :     );
#      54                 :      84448 :     return _mm_shuffle_epi8(ret, _mm_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
#      55                 :      84448 : }
#      56                 :            : 
#      57                 :      42224 : void inline Write4(unsigned char* out, int offset, __m128i v) {
#      58                 :      42224 :     v = _mm_shuffle_epi8(v, _mm_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
#      59                 :      42224 :     WriteLE32(out + 0 + offset, _mm_extract_epi32(v, 3));
#      60                 :      42224 :     WriteLE32(out + 32 + offset, _mm_extract_epi32(v, 2));
#      61                 :      42224 :     WriteLE32(out + 64 + offset, _mm_extract_epi32(v, 1));
#      62                 :      42224 :     WriteLE32(out + 96 + offset, _mm_extract_epi32(v, 0));
#      63                 :      42224 : }
#      64                 :            : 
#      65                 :            : }
#      66                 :            : 
#      67                 :            : void Transform_4way(unsigned char* out, const unsigned char* in)
#      68                 :       5278 : {
#      69                 :            :     // Transform 1
#      70                 :       5278 :     __m128i a = K(0x6a09e667ul);
#      71                 :       5278 :     __m128i b = K(0xbb67ae85ul);
#      72                 :       5278 :     __m128i c = K(0x3c6ef372ul);
#      73                 :       5278 :     __m128i d = K(0xa54ff53aul);
#      74                 :       5278 :     __m128i e = K(0x510e527ful);
#      75                 :       5278 :     __m128i f = K(0x9b05688cul);
#      76                 :       5278 :     __m128i g = K(0x1f83d9abul);
#      77                 :       5278 :     __m128i h = K(0x5be0cd19ul);
#      78                 :            : 
#      79                 :       5278 :     __m128i w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
#      80                 :            : 
#      81                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x428a2f98ul), w0 = Read4(in, 0)));
#      82                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x71374491ul), w1 = Read4(in, 4)));
#      83                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb5c0fbcful), w2 = Read4(in, 8)));
#      84                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xe9b5dba5ul), w3 = Read4(in, 12)));
#      85                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x3956c25bul), w4 = Read4(in, 16)));
#      86                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x59f111f1ul), w5 = Read4(in, 20)));
#      87                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x923f82a4ul), w6 = Read4(in, 24)));
#      88                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0xab1c5ed5ul), w7 = Read4(in, 28)));
#      89                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0xd807aa98ul), w8 = Read4(in, 32)));
#      90                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x12835b01ul), w9 = Read4(in, 36)));
#      91                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x243185beul), w10 = Read4(in, 40)));
#      92                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x550c7dc3ul), w11 = Read4(in, 44)));
#      93                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x72be5d74ul), w12 = Read4(in, 48)));
#      94                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x80deb1feul), w13 = Read4(in, 52)));
#      95                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x9bdc06a7ul), w14 = Read4(in, 56)));
#      96                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc19bf174ul), w15 = Read4(in, 60)));
#      97                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0xe49b69c1ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#      98                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xefbe4786ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#      99                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x0fc19dc6ul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     100                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x240ca1ccul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     101                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x2de92c6ful), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     102                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4a7484aaul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     103                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5cb0a9dcul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     104                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x76f988daul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     105                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x983e5152ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     106                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa831c66dul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     107                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb00327c8ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     108                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xbf597fc7ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     109                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0xc6e00bf3ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     110                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd5a79147ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     111                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x06ca6351ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     112                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x14292967ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     113                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x27b70a85ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     114                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x2e1b2138ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     115                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x4d2c6dfcul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     116                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x53380d13ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     117                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x650a7354ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     118                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x766a0abbul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     119                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x81c2c92eul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     120                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x92722c85ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     121                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0xa2bfe8a1ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     122                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa81a664bul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     123                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xc24b8b70ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     124                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xc76c51a3ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     125                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0xd192e819ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     126                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd6990624ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     127                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0xf40e3585ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     128                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x106aa070ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     129                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x19a4c116ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     130                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x1e376c08ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     131                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x2748774cul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     132                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x34b0bcb5ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     133                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x391c0cb3ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     134                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4ed8aa4aul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     135                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5b9cca4ful), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     136                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x682e6ff3ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     137                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x748f82eeul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     138                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x78a5636ful), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     139                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x84c87814ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     140                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x8cc70208ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     141                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x90befffaul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     142                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xa4506cebul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     143                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0xbef9a3f7ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     144                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc67178f2ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     145                 :            : 
#     146                 :       5278 :     a = Add(a, K(0x6a09e667ul));
#     147                 :       5278 :     b = Add(b, K(0xbb67ae85ul));
#     148                 :       5278 :     c = Add(c, K(0x3c6ef372ul));
#     149                 :       5278 :     d = Add(d, K(0xa54ff53aul));
#     150                 :       5278 :     e = Add(e, K(0x510e527ful));
#     151                 :       5278 :     f = Add(f, K(0x9b05688cul));
#     152                 :       5278 :     g = Add(g, K(0x1f83d9abul));
#     153                 :       5278 :     h = Add(h, K(0x5be0cd19ul));
#     154                 :            : 
#     155                 :       5278 :     __m128i t0 = a, t1 = b, t2 = c, t3 = d, t4 = e, t5 = f, t6 = g, t7 = h;
#     156                 :            : 
#     157                 :            :     // Transform 2
#     158                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0xc28a2f98ul));
#     159                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0x71374491ul));
#     160                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0xb5c0fbcful));
#     161                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0xe9b5dba5ul));
#     162                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x3956c25bul));
#     163                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x59f111f1ul));
#     164                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x923f82a4ul));
#     165                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xab1c5ed5ul));
#     166                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0xd807aa98ul));
#     167                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0x12835b01ul));
#     168                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0x243185beul));
#     169                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x550c7dc3ul));
#     170                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x72be5d74ul));
#     171                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x80deb1feul));
#     172                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x9bdc06a7ul));
#     173                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xc19bf374ul));
#     174                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0x649b69c1ul));
#     175                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0xf0fe4786ul));
#     176                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0x0fe1edc6ul));
#     177                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x240cf254ul));
#     178                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x4fe9346ful));
#     179                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x6cc984beul));
#     180                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x61b9411eul));
#     181                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0x16f988faul));
#     182                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0xf2c65152ul));
#     183                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0xa88e5a6dul));
#     184                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0xb019fc65ul));
#     185                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0xb9d99ec7ul));
#     186                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x9a1231c3ul));
#     187                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0xe70eeaa0ul));
#     188                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0xfdb1232bul));
#     189                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xc7353eb0ul));
#     190                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0x3069bad5ul));
#     191                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0xcb976d5ful));
#     192                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0x5a0f118ful));
#     193                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0xdc1eeefdul));
#     194                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x0a35b689ul));
#     195                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0xde0b7a04ul));
#     196                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x58f4ca9dul));
#     197                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xe15d5b16ul));
#     198                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0x007f3e86ul));
#     199                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0x37088980ul));
#     200                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0xa507ea32ul));
#     201                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x6fab9537ul));
#     202                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x17406110ul));
#     203                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x0d8cd6f1ul));
#     204                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0xcdaa3b6dul));
#     205                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xc0bbbe37ul));
#     206                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0x83613bdaul));
#     207                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0xdb48a363ul));
#     208                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0x0b02e931ul));
#     209                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x6fd15ca7ul));
#     210                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x521afacaul));
#     211                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x31338431ul));
#     212                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x6ed41a95ul));
#     213                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0x6d437890ul));
#     214                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0xc39c91f2ul));
#     215                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0x9eccabbdul));
#     216                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0xb5c9a0e6ul));
#     217                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x532fb63cul));
#     218                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0xd2c741c6ul));
#     219                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x07237ea3ul));
#     220                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0xa4954b68ul));
#     221                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0x4c191d76ul));
#     222                 :            : 
#     223                 :       5278 :     w0 = Add(t0, a);
#     224                 :       5278 :     w1 = Add(t1, b);
#     225                 :       5278 :     w2 = Add(t2, c);
#     226                 :       5278 :     w3 = Add(t3, d);
#     227                 :       5278 :     w4 = Add(t4, e);
#     228                 :       5278 :     w5 = Add(t5, f);
#     229                 :       5278 :     w6 = Add(t6, g);
#     230                 :       5278 :     w7 = Add(t7, h);
#     231                 :            : 
#     232                 :            :     // Transform 3
#     233                 :       5278 :     a = K(0x6a09e667ul);
#     234                 :       5278 :     b = K(0xbb67ae85ul);
#     235                 :       5278 :     c = K(0x3c6ef372ul);
#     236                 :       5278 :     d = K(0xa54ff53aul);
#     237                 :       5278 :     e = K(0x510e527ful);
#     238                 :       5278 :     f = K(0x9b05688cul);
#     239                 :       5278 :     g = K(0x1f83d9abul);
#     240                 :       5278 :     h = K(0x5be0cd19ul);
#     241                 :            : 
#     242                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x428a2f98ul), w0));
#     243                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x71374491ul), w1));
#     244                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb5c0fbcful), w2));
#     245                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xe9b5dba5ul), w3));
#     246                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x3956c25bul), w4));
#     247                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x59f111f1ul), w5));
#     248                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x923f82a4ul), w6));
#     249                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0xab1c5ed5ul), w7));
#     250                 :       5278 :     Round(a, b, c, d, e, f, g, h, K(0x5807aa98ul));
#     251                 :       5278 :     Round(h, a, b, c, d, e, f, g, K(0x12835b01ul));
#     252                 :       5278 :     Round(g, h, a, b, c, d, e, f, K(0x243185beul));
#     253                 :       5278 :     Round(f, g, h, a, b, c, d, e, K(0x550c7dc3ul));
#     254                 :       5278 :     Round(e, f, g, h, a, b, c, d, K(0x72be5d74ul));
#     255                 :       5278 :     Round(d, e, f, g, h, a, b, c, K(0x80deb1feul));
#     256                 :       5278 :     Round(c, d, e, f, g, h, a, b, K(0x9bdc06a7ul));
#     257                 :       5278 :     Round(b, c, d, e, f, g, h, a, K(0xc19bf274ul));
#     258                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0xe49b69c1ul), Inc(w0, sigma0(w1))));
#     259                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xefbe4786ul), Inc(w1, K(0xa00000ul), sigma0(w2))));
#     260                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x0fc19dc6ul), Inc(w2, sigma1(w0), sigma0(w3))));
#     261                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x240ca1ccul), Inc(w3, sigma1(w1), sigma0(w4))));
#     262                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x2de92c6ful), Inc(w4, sigma1(w2), sigma0(w5))));
#     263                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4a7484aaul), Inc(w5, sigma1(w3), sigma0(w6))));
#     264                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5cb0a9dcul), Inc(w6, sigma1(w4), K(0x100ul), sigma0(w7))));
#     265                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x76f988daul), Inc(w7, sigma1(w5), w0, K(0x11002000ul))));
#     266                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x983e5152ul), w8 = Add(K(0x80000000ul), sigma1(w6), w1)));
#     267                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa831c66dul), w9 = Add(sigma1(w7), w2)));
#     268                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xb00327c8ul), w10 = Add(sigma1(w8), w3)));
#     269                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xbf597fc7ul), w11 = Add(sigma1(w9), w4)));
#     270                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0xc6e00bf3ul), w12 = Add(sigma1(w10), w5)));
#     271                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd5a79147ul), w13 = Add(sigma1(w11), w6)));
#     272                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x06ca6351ul), w14 = Add(sigma1(w12), w7, K(0x400022ul))));
#     273                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x14292967ul), w15 = Add(K(0x100ul), sigma1(w13), w8, sigma0(w0))));
#     274                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x27b70a85ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     275                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x2e1b2138ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     276                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x4d2c6dfcul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     277                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x53380d13ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     278                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x650a7354ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     279                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x766a0abbul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     280                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x81c2c92eul), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     281                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x92722c85ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     282                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0xa2bfe8a1ul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     283                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0xa81a664bul), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     284                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0xc24b8b70ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     285                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0xc76c51a3ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     286                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0xd192e819ul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     287                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xd6990624ul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     288                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0xf40e3585ul), Inc(w14, sigma1(w12), w7, sigma0(w15))));
#     289                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x106aa070ul), Inc(w15, sigma1(w13), w8, sigma0(w0))));
#     290                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x19a4c116ul), Inc(w0, sigma1(w14), w9, sigma0(w1))));
#     291                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x1e376c08ul), Inc(w1, sigma1(w15), w10, sigma0(w2))));
#     292                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x2748774cul), Inc(w2, sigma1(w0), w11, sigma0(w3))));
#     293                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x34b0bcb5ul), Inc(w3, sigma1(w1), w12, sigma0(w4))));
#     294                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x391c0cb3ul), Inc(w4, sigma1(w2), w13, sigma0(w5))));
#     295                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0x4ed8aa4aul), Inc(w5, sigma1(w3), w14, sigma0(w6))));
#     296                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0x5b9cca4ful), Inc(w6, sigma1(w4), w15, sigma0(w7))));
#     297                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0x682e6ff3ul), Inc(w7, sigma1(w5), w0, sigma0(w8))));
#     298                 :       5278 :     Round(a, b, c, d, e, f, g, h, Add(K(0x748f82eeul), Inc(w8, sigma1(w6), w1, sigma0(w9))));
#     299                 :       5278 :     Round(h, a, b, c, d, e, f, g, Add(K(0x78a5636ful), Inc(w9, sigma1(w7), w2, sigma0(w10))));
#     300                 :       5278 :     Round(g, h, a, b, c, d, e, f, Add(K(0x84c87814ul), Inc(w10, sigma1(w8), w3, sigma0(w11))));
#     301                 :       5278 :     Round(f, g, h, a, b, c, d, e, Add(K(0x8cc70208ul), Inc(w11, sigma1(w9), w4, sigma0(w12))));
#     302                 :       5278 :     Round(e, f, g, h, a, b, c, d, Add(K(0x90befffaul), Inc(w12, sigma1(w10), w5, sigma0(w13))));
#     303                 :       5278 :     Round(d, e, f, g, h, a, b, c, Add(K(0xa4506cebul), Inc(w13, sigma1(w11), w6, sigma0(w14))));
#     304                 :       5278 :     Round(c, d, e, f, g, h, a, b, Add(K(0xbef9a3f7ul), w14, sigma1(w12), w7, sigma0(w15)));
#     305                 :       5278 :     Round(b, c, d, e, f, g, h, a, Add(K(0xc67178f2ul), w15, sigma1(w13), w8, sigma0(w0)));
#     306                 :            : 
#     307                 :            :     // Output
#     308                 :       5278 :     Write4(out, 0, Add(a, K(0x6a09e667ul)));
#     309                 :       5278 :     Write4(out, 4, Add(b, K(0xbb67ae85ul)));
#     310                 :       5278 :     Write4(out, 8, Add(c, K(0x3c6ef372ul)));
#     311                 :       5278 :     Write4(out, 12, Add(d, K(0xa54ff53aul)));
#     312                 :       5278 :     Write4(out, 16, Add(e, K(0x510e527ful)));
#     313                 :       5278 :     Write4(out, 20, Add(f, K(0x9b05688cul)));
#     314                 :       5278 :     Write4(out, 24, Add(g, K(0x1f83d9abul)));
#     315                 :       5278 :     Write4(out, 28, Add(h, K(0x5be0cd19ul)));
#     316                 :       5278 : }
#     317                 :            : 
#     318                 :            : }
#     319                 :            : 
#     320                 :            : #endif

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