/* Generated by Nim Compiler v1.2.6 */ /* (c) 2020 Andreas Rumpf */ /* The generated code is subject to the original license. */ /* Compiled for: Linux, amd64, gcc */ /* Command for C compiler: gcc -c -w -pthread -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/install/usr/include -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/src -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/inc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/tools -DBR_USE_UNIX_TIME=1 -DBR_USE_URANDOM=1 -DBR_LE_UNALIGNED=1 -DBR_64=1 -DBR_amd64=1 -DBR_INT128=1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/certs -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1/src -DHAVE_CONFIG_H -DHAVE_BUILTIN_EXPECT -march=native -g3 -Og -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib -I/home/runner/work/nim-waku/nim-waku/waku/v1/node -o nimcache/release/quicksim/@m..@s..@s..@svendor@snimcrypto@snimcrypto@shmac.nim.c.o nimcache/release/quicksim/@m..@s..@s..@svendor@snimcrypto@snimcrypto@shmac.nim.c */ #define NIM_INTBITS 64 #include "nimbase.h" #include #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef linux #undef mips #undef near #undef far #undef powerpc #undef unix #define nimfr_(x, y) #define nimln_(x, y) typedef struct tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg; typedef struct tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w; typedef struct tyObject_MDigest__law9ct65KplMYBvtmjCQxbw tyObject_MDigest__law9ct65KplMYBvtmjCQxbw; typedef NU8 tyArray__YyRa69aN4VsyfqqzTn4sexg[64]; typedef NU32 tyArray__JlnxiR65D9cjJpwi6uBZRtA[2]; typedef NU32 tyArray__MpWsq9bBH14GsDQQ59cgyxAQ[8]; typedef NU8 tyArray__w5VB8h5K8DB3oWrO5U2wqg[64]; struct tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w {tyArray__JlnxiR65D9cjJpwi6uBZRtA count; tyArray__MpWsq9bBH14GsDQQ59cgyxAQ state; tyArray__w5VB8h5K8DB3oWrO5U2wqg buffer; }; struct tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg {tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w mdctx; tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w opadctx; tyArray__w5VB8h5K8DB3oWrO5U2wqg ipad; tyArray__w5VB8h5K8DB3oWrO5U2wqg opad; }; typedef NU8 tyArray__vEOa9c5qaE9ajWxR5R4zwfQg[32]; struct tyObject_MDigest__law9ct65KplMYBvtmjCQxbw {tyArray__vEOa9c5qaE9ajWxR5R4zwfQg data; }; typedef NU8 tyArray__cleXh9bMEnUU9aNvjKX8m6BA[32]; static N_INLINE(void, nimZeroMem)(void* p, NI size); static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size); static N_INLINE(void, init__C8fXqRtxb2ILgkwYRN3qiQsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx); static N_INLINE(void, update__JVKV5lsc6z00iHHbNwyg9bAsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx, NU8* data_0, NI data_0Len_0); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size); static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b); N_LIB_PRIVATE N_NIMCALL(void, sha256Transform__BJNBQtWr9bJwzqbyfKXd38Q)(NU32* state_0, NU8* data_0, NI data_0Len_0); static N_INLINE(NU, finish__XWD9ckGqZzLMH9bax9c7RDdGgsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx, NU8* data_0, NI data_0Len_0); static N_INLINE(void, finalize256__C8fXqRtxb2ILgkwYRN3qiQ_2sha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx); static N_INLINE(NU, finish__21C9bb9bs8ZSGFBr7oxmCmkghmac)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* hmctx, NU8* data_0, NI data_0Len_0); static N_INLINE(void, burnMem__phd1a7AIFSvoPLH7cyoVugutils)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* a); N_LIB_PRIVATE N_NIMCALL(void, burnMem__haAOjkJjOuRy8ux9bV57dXw)(void* p_0, NI size); #line 22 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) { void* T1_; #line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" #line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" T1_ = (void*)0; T1_ = memset(a, v, ((size_t) (size)));} #line 33 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" static N_INLINE(void, nimZeroMem)(void* p, NI size) { #line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" #line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size); } #line 134 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" static N_INLINE(void, init__C8fXqRtxb2ILgkwYRN3qiQsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx) { #line 135 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 0))- 0] = ((NU32) 0); #line 136 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 1))- 0] = ((NU32) 0); #line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 0))- 0] = ((NU32) 1779033703); #line 148 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 1))- 0] = ((NU32) IL64(3144134277)); #line 149 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 2))- 0] = ((NU32) 1013904242); #line 150 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 3))- 0] = ((NU32) IL64(2773480762)); #line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 4))- 0] = ((NU32) 1359893119); #line 152 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 5))- 0] = ((NU32) IL64(2600822924)); #line 153 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 6))- 0] = ((NU32) 528734635); #line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).state[(((NI) 7))- 0] = ((NU32) 1541459225);} #line 11 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) { void* T1_; #line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" #line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" T1_ = (void*)0; T1_ = memcpy(dest, source, ((size_t) (size)));} #line 2112 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) { #line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" #line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" nimCopyMem(dest, source, size); } #line 459 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" static N_INLINE(void, update__JVKV5lsc6z00iHHbNwyg9bAsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx, NU8* data_0, NI data_0Len_0) { NI pos; NI length; #line 460 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" pos = ((NI) 0); #line 461 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 461 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" length = data_0Len_0; { #line 464 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" while (1) { NI offset; NI size; NI TM__iWC69c0ckqOdru66K5Xl1xA_2; NI TM__iWC69c0ckqOdru66K5Xl1xA_3; NI TM__iWC69c0ckqOdru66K5Xl1xA_4; NI TM__iWC69c0ckqOdru66K5Xl1xA_5; #line 464 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!(((NI) 0) < length)) goto LA2; #line 465 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 465 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" offset = ((NI) ((NU32)((*ctx).count[(((NI) 0))- 0] & ((NU32) 63)))); #line 466 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 466 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 466 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (nimSubInt(((NI) 64), offset, &TM__iWC69c0ckqOdru66K5Xl1xA_2)) { raiseOverflow(); }; size = (((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_2) <= length) ? (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_2) : length); #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" if ((NU)(offset) > (NU)(63)){ raiseIndexError2(offset, 63); } if ((NU)(pos) >= (NU)(data_0Len_0)){ raiseIndexError2(pos,data_0Len_0-1); } #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" if (nimMulInt(size, ((NI) 1), &TM__iWC69c0ckqOdru66K5Xl1xA_3)) { raiseOverflow(); }; if (((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_3)) < ((NI) 0) || ((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_3)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_3), ((NI) 0), ((NI) IL64(9223372036854775807))); } #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*ctx).buffer[(offset)- 0]))), ((void*) ((&data_0[pos]))), ((NI) ((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_3)))); #line 468 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 468 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (nimAddInt(pos, size, &TM__iWC69c0ckqOdru66K5Xl1xA_4)) { raiseOverflow(); }; pos = (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_4); #line 469 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 469 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (nimSubInt(length, size, &TM__iWC69c0ckqOdru66K5Xl1xA_5)) { raiseOverflow(); }; length = (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_5); #line 470 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 470 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 0))- 0] = (NU32)((NU32)((*ctx).count[(((NI) 0))- 0]) + (NU32)(((NU32) (size)))); #line 471 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" { #line 471 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!((NU32)((*ctx).count[(((NI) 0))- 0]) < (NU32)(((NU32) (size))))) goto LA5_; #line 472 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 472 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 1))- 0] = (NU32)((NU32)((*ctx).count[(((NI) 1))- 0]) + (NU32)(((NU32) 1))); } LA5_: ; #line 473 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" { #line 473 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 473 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!((NU32)((*ctx).count[(((NI) 0))- 0] & ((NU32) 63)) == ((NU32) 0))) goto LA9_; #line 474 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 474 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" sha256Transform__BJNBQtWr9bJwzqbyfKXd38Q((*ctx).state, (*ctx).buffer, 64); } LA9_: ; } LA2: ; } } #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" static N_INLINE(void, finalize256__C8fXqRtxb2ILgkwYRN3qiQ_2sha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx) { NI j; NI TM__iWC69c0ckqOdru66K5Xl1xA_6; #line 493 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 493 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" j = ((NI) ((NU32)((*ctx).count[(((NI) 0))- 0] & ((NU32) 63)))); if ((NU)(j) > (NU)(63)){ raiseIndexError2(j, 63); } #line 494 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).buffer[(j)- 0] = ((NU8) 128); #line 495 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (nimAddInt(j, ((NI) 1), &TM__iWC69c0ckqOdru66K5Xl1xA_6)) { raiseOverflow(); }; j = (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_6); { #line 496 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" while (1) { NI TM__iWC69c0ckqOdru66K5Xl1xA_7; #line 496 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 496 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!!((j == ((NI) 56)))) goto LA2; #line 497 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" { #line 497 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!(j == ((NI) 64))) goto LA5_; #line 498 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 498 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" sha256Transform__BJNBQtWr9bJwzqbyfKXd38Q((*ctx).state, (*ctx).buffer, 64); #line 499 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" j = ((NI) 0); } LA5_: ; if ((NU)(j) > (NU)(63)){ raiseIndexError2(j, 63); } #line 500 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).buffer[(j)- 0] = ((NU8) 0); #line 501 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (nimAddInt(j, ((NI) 1), &TM__iWC69c0ckqOdru66K5Xl1xA_7)) { raiseOverflow(); }; j = (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_7); } LA2: ; } #line 502 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 502 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 502 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 502 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 1))- 0] = (NU32)((NU32)((NU32)((NU64)((*ctx).count[(((NI) 1))- 0]) << (NU64)(((NI) 3)))) + (NU32)((NU32)((NU32)((*ctx).count[(((NI) 0))- 0]) >> (NU64)(((NI) 29))))); #line 503 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 503 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" (*ctx).count[(((NI) 0))- 0] = (NU32)((NU64)((*ctx).count[(((NI) 0))- 0]) << (NU64)(((NI) 3))); #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&(*ctx).buffer[(((NI) 56))- 0])))) = __builtin_bswap32((*ctx).count[(((NI) 1))- 0]); #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&(*ctx).buffer[(((NI) 60))- 0])))) = __builtin_bswap32((*ctx).count[(((NI) 0))- 0]); #line 506 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 506 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" sha256Transform__BJNBQtWr9bJwzqbyfKXd38Q((*ctx).state, (*ctx).buffer, 64); } #line 524 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" static N_INLINE(NU, finish__XWD9ckGqZzLMH9bax9c7RDdGgsha2)(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w* ctx, NU8* data_0, NI data_0Len_0) { NU result; result = (NU)0; #line 526 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" result = ((NU) 0); #line 539 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" { #line 539 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 539 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" if (!(((NI) 32) <= data_0Len_0)) goto LA3_; #line 540 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" #line 540 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" finalize256__C8fXqRtxb2ILgkwYRN3qiQ_2sha2(ctx); #line 541 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/sha2.nim" result = ((NU) 32); if ((NU)(((NI) 0)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 0),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 0)])))) = __builtin_bswap32((*ctx).state[(((NI) 0))- 0]); if ((NU)(((NI) 4)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 4),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 4)])))) = __builtin_bswap32((*ctx).state[(((NI) 1))- 0]); if ((NU)(((NI) 8)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 8),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 8)])))) = __builtin_bswap32((*ctx).state[(((NI) 2))- 0]); if ((NU)(((NI) 12)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 12),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 12)])))) = __builtin_bswap32((*ctx).state[(((NI) 3))- 0]); if ((NU)(((NI) 16)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 16),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 16)])))) = __builtin_bswap32((*ctx).state[(((NI) 4))- 0]); if ((NU)(((NI) 20)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 20),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 20)])))) = __builtin_bswap32((*ctx).state[(((NI) 5))- 0]); if ((NU)(((NI) 24)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 24),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 24)])))) = __builtin_bswap32((*ctx).state[(((NI) 6))- 0]); if ((NU)(((NI) 28)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 28),data_0Len_0-1); } #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 373 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" (*((NU32*) ((&data_0[((NI) 28)])))) = __builtin_bswap32((*ctx).state[(((NI) 7))- 0]); } LA3_: ; return result;} #line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" N_LIB_PRIVATE N_NIMCALL(void, init__XO79cz0G5x9bYWx3NREUG23g)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* hmctx, NU8* key_0, NI key_0Len_0) { tyArray__YyRa69aN4VsyfqqzTn4sexg kpad; tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w T1_; tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w T2_; nimZeroMem((void*)kpad, sizeof(tyArray__YyRa69aN4VsyfqqzTn4sexg)); #line 111 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" nimZeroMem((void*)(&T1_), sizeof(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w)); (*hmctx).mdctx = T1_; #line 112 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" nimZeroMem((void*)(&T2_), sizeof(tyObject_Sha2Context__5brAquljQjPUyNuIC4vV1w)); (*hmctx).opadctx = T2_; #line 113 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 113 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" init__C8fXqRtxb2ILgkwYRN3qiQsha2((&(*hmctx).opadctx)); #line 115 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" { #line 115 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 115 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if (!(((NI) 0) < key_0Len_0)) goto LA5_; #line 116 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" { NU T11_; #line 116 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 116 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if (!(((NI) 64) < key_0Len_0)) goto LA9_; #line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" init__C8fXqRtxb2ILgkwYRN3qiQsha2((&(*hmctx).mdctx)); #line 118 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 118 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" update__JVKV5lsc6z00iHHbNwyg9bAsha2((&(*hmctx).mdctx), key_0, key_0Len_0); #line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" T11_ = (NU)0; T11_ = finish__XWD9ckGqZzLMH9bax9c7RDdGgsha2((&(*hmctx).mdctx), kpad, 64); (void)(T11_); } goto LA7_; LA9_: ; { NI TM__iWC69c0ckqOdru66K5Xl1xA_8; #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" if ((NU)(((NI) 0)) >= (NU)(key_0Len_0)){ raiseIndexError2(((NI) 0),key_0Len_0-1); } #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 121 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if (nimMulInt(key_0Len_0, ((NI) 1), &TM__iWC69c0ckqOdru66K5Xl1xA_8)) { raiseOverflow(); }; if (((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_8)) < ((NI) 0) || ((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_8)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_8), ((NI) 0), ((NI) IL64(9223372036854775807))); } #line 417 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&kpad[(((NI) 0))- 0]))), ((void*) ((&key_0[((NI) 0)]))), ((NI) ((NI)(TM__iWC69c0ckqOdru66K5Xl1xA_8)))); } LA7_: ; } LA5_: ; { NI i; NI i_2; i = (NI)0; #line 106 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim" i_2 = ((NI) 0); { #line 107 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim" while (1) { NI TM__iWC69c0ckqOdru66K5Xl1xA_9; #line 107 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim" if (!(i_2 < ((NI) 64))) goto LA15; #line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" i = i_2; if ((NU)(i) > (NU)(63)){ raiseIndexError2(i, 63); } #line 124 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 124 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if ((NU)(i) > (NU)(63)){ raiseIndexError2(i, 63); } (*hmctx).opad[(i)- 0] = (NU8)(((NU8) 92) ^ kpad[(i)- 0]); if ((NU)(i) > (NU)(63)){ raiseIndexError2(i, 63); } #line 125 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 125 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if ((NU)(i) > (NU)(63)){ raiseIndexError2(i, 63); } (*hmctx).ipad[(i)- 0] = (NU8)(((NU8) 54) ^ kpad[(i)- 0]); #line 109 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators_1.nim" if (nimAddInt(i_2, ((NI) 1), &TM__iWC69c0ckqOdru66K5Xl1xA_9)) { raiseOverflow(); }; i_2 = (NI)(TM__iWC69c0ckqOdru66K5Xl1xA_9); } LA15: ; } } #line 127 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 127 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" init__C8fXqRtxb2ILgkwYRN3qiQsha2((&(*hmctx).mdctx)); #line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" update__JVKV5lsc6z00iHHbNwyg9bAsha2((&(*hmctx).mdctx), (*hmctx).ipad, 64); #line 129 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 129 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" update__JVKV5lsc6z00iHHbNwyg9bAsha2((&(*hmctx).opadctx), (*hmctx).opad, 64); } #line 197 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" static N_INLINE(NU, finish__21C9bb9bs8ZSGFBr7oxmCmkghmac)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* hmctx, NU8* data_0, NI data_0Len_0) { NU result; result = (NU)0; #line 203 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" { tyArray__cleXh9bMEnUU9aNvjKX8m6BA buffer; NU T5_; #line 203 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 203 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" if (!(((NI) 32) <= data_0Len_0)) goto LA3_; nimZeroMem((void*)buffer, sizeof(tyArray__cleXh9bMEnUU9aNvjKX8m6BA)); #line 205 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 205 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 205 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" T5_ = (NU)0; T5_ = finish__XWD9ckGqZzLMH9bax9c7RDdGgsha2((&(*hmctx).mdctx), buffer, 32); (void)(T5_); #line 206 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 206 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" update__JVKV5lsc6z00iHHbNwyg9bAsha2((&(*hmctx).opadctx), buffer, 32); #line 207 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 207 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" result = finish__XWD9ckGqZzLMH9bax9c7RDdGgsha2((&(*hmctx).opadctx), data_0, data_0Len_0); } LA3_: ; return result;} #line 216 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" N_LIB_PRIVATE N_NIMCALL(tyObject_MDigest__law9ct65KplMYBvtmjCQxbw, finish__cp8Ckr7vep0RujvudVTNTg)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* hmctx) { tyObject_MDigest__law9ct65KplMYBvtmjCQxbw result; NU T1_; nimZeroMem((void*)(&result), sizeof(tyObject_MDigest__law9ct65KplMYBvtmjCQxbw)); #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" T1_ = (NU)0; T1_ = finish__21C9bb9bs8ZSGFBr7oxmCmkghmac(hmctx, result.data, 32); (void)(T1_); return result;} #line 194 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" static N_INLINE(void, burnMem__phd1a7AIFSvoPLH7cyoVugutils)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* a) { #line 195 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" #line 195 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/utils.nim" burnMem__haAOjkJjOuRy8ux9bV57dXw(((void*) (a)), ((NI) 336)); } #line 138 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" N_LIB_PRIVATE N_NIMCALL(void, clear__3PkHS3KRpSG9bEaZCBbhR4w)(tyObject_HMAC__CxVfcs3qQxev4nVq3Txjyg* hmctx) { #line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" #line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nimcrypto/nimcrypto/hmac.nim" burnMem__phd1a7AIFSvoPLH7cyoVugutils(hmctx); }