nwaku/nimcache/release/start_network2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svarint.nim.c

292 lines
20 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-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-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/v2/node -o nimcache/release/start_network2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svarint.nim.c.o nimcache/release/start_network2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svarint.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_Result__EU2D85u1tT2g3bs9aUSzTHw tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw;
typedef struct tyObject_Leb128Buf__9bzW7WZ9baNLvEUq6EAZWcQQ tyObject_Leb128Buf__9bzW7WZ9baNLvEUq6EAZWcQQ;
typedef struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA;
typedef struct tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg;
typedef struct tyTuple__lQTEq64iYzLA0LTdjMrTyA tyTuple__lQTEq64iYzLA0LTdjMrTyA;
typedef NU8 tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg;
struct tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw {NIM_BOOL o;
union{
struct {tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg e;
} _o_1;
};
};
typedef NU8 tyArray__aczTGVLbkjaI8GxGYP6HtA[10];
struct tyObject_Leb128Buf__9bzW7WZ9baNLvEUq6EAZWcQQ {tyArray__aczTGVLbkjaI8GxGYP6HtA data;
NI8 len;
};
struct tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA {NI a;
NI b;
};
struct tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg {tyArray__aczTGVLbkjaI8GxGYP6HtA data;
NI8 len;
};
struct tyTuple__lQTEq64iYzLA0LTdjMrTyA {
NU64 Field0;
NI8 Field1;
};
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(tyObject_Leb128Buf__9bzW7WZ9baNLvEUq6EAZWcQQ, toBytes__hhUsu00DKWf733XDSXxiMg)(NU64 v);
N_LIB_PRIVATE N_NIMCALL(void, X5BX5Deq___PcCQmAfdUds9cWGauPahR7Q)(NU8* r, NI rLen_0, tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA s, NU8* v, NI vLen_0);
static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___BokNSDrKN1xmV1nA01G9brAsystem)(NI a, NI b);
N_LIB_PRIVATE N_NOINLINE(void, chckNil)(void* p);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg, toBytes__iuJK1yQKhkDEFO4aAbuyeA)(NU v);
N_LIB_PRIVATE N_NIMCALL(tyTuple__lQTEq64iYzLA0LTdjMrTyA, fromBytes__7hWUjMBxLj9cxfulyDO6OAA)(NU8* x_0, NI x_0Len_0);
static N_INLINE(NI, vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint)(NU64 x_0);
N_LIB_PRIVATE N_NIMCALL(NI8, len__pONbWCTj2wIjLBtK9b8oQ3w)(NU64 x_0);
#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 459 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
static N_INLINE(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA, dotdot___BokNSDrKN1xmV1nA01G9brAsystem)(NI a, NI b) { tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA result; nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA));
#line 469 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA)); result.a = a; result.b = b; return result;}
#line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__6fSC1OMzKIBn5lnSoZxaJg)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU64 outval) { tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw result; tyObject_Leb128Buf__9bzW7WZ9baNLvEUq6EAZWcQQ bytes; nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw));
#line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
bytes = toBytes__hhUsu00DKWf733XDSXxiMg(outval);
#line 176 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outlen) = ((NI) (bytes.len));
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{ NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_2; tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA T5_; NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3;
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!((*outlen) <= pbytesLen_0)) goto LA3_;
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 2406 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
if (nimSubInt((*outlen), ((NI) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_2)) { raiseOverflow(); };
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
T5_ = dotdot___BokNSDrKN1xmV1nA01G9brAsystem(((NI) 0), (NI)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_2));
#line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/leb128.nim"
if (nimSubInt(bytes.len, ((NI8) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3)) { raiseOverflow(); }; if (TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3 < -128 || TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3 > 127){ raiseOverflow(); } if (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3)))-((NI) 0) != -1 && (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3)))-((NI) 0) < -1 || ((NI) 0) < 0 || ((NI) 0) > 9 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3))) < 0 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3))) > 9)){ raiseIndexError(); }
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
X5BX5Deq___PcCQmAfdUds9cWGauPahR7Q(pbytes, pbytesLen_0, T5_, (NU8*)((bytes.data)+(((NI) 0))), (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_3))))-(((NI) 0))+1);
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_TRUE; }
goto LA1_;
LA3_: ;
{ chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 4); }
LA1_: ;
return result;}
#line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__79azrOXTpUUttfPZGnOajHw)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU outval) { tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw result; tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg bytes; nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw));
#line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
bytes = toBytes__iuJK1yQKhkDEFO4aAbuyeA(outval);
#line 176 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outlen) = ((NI) (bytes.len));
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{ NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_4; tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA T5_; NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5;
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!((*outlen) <= pbytesLen_0)) goto LA3_;
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 2406 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
if (nimSubInt((*outlen), ((NI) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_4)) { raiseOverflow(); };
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
T5_ = dotdot___BokNSDrKN1xmV1nA01G9brAsystem(((NI) 0), (NI)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_4));
#line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/leb128.nim"
if (nimSubInt(bytes.len, ((NI8) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5)) { raiseOverflow(); }; if (TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5 < -128 || TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5 > 127){ raiseOverflow(); } if (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5)))-((NI) 0) != -1 && (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5)))-((NI) 0) < -1 || ((NI) 0) < 0 || ((NI) 0) > 9 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5))) < 0 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5))) > 9)){ raiseIndexError(); }
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
X5BX5Deq___PcCQmAfdUds9cWGauPahR7Q(pbytes, pbytesLen_0, T5_, (NU8*)((bytes.data)+(((NI) 0))), (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_5))))-(((NI) 0))+1);
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_TRUE; }
goto LA1_;
LA3_: ;
{ chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 4); }
LA1_: ;
return result;}
#line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__otpik4CuaU29aQKjm9bz9c2Qg)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU outval) { tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw result; tyObject_Leb128Buf__GUQ4yCTJYfeDKXfLstDw9cg bytes;{ nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw));
#line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 172 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{
#line 172 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 172 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 172 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!!(((NU64)(((NU64) (outval)) & 9223372036854775808ULL) == 0ULL))) goto LA3_;
#line 173 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 173 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 1); goto BeforeRet_;
}
LA3_: ;
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 175 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
bytes = toBytes__iuJK1yQKhkDEFO4aAbuyeA(outval);
#line 176 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outlen) = ((NI) (bytes.len));
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{ NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_6; tyObject_HSlice__EE5dzjqoOrHT6HJhIPXAvA T9_; NI TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7;
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 177 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!((*outlen) <= pbytesLen_0)) goto LA7_;
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 2406 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
if (nimSubInt((*outlen), ((NI) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_6)) { raiseOverflow(); };
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
T9_ = dotdot___BokNSDrKN1xmV1nA01G9brAsystem(((NI) 0), (NI)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_6));
#line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/leb128.nim"
if (nimSubInt(bytes.len, ((NI8) 1), &TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7)) { raiseOverflow(); }; if (TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7 < -128 || TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7 > 127){ raiseOverflow(); } if (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7)))-((NI) 0) != -1 && (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7)))-((NI) 0) < -1 || ((NI) 0) < 0 || ((NI) 0) > 9 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7))) < 0 || ((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7))) > 9)){ raiseIndexError(); }
#line 178 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
X5BX5Deq___PcCQmAfdUds9cWGauPahR7Q(pbytes, pbytesLen_0, T9_, (NU8*)((bytes.data)+(((NI) 0))), (((NI) ((NI8)(TM__BEZ6VAYlsKWY2hLQE9cF1AQ_7))))-(((NI) 0))+1);
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_TRUE; }
goto LA5_;
LA7_: ;
{ chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 4); }
LA5_: ;
}BeforeRet_: ;
return result;}
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
static N_INLINE(NI, vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint)(NU64 x_0) { NI result; NI8 T1_; result = (NI)0;
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
T1_ = (NI8)0; T1_ = len__pONbWCTj2wIjLBtK9b8oQ3w(x_0); result = ((NI) (T1_)); return result;}
#line 105 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, getUVarint__8Fv9a4AsBnhOSlTNa6xhluw)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU64* outval) { tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw result; tyTuple__lQTEq64iYzLA0LTdjMrTyA parsed; tyTuple__lQTEq64iYzLA0LTdjMrTyA _;{ nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw));
#line 109 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 130 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outlen) = ((NI) 0);
#line 131 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outval) = 0ULL;
#line 133 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 133 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
parsed = fromBytes__7hWUjMBxLj9cxfulyDO6OAA(pbytes, pbytesLen_0);
#line 135 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{
#line 135 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!(parsed.Field1 == ((NI8) 0))) goto LA3_;
#line 136 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 136 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 2); goto BeforeRet_;
}
LA3_: ;
#line 137 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{
#line 137 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!(parsed.Field1 < ((NI8) 0))) goto LA7_;
#line 138 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 138 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 1); goto BeforeRet_;
}
LA7_: ;
#line 141 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{
#line 141 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
if (!((NU64)(9223372036854775808ULL) <= (NU64)(parsed.Field0))) goto LA11_;
#line 142 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 142 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 1); goto BeforeRet_;
}
LA11_: ;
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
{ NI T15_;
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
T15_ = (NI)0; T15_ = vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint(parsed.Field0); if (!!((T15_ == ((NI) (parsed.Field1))))) goto LA16_;
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg) 3); goto BeforeRet_;
}
LA16_: ;
#line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
_ = parsed;
#line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outval) = _.Field0;
#line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
(*outlen) = ((NI) (_.Field1)); chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw)); result.o = NIM_TRUE; }BeforeRet_: ;
return result;}