nwaku/nimcache/release/quicksim2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svbuffer.nim.c

700 lines
51 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-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/v2/node -o nimcache/release/quicksim2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svbuffer.nim.c.o nimcache/release/quicksim2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@svbuffer.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_VBuffer__pgrKDkZLiJID3rDHrYm5UA tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA;
typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ tySequence__6H5Oh5UUvVCLiakt9aTwtUQ;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw;
typedef struct TGenericSeq TGenericSeq;
typedef struct NimStringDesc NimStringDesc;
struct tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA {tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* buffer;
NI offset;
};
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {NI size;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
NCSTRING name;
TNimType* nextType;
NI instances;
NI sizes;
};
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef NU8 tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg;
struct tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw {NIM_BOOL o;
union{
struct {tyEnum_VarintError__z9coCVKRSy09c3xCpPfzuFKg e;
} _o_1;
};
};
struct TGenericSeq {NI len;
NI reserved;
};
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ { TGenericSeq Sup; NU8 data[SEQ_DECL_SIZE];};N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, getUVarint__8Fv9a4AsBnhOSlTNa6xhluw)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU64* outval);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, setLengthSeqV2)(TGenericSeq* s, TNimType* typ, NI newLen);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* 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_NOINLINE(void, raiseIndexError2)(NI i, NI n);
static N_INLINE(NI, vsizeof__u9bwDD5HhoG7HxvmDQNcufAvarint)(NU x_0);
N_LIB_PRIVATE N_NIMCALL(NI8, len__pONbWCTj2wIjLBtK9b8oQ3w)(NU64 x_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__otpik4CuaU29aQKjm9bz9c2Qg)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU outval);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
N_LIB_PRIVATE N_NOINLINE(void, chckNil)(void* p);
N_LIB_PRIVATE N_NIMCALL(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*, newSeq__DpCWN7DIBuAjgoeQ9c29blYQ)(NI len);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewSeqOfCap)(TNimType* typ, NI cap);
N_LIB_PRIVATE N_NIMCALL(void, writeLPVarint__vZ9cuk2OqyYk5NOwngVO0kg_2)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU value_0);
N_LIB_PRIVATE N_NIMCALL(void, writeLPVarint__Z9cWX2313hWAaF9bdWMVmaXw_2)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU64 value_0);
static N_INLINE(NI, vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint)(NU64 x_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__h0KNoWke9cXqQmQoqHzdBfg)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU64 outval);
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw, putUVarint__6fSC1OMzKIBn5lnSoZxaJg)(NU8* pbytes, NI pbytesLen_0, NI* outlen, NU64 outval);
N_LIB_PRIVATE TNimType NTI__pgrKDkZLiJID3rDHrYm5UA_;
extern TNimType NTI__6H5Oh5UUvVCLiakt9aTwtUQ_;
extern TNimType NTI__rR5Bzr1D5krxoo1NcNyeMA_;
STRING_LITERAL(TM__ghRWGsc3CxkAWrmSFAwARg_10, "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vb"
"uffer.nim(95, 11) `res.isOk()` ", 94);
STRING_LITERAL(TM__ghRWGsc3CxkAWrmSFAwARg_20, "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vb"
"uffer.nim(82, 11) `res.isOk()` ", 94);
STRING_LITERAL(TM__ghRWGsc3CxkAWrmSFAwARg_35, "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vb"
"uffer.nim(71, 11) `res.isOk()` ", 94);
extern TNimType* nimTypeRoot;
#line 113 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(NI, peekVarint__xzn9cCWN2k9a885kfCCh6Hww)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU64* value_0) { NI result; NI length; result = (NI)0;
#line 119 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = ((NI) -1);
#line 120 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
(*value_0) = ((NU64) (((NI) 0)));
#line 121 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 122 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_3; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T6_;
#line 122 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 122 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T3_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_3)) { raiseOverflow(); }; if (!!(((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_3) <= ((NI) 0)))) goto LA4_;
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 124 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T6_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T6_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T6_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = getUVarint__8Fv9a4AsBnhOSlTNa6xhluw((NU8*)(*vb).buffer->data+((*vb).offset), (T6_)-((*vb).offset)+1, (&length), value_0);
#line 125 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ if (!res.o) goto LA9_;
#line 126 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = length; }
LA9_: ;
}
LA4_: ;
return result;}
#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 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeArray__A8HGKnF0m9c9bRXJoGSwCunA)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU8* value_0, NI value_0Len_0) {
#line 104 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI T5_; NI TM__ghRWGsc3CxkAWrmSFAwARg_4; NI TM__ghRWGsc3CxkAWrmSFAwARg_5;
#line 104 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 104 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!(((NI) 0) < value_0Len_0)) goto LA3_;
#line 105 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 105 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 105 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T5_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 105 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt(T5_, value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_4)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_4)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_4)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_4), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_4)))));
#line 106 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((NU)(((NI) 0)) >= (NU)(value_0Len_0)){ raiseIndexError2(((NI) 0),value_0Len_0-1); }
#line 106 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((value_0Len_0) < ((NI) 0) || (value_0Len_0) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(value_0Len_0, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 106 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((void*) ((&value_0[((NI) 0)]))), ((NI) (value_0Len_0)));
#line 107 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 107 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_5)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_5); }
LA3_: ;
}
#line 150 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(NI, peekArray__TiOCG7A7AuE3A3p8pXJi9bw)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU8* value_0, NI value_0Len_0) { NI result; NI length; result = (NI)0;
#line 157 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = ((NI) -1);
#line 158 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 158 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = value_0Len_0;
#line 159 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_6; NI TM__ghRWGsc3CxkAWrmSFAwARg_7;
#line 159 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T3_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_6)) { raiseOverflow(); }; if (nimSubInt((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_6), length, &TM__ghRWGsc3CxkAWrmSFAwARg_7)) { raiseOverflow(); }; if (!(((NI) 0) <= (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_7))) goto LA4_;
#line 160 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 160 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!(((NI) 0) < length)) goto LA8_;
#line 161 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)(((NI) 0)) >= (NU)(value_0Len_0)){ raiseIndexError2(((NI) 0),value_0Len_0-1); } if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((length) < ((NI) 0) || (length) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(length, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 161 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&value_0[((NI) 0)]))), ((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((NI) (length)));
}
LA8_: ;
#line 162 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = length; }
LA4_: ;
return result;}
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/varint.nim"
static N_INLINE(NI, vsizeof__u9bwDD5HhoG7HxvmDQNcufAvarint)(NU 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(((NU64) (x_0))); result = ((NI) (T1_)); return result;}
#line 88 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeSeq__nyNVFCfkAj1WhWPH0vO9aTg)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NIM_CHAR* value_0, NI value_0Len_0) { NI length; NI T1_; NI T2_; NI TM__ghRWGsc3CxkAWrmSFAwARg_8; NI TM__ghRWGsc3CxkAWrmSFAwARg_9; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_11;
#line 91 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T1_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T2_ = (NI)0; T2_ = vsizeof__u9bwDD5HhoG7HxvmDQNcufAvarint(((NU) (value_0Len_0))); if (nimAddInt(T1_, T2_, &TM__ghRWGsc3CxkAWrmSFAwARg_8)) { raiseOverflow(); };
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_8), value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_9)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_9)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_9)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_9), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_9)))));
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T3_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T3_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 94 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = putUVarint__otpik4CuaU29aQKjm9bz9c2Qg((NU8*)(*vb).buffer->data+((*vb).offset), (T3_)-((*vb).offset)+1, (&length), ((NU) (value_0Len_0)));
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!!(res.o)) goto LA6_;
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__ghRWGsc3CxkAWrmSFAwARg_10));
}
LA6_: ;
#line 96 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_11)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_11);
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI TM__ghRWGsc3CxkAWrmSFAwARg_12;
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!(((NI) 0) < value_0Len_0)) goto LA10_;
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((NU)(((NI) 0)) >= (NU)(value_0Len_0)){ raiseIndexError2(((NI) 0),value_0Len_0-1); }
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((value_0Len_0) < ((NI) 0) || (value_0Len_0) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(value_0Len_0, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((void*) ((&value_0[((NI) 0)]))), ((NI) (value_0Len_0)));
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_12)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_12); }
LA10_: ;
}
#line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(NI, peekSeq__8XZnkkTGz7XYbKsYBLsURg)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NimStringDesc** value_0) { NI result; NI length; NU64 size; result = (NI)0;
#line 135 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = ((NI) -1);
#line 136 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
unsureAsgnRef((void**) (&(*value_0)), setLengthStr((*value_0), ((NI) 0)));
#line 137 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 138 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
size = 0ULL;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NIM_BOOL T3_; NI T4_; NI TM__ghRWGsc3CxkAWrmSFAwARg_13; NI T6_; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw T7_; NI TM__ghRWGsc3CxkAWrmSFAwARg_14; NI TM__ghRWGsc3CxkAWrmSFAwARg_18;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (NIM_BOOL)0;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T4_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T4_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_13)) { raiseOverflow(); }; T3_ = !(((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_13) <= ((NI) 0))); if (!(T3_)) goto LA5_;
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T6_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T6_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T6_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T7_ = getUVarint__8Fv9a4AsBnhOSlTNa6xhluw((NU8*)(*vb).buffer->data+((*vb).offset), (T6_)-((*vb).offset)+1, (&length), (&size)); T3_ = T7_.o; LA5_: ;
if (!T3_) goto LA8_;
#line 141 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_14)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_14);
#line 142 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = length;
#line 143 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI T12_; NI TM__ghRWGsc3CxkAWrmSFAwARg_15; NI TM__ghRWGsc3CxkAWrmSFAwARg_16; NI TM__ghRWGsc3CxkAWrmSFAwARg_17;
#line 143 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T12_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T12_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_15)) { raiseOverflow(); }; if ((NI64)(size) < ((NI) (IL64(-9223372036854775807) - IL64(1))) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) (IL64(-9223372036854775807) - IL64(1))), ((NI) IL64(9223372036854775807))); } if (nimSubInt((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_15), ((NI) (size)), &TM__ghRWGsc3CxkAWrmSFAwARg_16)) { raiseOverflow(); }; if (!(((NI) 0) <= (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_16))) goto LA13_;
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NI64)(size) < ((NI) 0) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*value_0)), setLengthStr((*value_0), ((NI) (size))));
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!((NU64)(0ULL) < (NU64)(size))) goto LA17_;
#line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)(((NI) 0)) >= (NU)((*value_0) ? (*value_0)->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*value_0) ? (*value_0)->Sup.len : 0)-1); } if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((NI64)(size) < ((NI) 0) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*value_0)->data[((NI) 0)]))), ((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((NI) (size)));
}
LA17_: ;
#line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NI64)(size) < ((NI) (IL64(-9223372036854775807) - IL64(1))) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) (IL64(-9223372036854775807) - IL64(1))), ((NI) IL64(9223372036854775807))); } if (nimAddInt(result, ((NI) (size)), &TM__ghRWGsc3CxkAWrmSFAwARg_17)) { raiseOverflow(); }; result = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_17); }
LA13_: ;
#line 148 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimSubInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_18)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_18); }
LA8_: ;
return result;}
#line 53 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, initVBuffer__1fnvRaJCRezqjVK59bOLuNQ)(NU8* data_0, NI data_0Len_0, NI offset, tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* Result) { chckNil((void*)Result); unsureAsgnRef((void**)&(*Result).buffer, NIM_NIL); (*Result).offset = 0;
#line 55 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 55 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((data_0Len_0) < ((NI) 0) || (data_0Len_0) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(data_0Len_0, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 55 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
unsureAsgnRef((void**) (&(*Result).buffer), newSeq__DpCWN7DIBuAjgoeQ9c29blYQ(((NI) (data_0Len_0))));
#line 56 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 56 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 56 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!(((NI) 0) < data_0Len_0)) goto LA3_;
#line 57 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)(((NI) 0)) >= (NU)((*Result).buffer ? (*Result).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*Result).buffer ? (*Result).buffer->Sup.len : 0)-1); } if ((NU)(((NI) 0)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 0),data_0Len_0-1); }
#line 57 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((data_0Len_0) < ((NI) 0) || (data_0Len_0) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(data_0Len_0, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 57 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*Result).buffer->data[((NI) 0)]))), ((void*) ((&data_0[((NI) 0)]))), ((NI) (data_0Len_0)));
}
LA3_: ;
#line 58 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
(*Result).offset = offset;}
#line 60 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, initVBuffer__LoMBTJaYwtzjWYCnZcOZYg)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* Result) { chckNil((void*)Result); unsureAsgnRef((void**)&(*Result).buffer, NIM_NIL); (*Result).offset = 0;
#line 62 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 62 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
unsureAsgnRef((void**) (&(*Result).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*)nimNewSeqOfCap((&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) 128)));}
#line 74 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeLPVarint__vZ9cuk2OqyYk5NOwngVO0kg_2)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU value_0) { NI length; NU v; NI T1_; NI T2_; NI TM__ghRWGsc3CxkAWrmSFAwARg_19; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_21;
#line 76 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
v = (NU)(value_0 & ((NU) (IL64(9223372036854775807))));
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T1_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T2_ = (NI)0; T2_ = vsizeof__u9bwDD5HhoG7HxvmDQNcufAvarint(v); if (nimAddInt(T1_, T2_, &TM__ghRWGsc3CxkAWrmSFAwARg_19)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_19)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_19)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_19), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_19)))));
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T3_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T3_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = putUVarint__otpik4CuaU29aQKjm9bz9c2Qg((NU8*)(*vb).buffer->data+((*vb).offset), (T3_)-((*vb).offset)+1, (&length), v);
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!!(res.o)) goto LA6_;
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__ghRWGsc3CxkAWrmSFAwARg_20));
}
LA6_: ;
#line 83 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_21)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_21);}
#line 85 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeVarint__vZ9cuk2OqyYk5NOwngVO0kg)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU value_0) {
#line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
writeLPVarint__vZ9cuk2OqyYk5NOwngVO0kg_2(vb, value_0);
}
#line 109 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, finish__v4aEtSQRNWYAfIk4zF8a0w)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb) {
#line 111 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
(*vb).offset = ((NI) 0);}
#line 88 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeSeq__A8HGKnF0m9c9bRXJoGSwCunA_2)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU8* value_0, NI value_0Len_0) { NI length; NI T1_; NI T2_; NI TM__ghRWGsc3CxkAWrmSFAwARg_22; NI TM__ghRWGsc3CxkAWrmSFAwARg_23; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_24;
#line 91 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T1_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T2_ = (NI)0; T2_ = vsizeof__u9bwDD5HhoG7HxvmDQNcufAvarint(((NU) (value_0Len_0))); if (nimAddInt(T1_, T2_, &TM__ghRWGsc3CxkAWrmSFAwARg_22)) { raiseOverflow(); };
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_22), value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_23)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_23)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_23)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_23), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_23)))));
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T3_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T3_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 94 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = putUVarint__otpik4CuaU29aQKjm9bz9c2Qg((NU8*)(*vb).buffer->data+((*vb).offset), (T3_)-((*vb).offset)+1, (&length), ((NU) (value_0Len_0)));
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!!(res.o)) goto LA6_;
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 95 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__ghRWGsc3CxkAWrmSFAwARg_10));
}
LA6_: ;
#line 96 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_24)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_24);
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI TM__ghRWGsc3CxkAWrmSFAwARg_25;
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!(((NI) 0) < value_0Len_0)) goto LA10_;
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((NU)(((NI) 0)) >= (NU)(value_0Len_0)){ raiseIndexError2(((NI) 0),value_0Len_0-1); }
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((value_0Len_0) < ((NI) 0) || (value_0Len_0) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(value_0Len_0, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((void*) ((&value_0[((NI) 0)]))), ((NI) (value_0Len_0)));
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, value_0Len_0, &TM__ghRWGsc3CxkAWrmSFAwARg_25)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_25); }
LA10_: ;
}
#line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(NI, peekSeq__HjNK8tn9cFb29aH3Wm7Jio7g)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, tySequence__6H5Oh5UUvVCLiakt9aTwtUQ** value_0) { NI result; NI length; NU64 size; result = (NI)0;
#line 135 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = ((NI) -1);
#line 136 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
unsureAsgnRef((void**) (&(*value_0)), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*value_0))->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) 0)));
#line 137 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 138 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
size = 0ULL;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NIM_BOOL T3_; NI T4_; NI TM__ghRWGsc3CxkAWrmSFAwARg_26; NI T6_; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw T7_; NI TM__ghRWGsc3CxkAWrmSFAwARg_27; NI TM__ghRWGsc3CxkAWrmSFAwARg_31;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (NIM_BOOL)0;
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 139 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 23 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T4_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T4_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_26)) { raiseOverflow(); }; T3_ = !(((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_26) <= ((NI) 0))); if (!(T3_)) goto LA5_;
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T6_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T6_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T6_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 140 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T7_ = getUVarint__8Fv9a4AsBnhOSlTNa6xhluw((NU8*)(*vb).buffer->data+((*vb).offset), (T6_)-((*vb).offset)+1, (&length), (&size)); T3_ = T7_.o; LA5_: ;
if (!T3_) goto LA8_;
#line 141 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_27)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_27);
#line 142 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
result = length;
#line 143 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{ NI T12_; NI TM__ghRWGsc3CxkAWrmSFAwARg_28; NI TM__ghRWGsc3CxkAWrmSFAwARg_29; NI TM__ghRWGsc3CxkAWrmSFAwARg_30;
#line 143 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 27 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T12_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0); if (nimSubInt(T12_, (*vb).offset, &TM__ghRWGsc3CxkAWrmSFAwARg_28)) { raiseOverflow(); }; if ((NI64)(size) < ((NI) (IL64(-9223372036854775807) - IL64(1))) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) (IL64(-9223372036854775807) - IL64(1))), ((NI) IL64(9223372036854775807))); } if (nimSubInt((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_28), ((NI) (size)), &TM__ghRWGsc3CxkAWrmSFAwARg_29)) { raiseOverflow(); }; if (!(((NI) 0) <= (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_29))) goto LA13_;
#line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NI64)(size) < ((NI) 0) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*value_0)), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*value_0))->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) (size))));
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!((NU64)(0ULL) < (NU64)(size))) goto LA17_;
#line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NU)(((NI) 0)) >= (NU)((*value_0) ? (*value_0)->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*value_0) ? (*value_0)->Sup.len : 0)-1); } if ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0)){ raiseIndexError2((*vb).offset,((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); } if ((NI64)(size) < ((NI) 0) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) 0), ((NI) IL64(9223372036854775807))); }
#line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*value_0)->data[((NI) 0)]))), ((void*) ((&(*vb).buffer->data[(*vb).offset]))), ((NI) (size)));
}
LA17_: ;
#line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if ((NI64)(size) < ((NI) (IL64(-9223372036854775807) - IL64(1))) || (NI64)(size) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(size, ((NI) (IL64(-9223372036854775807) - IL64(1))), ((NI) IL64(9223372036854775807))); } if (nimAddInt(result, ((NI) (size)), &TM__ghRWGsc3CxkAWrmSFAwARg_30)) { raiseOverflow(); }; result = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_30); }
LA13_: ;
#line 148 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimSubInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_31)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_31); }
LA8_: ;
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 74 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeLPVarint__Z9cWX2313hWAaF9bdWMVmaXw_2)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU64 value_0) { NI length; NU64 v; NI T1_; NI T2_; NI TM__ghRWGsc3CxkAWrmSFAwARg_32; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_33;
#line 76 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 78 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
v = (NU64)(value_0 & ((NU64) (IL64(9223372036854775807))));
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T1_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 79 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T2_ = (NI)0; T2_ = vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint(v); if (nimAddInt(T1_, T2_, &TM__ghRWGsc3CxkAWrmSFAwARg_32)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_32)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_32)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_32), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_32)))));
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T3_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T3_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 80 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = putUVarint__h0KNoWke9cXqQmQoqHzdBfg((NU8*)(*vb).buffer->data+((*vb).offset), (T3_)-((*vb).offset)+1, (&length), v);
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!!(res.o)) goto LA6_;
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 82 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__ghRWGsc3CxkAWrmSFAwARg_20));
}
LA6_: ;
#line 83 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_33)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_33);}
#line 85 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writeVarint__Z9cWX2313hWAaF9bdWMVmaXw)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU64 value_0) {
#line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
writeLPVarint__Z9cWX2313hWAaF9bdWMVmaXw_2(vb, value_0);
}
#line 64 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
N_LIB_PRIVATE N_NIMCALL(void, writePBVarint__Z9cWX2313hWAaF9bdWMVmaXw_3)(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA* vb, NU64 value_0) { NI length; NU64 v; NI T1_; NI T2_; NI TM__ghRWGsc3CxkAWrmSFAwARg_34; tyObject_Result__EU2D85u1tT2g3bs9aUSzTHw res; NI T3_; NI TM__ghRWGsc3CxkAWrmSFAwARg_36;
#line 66 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
length = ((NI) 0);
#line 67 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 67 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
v = (NU64)(value_0 & ((NU64) (((NI) -1))));
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T1_ = ((*vb).buffer ? (*vb).buffer->Sup.len : 0);
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 68 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T2_ = (NI)0; T2_ = vsizeof__LNrGVKzYZfjqZfKsinkR9bwvarint(v); if (nimAddInt(T1_, T2_, &TM__ghRWGsc3CxkAWrmSFAwARg_34)) { raiseOverflow(); }; if (((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_34)) < ((NI) 0) || ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_34)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_34), ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*vb).buffer), (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&((*vb).buffer)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) ((NI)(TM__ghRWGsc3CxkAWrmSFAwARg_34)))));
#line 69 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 69 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
T3_ = (((*vb).buffer ? (*vb).buffer->Sup.len : 0)-1); if (T3_-(*vb).offset != -1 && ((NU)((*vb).offset) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0) || (NU)(T3_) >= (NU)((*vb).buffer ? (*vb).buffer->Sup.len : 0))){ raiseIndexError(); }
#line 69 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
res = putUVarint__6fSC1OMzKIBn5lnSoZxaJg((NU8*)(*vb).buffer->data+((*vb).offset), (T3_)-((*vb).offset)+1, (&length), v);
#line 71 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
{
#line 71 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (!!(res.o)) goto LA6_;
#line 71 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
#line 71 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__ghRWGsc3CxkAWrmSFAwARg_35));
}
LA6_: ;
#line 72 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/vbuffer.nim"
if (nimAddInt((*vb).offset, length, &TM__ghRWGsc3CxkAWrmSFAwARg_36)) { raiseOverflow(); }; (*vb).offset = (NI)(TM__ghRWGsc3CxkAWrmSFAwARg_36);}
N_LIB_PRIVATE N_NIMCALL(void, libp2p_vbufferDatInit000)(void) {
#line 999999 "generated_not_to_break_here"
static TNimNode* TM__ghRWGsc3CxkAWrmSFAwARg_2_2[2];
static TNimNode TM__ghRWGsc3CxkAWrmSFAwARg_0[3];NTI__pgrKDkZLiJID3rDHrYm5UA_.size = sizeof(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA);
NTI__pgrKDkZLiJID3rDHrYm5UA_.kind = 18;
NTI__pgrKDkZLiJID3rDHrYm5UA_.base = 0;
NTI__pgrKDkZLiJID3rDHrYm5UA_.flags = 2;
NTI__pgrKDkZLiJID3rDHrYm5UA_.name = "VBuffer";
NTI__pgrKDkZLiJID3rDHrYm5UA_.nextType = nimTypeRoot; nimTypeRoot=&NTI__pgrKDkZLiJID3rDHrYm5UA_;
TM__ghRWGsc3CxkAWrmSFAwARg_2_2[0] = &TM__ghRWGsc3CxkAWrmSFAwARg_0[1];
TM__ghRWGsc3CxkAWrmSFAwARg_0[1].kind = 1;
TM__ghRWGsc3CxkAWrmSFAwARg_0[1].offset = offsetof(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA, buffer);
TM__ghRWGsc3CxkAWrmSFAwARg_0[1].typ = (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_);
TM__ghRWGsc3CxkAWrmSFAwARg_0[1].name = "buffer";
TM__ghRWGsc3CxkAWrmSFAwARg_2_2[1] = &TM__ghRWGsc3CxkAWrmSFAwARg_0[2];
TM__ghRWGsc3CxkAWrmSFAwARg_0[2].kind = 1;
TM__ghRWGsc3CxkAWrmSFAwARg_0[2].offset = offsetof(tyObject_VBuffer__pgrKDkZLiJID3rDHrYm5UA, offset);
TM__ghRWGsc3CxkAWrmSFAwARg_0[2].typ = (&NTI__rR5Bzr1D5krxoo1NcNyeMA_);
TM__ghRWGsc3CxkAWrmSFAwARg_0[2].name = "offset";
TM__ghRWGsc3CxkAWrmSFAwARg_0[0].len = 2; TM__ghRWGsc3CxkAWrmSFAwARg_0[0].kind = 2; TM__ghRWGsc3CxkAWrmSFAwARg_0[0].sons = &TM__ghRWGsc3CxkAWrmSFAwARg_2_2[0];
NTI__pgrKDkZLiJID3rDHrYm5UA_.node = &TM__ghRWGsc3CxkAWrmSFAwARg_0[0];
}