mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 09:26:38 +00:00
215 lines
14 KiB
C
215 lines
14 KiB
C
/* 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-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 -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 -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/start_network/stdlib_hashes.nim.c.o nimcache/release/start_network/stdlib_hashes.nim.c */
|
|
#define NIM_INTBITS 64
|
|
|
|
#include "nimbase.h"
|
|
#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 NimStringDesc NimStringDesc;
|
|
typedef struct TGenericSeq TGenericSeq;
|
|
struct TGenericSeq {NI len;
|
|
NI reserved;
|
|
};
|
|
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
|
|
};
|
|
N_LIB_PRIVATE N_NIMCALL(NI, murmurHash__CiCiZV9c7F9alrF1xV3QD1ag)(NU8* x_0, NI x_0Len_0);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseDivByZero)(void);
|
|
static N_INLINE(NIM_BOOL, nimDivInt)(NI a, NI b, NI* res);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
|
|
static N_INLINE(NU32, rotl32__7D6LSWJ2oWPOMqrc3axXgwhashes)(NU32 x_0, NI r);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError)(void);
|
|
|
|
#line 122 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
static N_INLINE(NIM_BOOL, nimDivInt)(NI a, NI b, NI* res) { NIM_BOOL result; result = (NIM_BOOL)0;
|
|
#line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
{ NIM_BOOL T3_;
|
|
#line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
T3_ = (NIM_BOOL)0;
|
|
#line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
T3_ = (a == ((NI) (IL64(-9223372036854775807) - IL64(1)))); if (!(T3_)) goto LA4_;
|
|
|
|
#line 117 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
T3_ = (b == ((NI) -1)); LA4_: ;
|
|
if (!T3_) goto LA5_;
|
|
|
|
#line 118 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
result = NIM_TRUE; }
|
|
goto LA1_;
|
|
LA5_: ;
|
|
{
|
|
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
|
|
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/integerops.nim"
|
|
(*res) = (NI)(a / b); }
|
|
LA1_: ;
|
|
return result;}
|
|
|
|
#line 143 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
static N_INLINE(NU32, rotl32__7D6LSWJ2oWPOMqrc3axXgwhashes)(NU32 x_0, NI r) { NU32 result; NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_5; result = (NU32)0;
|
|
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (nimSubInt(((NI) 32), r, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_5)) { raiseOverflow(); }; result = (NU32)((NU32)((NU64)(x_0) << (NU64)(r)) | (NU32)((NU32)(x_0) >> (NU64)((NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_5)))); return result;}
|
|
|
|
#line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(NI, murmurHash__CiCiZV9c7F9alrF1xV3QD1ag)(NU8* x_0, NI x_0Len_0) { NI result; NI size; NI stepSize; NI n_1; NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_2; NU32 h1; NI i; NU32 k1_2; NI rem; NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_6;{ result = (NI)0;
|
|
#line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
size = x_0Len_0;
|
|
#line 156 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
stepSize = ((NI) 4);
|
|
#line 157 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 157 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (stepSize == 0){ raiseDivByZero(); } if (nimDivInt(size, stepSize, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_2)) { raiseOverflow(); }; n_1 = (NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_2); h1 = (NU32)0;
|
|
#line 160 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
i = ((NI) 0); {
|
|
#line 163 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
while (1) { NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_3; NU32 k1; NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_4;
|
|
#line 163 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 163 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (nimMulInt(n_1, stepSize, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_3)) { raiseOverflow(); }; if (!(i < (NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_3))) goto LA2;
|
|
k1 = (NU32)0;
|
|
#line 171 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if ((NU)(i) >= (NU)(x_0Len_0)){ raiseIndexError2(i,x_0Len_0-1); } k1 = (*((NU32*) ((&x_0[i]))));
|
|
#line 172 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (nimAddInt(i, stepSize, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_4)) { raiseOverflow(); }; i = (NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_4);
|
|
#line 174 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 174 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1 = (NU32)((NU32)(k1) * (NU32)(((NU32) IL64(3432918353))));
|
|
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1 = rotl32__7D6LSWJ2oWPOMqrc3axXgwhashes(k1, ((NI) 15));
|
|
#line 176 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 176 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1 = (NU32)((NU32)(k1) * (NU32)(((NU32) 461845907)));
|
|
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ k1);
|
|
#line 179 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 179 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = rotl32__7D6LSWJ2oWPOMqrc3axXgwhashes(h1, ((NI) 13));
|
|
#line 180 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 180 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 180 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)((NU32)((NU32)((NU32)(h1) * (NU32)(((NU32) 5)))) + (NU32)(((NU32) IL64(3864292196)))); } LA2: ;
|
|
}
|
|
k1_2 = (NU32)0;
|
|
#line 184 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 184 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (stepSize == 0){ raiseDivByZero(); } if (nimModInt(size, stepSize, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_6)) { raiseOverflow(); }; rem = (NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_6); {
|
|
#line 185 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
while (1) { NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_7; NI TM__7tkD9cFJSchVDwHuwaY9bP9bA_8;
|
|
#line 185 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (!(((NI) 0) < rem)) goto LA4;
|
|
|
|
#line 186 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (nimSubInt(rem, ((NI) 1), &TM__7tkD9cFJSchVDwHuwaY9bP9bA_7)) { raiseOverflow(); }; rem = (NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_7);
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (nimAddInt(i, rem, &TM__7tkD9cFJSchVDwHuwaY9bP9bA_8)) { raiseOverflow(); }; if ((NU)((NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_8)) >= (NU)(x_0Len_0)){ raiseIndexError2((NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_8),x_0Len_0-1); } k1_2 = (NU32)((NU32)((NU64)(k1_2) << (NU64)(((NI) 8))) | ((NU32) (x_0[(NI)(TM__7tkD9cFJSchVDwHuwaY9bP9bA_8)]))); } LA4: ;
|
|
}
|
|
|
|
#line 188 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 188 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1_2 = (NU32)((NU32)(k1_2) * (NU32)(((NU32) IL64(3432918353))));
|
|
#line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1_2 = rotl32__7D6LSWJ2oWPOMqrc3axXgwhashes(k1_2, ((NI) 15));
|
|
#line 190 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 190 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
k1_2 = (NU32)((NU32)(k1_2) * (NU32)(((NU32) 461845907)));
|
|
#line 191 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 191 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ k1_2);
|
|
#line 194 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 194 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ ((NU32) (size)));
|
|
#line 195 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 195 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 195 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ (NU32)((NU32)(h1) >> (NU64)(((NI) 16))));
|
|
#line 196 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 196 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)((NU32)(h1) * (NU32)(((NU32) IL64(2246822507))));
|
|
#line 197 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 197 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 197 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ (NU32)((NU32)(h1) >> (NU64)(((NI) 13))));
|
|
#line 198 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 198 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)((NU32)(h1) * (NU32)(((NU32) IL64(3266489909))));
|
|
#line 199 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 199 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 199 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
h1 = (NU32)(h1 ^ (NU32)((NU32)(h1) >> (NU64)(((NI) 16))));
|
|
#line 200 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 200 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
result = ((NI) (h1)); goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;}
|
|
|
|
#line 211 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(NI, hash__6PCYkKlCNhq9cnRLnqWKkwQ)(NimStringDesc* x_0) { NI result; result = (NI)0;
|
|
#line 229 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
|
|
#line 229 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
if (((x_0 ? x_0->Sup.len : 0)-1)-((NI) 0) != -1 && ((NU)(((NI) 0)) >= (NU)(x_0 ? x_0->Sup.len : 0) || (NU)(((x_0 ? x_0->Sup.len : 0)-1)) >= (NU)(x_0 ? x_0->Sup.len : 0))){ raiseIndexError(); }
|
|
#line 229 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/hashes.nim"
|
|
result = murmurHash__CiCiZV9c7F9alrF1xV3QD1ag((NU8*)x_0->data+(((NI) 0)), (((x_0 ? x_0->Sup.len : 0)-1))-(((NI) 0))+1); return result;}
|