mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 17:35:45 +00:00
132 lines
8.3 KiB
C
132 lines
8.3 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 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/certs -I/home/runner/work/nim-waku/nim-waku/vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-nat-traversal/vendor/libnatpmp-upstream -DENABLE_STRNATPMPERR -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/examples/v2 -o nimcache/release/chat2/@m..@s..@svendor@snim-stew@sstew@sarrayops.nim.c.o nimcache/release/chat2/@m..@s..@svendor@snim-stew@sstew@sarrayops.nim.c */
|
|
#define NIM_INTBITS 64
|
|
|
|
#include "nimbase.h"
|
|
#include <string.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 tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
|
|
typedef struct NimStringDesc NimStringDesc;
|
|
typedef struct TGenericSeq TGenericSeq;
|
|
struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {NI a;
|
|
NI b;
|
|
};
|
|
struct TGenericSeq {NI len;
|
|
NI reserved;
|
|
};
|
|
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
|
|
};
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(void, assign__OmLpUUqeYw6Hqc9bPHaFu9bQ)(NU8* tgt, NI tgtLen_0, NU8* src, NI srcLen_0);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError)(void);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseAssert__gpGJG5CoQzE64skFd9bPG7A)(NimStringDesc* msg) __attribute__((noreturn));
|
|
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
|
|
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_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___PSFYKf019bRgQJbNL9awOXUA)(NU8* x_0, NI x_0Len_0);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
|
|
STRING_LITERAL(TM__fayjYEju4kjhSF7CGUwz5A_6, "different lengths for slice assignment: ", 40);
|
|
STRING_LITERAL(TM__fayjYEju4kjhSF7CGUwz5A_7, " vs ", 4);
|
|
|
|
#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 217 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
|
|
#line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
{
|
|
#line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
|
|
#line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
if (!!((src == NIM_NIL))) goto LA3_;
|
|
|
|
#line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
|
|
#line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
|
|
#line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
|
|
|
|
#line 220 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim"
|
|
(*dest).Sup.len += (*src).Sup.len; }
|
|
LA3_: ;
|
|
}
|
|
|
|
#line 71 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___PcCQmAfdUds9cWGauPahR7Q)(NU8* r, NI rLen_0, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA s, NU8* v, NI vLen_0) { NI a; NI b; NI L; NI TM__fayjYEju4kjhSF7CGUwz5A_2; NI TM__fayjYEju4kjhSF7CGUwz5A_3;
|
|
#line 74 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
a = s.a;
|
|
#line 75 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
b = s.b;
|
|
#line 76 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 76 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 76 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
if (nimSubInt(b, a, &TM__fayjYEju4kjhSF7CGUwz5A_2)) { raiseOverflow(); }; if (nimAddInt((NI)(TM__fayjYEju4kjhSF7CGUwz5A_2), ((NI) 1), &TM__fayjYEju4kjhSF7CGUwz5A_3)) { raiseOverflow(); }; L = (NI)(TM__fayjYEju4kjhSF7CGUwz5A_3);
|
|
#line 77 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
{ NI TM__fayjYEju4kjhSF7CGUwz5A_4; NI TM__fayjYEju4kjhSF7CGUwz5A_5;
|
|
#line 77 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 77 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
if (!(L == vLen_0)) goto LA3_;
|
|
|
|
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
if (nimAddInt(a, L, &TM__fayjYEju4kjhSF7CGUwz5A_4)) { raiseOverflow(); }; if (nimSubInt((NI)(TM__fayjYEju4kjhSF7CGUwz5A_4), ((NI) 1), &TM__fayjYEju4kjhSF7CGUwz5A_5)) { raiseOverflow(); }; if ((NI)(TM__fayjYEju4kjhSF7CGUwz5A_5)-a != -1 && ((NU)(a) >= (NU)(rLen_0) || (NU)((NI)(TM__fayjYEju4kjhSF7CGUwz5A_5)) >= (NU)(rLen_0))){ raiseIndexError(); }
|
|
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
assign__OmLpUUqeYw6Hqc9bPHaFu9bQ((NU8*)(r)+(a), ((NI)(TM__fayjYEju4kjhSF7CGUwz5A_5))-(a)+1, v, vLen_0);
|
|
}
|
|
goto LA1_;
|
|
LA3_: ;
|
|
{ NimStringDesc* T6_; NimStringDesc* T7_; NimStringDesc* T8_;
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
T6_ = (NimStringDesc*)0;
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
T7_ = (NimStringDesc*)0; T7_ = nimIntToStr(L);
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
T8_ = (NimStringDesc*)0; T8_ = dollar___PSFYKf019bRgQJbNL9awOXUA(v, vLen_0); T6_ = rawNewString((T7_ ? T7_->Sup.len : 0) + (T8_ ? T8_->Sup.len : 0) + 44);appendString(T6_, ((NimStringDesc*) &TM__fayjYEju4kjhSF7CGUwz5A_6));appendString(T6_, T7_);appendString(T6_, ((NimStringDesc*) &TM__fayjYEju4kjhSF7CGUwz5A_7));appendString(T6_, T8_);
|
|
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/arrayops.nim"
|
|
raiseAssert__gpGJG5CoQzE64skFd9bPG7A(T6_);
|
|
}
|
|
LA1_: ;
|
|
}
|