/* 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-nat-traversal/vendor/miniupnp/miniupnpc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-nat-traversal/vendor/libnatpmp-upstream -DENABLE_STRNATPMPERR -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/certs -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/common -o nimcache/release/wakubridge/stdlib_nativesockets.nim.c.o nimcache/release/wakubridge/stdlib_nativesockets.nim.c */ #define NIM_INTBITS 64 #include "nimbase.h" #include #include #include #include #include #include #include #include #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef linux #undef mips #undef near #undef far #undef powerpc #undef unix #define nimfr_(x, y) #define nimln_(x, y) typedef struct TNimType TNimType; typedef struct TNimNode TNimNode; typedef struct NimStringDesc NimStringDesc; typedef struct TGenericSeq TGenericSeq; typedef struct tySequence__9apztJSmgERYU8fZOjI4pOg tySequence__9apztJSmgERYU8fZOjI4pOg; typedef NU8 tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg; 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_SockType__NQT1bItGG2X9byGdrWX7ujw; typedef NU8 tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg; struct TGenericSeq {NI len; NI reserved; }; struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE]; }; typedef long tyArray__RpaqwQ7H8ofV6NGQYsCBHQ[16]; typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ; struct TNimNode {tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind; NI offset; TNimType* typ; NCSTRING name; NI len; TNimNode** sons; }; typedef NIM_CHAR tyArray__NSMq3FMCIrS8gSbyinBZ8w[14]; struct tySequence__9apztJSmgERYU8fZOjI4pOg { TGenericSeq Sup; int data[SEQ_DECL_SIZE];};N_LIB_PRIVATE N_NIMCALL(int, toInt__na0alpTcWAzTnn2v04w1CQ)(tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg domain); N_LIB_PRIVATE N_NIMCALL(int, toInt__AuveeRAdmuTXERHtCv4MPg)(tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw typ); N_LIB_PRIVATE N_NIMCALL(int, toInt__7Zb9bURWntNcBAaEQ9aEZK9bQ)(tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg p); N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__CWyPYlyH9a6rAuZckFyVxPA)(NI32 errorCode, NimStringDesc* additionalInfo); N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__9bUWNxbcGnToMWA9b79aTXLIw)(void); 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(NimStringDesc*, dollar___RkX9btpg5sQIaP8yYXB6tbA)(NU64 x); static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s); N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str); N_LIB_PRIVATE N_NIMCALL(struct timeval, timeValFromMilliseconds__OtKozLj4h73UWNus5W4NYA)(NI timeout); 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_NIMCALL(void, createFdSet__qeAKZQwZIp32QbFZfozb3w)(fd_set* fd, tySequence__9apztJSmgERYU8fZOjI4pOg* s, NI* m); N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n); N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg); N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b); N_LIB_PRIVATE N_NIMCALL(void, pruneSocketSet__DzCd1luyXumO9c9aKDjkCMAQ)(tySequence__9apztJSmgERYU8fZOjI4pOg** s, fd_set* fd); N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, setLengthSeqV2)(TGenericSeq* s, TNimType* typ, NI newLen); N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src); N_LIB_PRIVATE TNimType NTI__Q79bEtFARvq0ekDNtvj3Vqg_; N_LIB_PRIVATE TNimType NTI__NQT1bItGG2X9byGdrWX7ujw_; N_LIB_PRIVATE TNimType NTI__dqJ1OqRGclxIMMdSLRzzXg_; STRING_LITERAL(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_16, "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/" "vendor/Nim/lib/system/iterators.nim(189, 11) `len(a) == L` the l" "ength of the seq changed while iterating over it", 175); extern TNimType NTI__9apztJSmgERYU8fZOjI4pOg_; N_LIB_PRIVATE NIM_CONST int osInvalidSocket__voz9aUXu8jtRbvGZZJHNE8w = ((int) -1); N_LIB_PRIVATE NIM_CONST int nativeAfInet__rQwsjQjVqXvdaL9aZofzWwg = ((int) 2); N_LIB_PRIVATE NIM_CONST int nativeAfInet6__Da6PongZL9aJxBrf7qeBmfA = ((int) 10); N_LIB_PRIVATE NIM_CONST int nativeAfUnix__F0RRmJ8JjfNr6yLSNEn9abA = ((int) 1); extern TNimType* nimTypeRoot; #line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(void, close__8c1w8B7fpSuB4Dgr5LHVJA)(int socket) { int T1_; #line 223 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 223 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 223 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T1_ = (int)0; T1_ = close(socket); (void)(T1_); } #line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, toInt__na0alpTcWAzTnn2v04w1CQ)(tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg domain) { int result; result = (int)0; #line 129 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" switch (domain) { case ((tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg) 0): { #line 130 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 0); } break; case ((tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg) 1): { #line 131 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 1); } break; case ((tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg) 2): { #line 132 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 2); } break; case ((tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg) 23): { #line 133 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 10); } break; } return result;} #line 144 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, toInt__AuveeRAdmuTXERHtCv4MPg)(tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw typ) { int result; result = (int)0; #line 145 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" switch (typ) { case ((tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw) 1): { #line 146 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 1); } break; case ((tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw) 2): { #line 147 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 2); } break; case ((tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw) 5): { #line 148 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 5); } break; case ((tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw) 3): { #line 149 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 3); } break; } return result;} #line 151 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, toInt__7Zb9bURWntNcBAaEQ9aEZK9bQ)(tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg p) { int result; result = (int)0; #line 152 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" switch (p) { case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 6): { #line 153 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 6); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 17): { #line 154 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 17); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 18): { #line 155 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 0); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 19): { #line 156 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 41); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 20): { #line 157 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 255); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 21): { #line 158 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 1); } break; case ((tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg) 22): { #line 159 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((int) 58); } break; } return result;} #line 188 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, createNativeSocket__JC9abIjAA731bWpDMsti9a5Q)(tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg domain, tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw sockType, tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg protocol) { int result; int T1_; int T2_; int T3_; result = (int)0; #line 191 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T1_ = (int)0; T1_ = toInt__na0alpTcWAzTnn2v04w1CQ(domain); #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T2_ = (int)0; T2_ = toInt__AuveeRAdmuTXERHtCv4MPg(sockType); #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T3_ = (int)0; T3_ = toInt__7Zb9bURWntNcBAaEQ9aEZK9bQ(protocol); #line 192 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = socket(T1_, T2_, T3_); return result;} #line 568 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(void, setBlocking__ksfYDEBjQla9cwhYE9b9ck7ZA)(int s, NIM_BOOL blocking) { NI x; int T1_; #line 577 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 577 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 577 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T1_ = (int)0; T1_ = fcntl(s, ((int) 3), ((NI) 0)); x = ((NI) (T1_)); #line 578 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { NI32 T6_; #line 578 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!(x == ((NI) -1))) goto LA4_; #line 579 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 579 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 579 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T6_ = (NI32)0; T6_ = osLastError__9bUWNxbcGnToMWA9b79aTXLIw(); #line 579 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" raiseOSError__CWyPYlyH9a6rAuZckFyVxPA(T6_, ((NimStringDesc*) NIM_NIL)); } goto LA2_; LA4_: ; { NI mode; #line 581 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 581 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { if (!blocking) goto LA10_; #line 581 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" mode = (NI)(x & ((NI) -2049)); } goto LA8_; LA10_: ; { #line 581 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" mode = (NI)(x | ((NI) 2048)); } LA8_: ; #line 582 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { int T15_; NI32 T18_; #line 582 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 582 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 582 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T15_ = (int)0; T15_ = fcntl(s, ((int) 4), mode); if (!(T15_ == ((NI32) -1))) goto LA16_; #line 583 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 583 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 583 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T18_ = (NI32)0; T18_ = osLastError__9bUWNxbcGnToMWA9b79aTXLIw(); #line 583 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" raiseOSError__CWyPYlyH9a6rAuZckFyVxPA(T18_, ((NimStringDesc*) NIM_NIL)); } LA16_: ; } LA2_: ; } #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 85 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) { NCSTRING result; result = (NCSTRING)0; #line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" { NIM_BOOL T3_; #line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" T3_ = (NIM_BOOL)0; #line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" T3_ = (s == NIM_NIL); if (T3_) goto LA4_; #line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" T3_ = ((*s).Sup.len == ((NI) 0)); LA4_: ; if (!T3_) goto LA5_; #line 86 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" result = ""; } goto LA1_; LA5_: ; { #line 87 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" result = ((NCSTRING) ((*s).data)); } LA1_: ; return result;} #line 241 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(struct addrinfo*, getAddrInfo__ANf7QnbfE8nyIlFuWroDcQ)(NimStringDesc* address, NU16 port, tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg domain, tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw sockType, tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg protocol) { struct addrinfo* result; struct addrinfo hints; NimStringDesc* socketPort; int gaiResult; result = (struct addrinfo*)0; nimZeroMem((void*)(&hints), sizeof(struct addrinfo)); #line 248 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = NIM_NIL; #line 249 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 249 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" hints.ai_family = toInt__na0alpTcWAzTnn2v04w1CQ(domain); #line 250 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 250 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" hints.ai_socktype = toInt__AuveeRAdmuTXERHtCv4MPg(sockType); #line 251 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 251 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" hints.ai_protocol = toInt__7Zb9bURWntNcBAaEQ9aEZK9bQ(protocol); #line 258 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { #line 258 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!(domain == ((tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg) 23))) goto LA3_; #line 259 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" hints.ai_flags = ((int) 8); } LA3_: ; #line 260 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 260 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { #line 260 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!(sockType == ((tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw) 3))) goto LA7_; socketPort = ((NimStringDesc*) NIM_NIL); } goto LA5_; LA7_: ; { #line 260 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 260 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" socketPort = dollar___RkX9btpg5sQIaP8yYXB6tbA(port); } LA5_: ; #line 261 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 261 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" gaiResult = getaddrinfo(nimToCStringConv(address), nimToCStringConv(socketPort), (&hints), &result); #line 262 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { NI32 T14_; NCSTRING T15_; NimStringDesc* T16_; #line 262 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 262 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!!((gaiResult == ((NI32) 0)))) goto LA12_; #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T14_ = (NI32)0; T14_ = osLastError__9bUWNxbcGnToMWA9b79aTXLIw(); #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T15_ = (NCSTRING)0; T15_ = (char *)gai_strerror(gaiResult); T16_ = (NimStringDesc*)0; T16_ = cstrToNimstr(T15_); #line 266 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" raiseOSError__CWyPYlyH9a6rAuZckFyVxPA(T14_, T16_); } LA12_: ; return result;} #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 585 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(struct timeval, timeValFromMilliseconds__OtKozLj4h73UWNus5W4NYA)(NI timeout) { struct timeval result; nimZeroMem((void*)(&result), sizeof(struct timeval)); #line 586 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { NI seconds; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_11; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_12; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_13; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_14; #line 586 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 586 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!!((timeout == ((NI) -1)))) goto LA3_; #line 587 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 587 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (((NI) 1000) == 0){ raiseDivByZero(); } if (nimDivInt(timeout, ((NI) 1000), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_11)) { raiseOverflow(); }; seconds = (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_11); #line 592 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result.tv_sec = seconds; #line 593 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 593 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 593 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 593 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimMulInt(seconds, ((NI) 1000), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_12)) { raiseOverflow(); }; if (nimSubInt(timeout, (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_12), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_13)) { raiseOverflow(); }; if (nimMulInt((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_13), ((NI) 1000), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_14)) { raiseOverflow(); }; result.tv_usec = (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_14); } LA3_: ; return result;} #line 595 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(void, createFdSet__qeAKZQwZIp32QbFZfozb3w)(fd_set* fd, tySequence__9apztJSmgERYU8fZOjI4pOg* s, NI* m) { #line 596 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 596 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" FD_ZERO(fd); { int i; NI i_2; NI L; NI T2_; i = (int)0; #line 184 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" i_2 = ((NI) 0); #line 185 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" #line 185 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" T2_ = (s ? s->Sup.len : 0); L = T2_; { #line 186 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" while (1) { NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_15; #line 186 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" if (!(i_2 < L)) goto LA4; #line 597 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if ((NU)(i_2) >= (NU)(s ? s->Sup.len : 0)){ raiseIndexError2(i_2,(s ? s->Sup.len : 0)-1); } i = s->data[i_2]; #line 598 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 598 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" (*m) = (((*m) >= ((NI) (i))) ? (*m) : ((NI) (i))); #line 599 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 599 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" FD_SET(i, fd); #line 188 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" if (nimAddInt(i_2, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_15)) { raiseOverflow(); }; i_2 = (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_15); #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" { NI T7_; #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" T7_ = (s ? s->Sup.len : 0); if (!!((T7_ == L))) goto LA8_; #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" #line 189 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/iterators.nim" failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_16)); } LA8_: ; } LA4: ; } } } #line 601 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(void, pruneSocketSet__DzCd1luyXumO9c9aKDjkCMAQ)(tySequence__9apztJSmgERYU8fZOjI4pOg** s, fd_set* fd) { NI i; NI L; NI T1_; #line 602 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" i = ((NI) 0); #line 603 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 603 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T1_ = ((*s) ? (*s)->Sup.len : 0); L = T1_; { #line 604 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" while (1) { #line 604 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!(i < L)) goto LA3; #line 605 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { int T6_; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_19; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_20; #line 605 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 605 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if ((NU)(i) >= (NU)((*s) ? (*s)->Sup.len : 0)){ raiseIndexError2(i,((*s) ? (*s)->Sup.len : 0)-1); } #line 605 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T6_ = (int)0; T6_ = FD_ISSET((*s)->data[i], fd); if (!(T6_ == ((NI32) 0))) goto LA7_; if ((NU)(i) >= (NU)((*s) ? (*s)->Sup.len : 0)){ raiseIndexError2(i,((*s) ? (*s)->Sup.len : 0)-1); } #line 606 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 606 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimSubInt(L, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_19)) { raiseOverflow(); }; if ((NU)((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_19)) >= (NU)((*s) ? (*s)->Sup.len : 0)){ raiseIndexError2((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_19),((*s) ? (*s)->Sup.len : 0)-1); } (*s)->data[i] = (*s)->data[(NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_19)]; #line 607 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimSubInt(L, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_20)) { raiseOverflow(); }; L = (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_20); } goto LA4_; LA7_: ; { NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_21; #line 609 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimAddInt(i, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_21)) { raiseOverflow(); }; i = (NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_21); } LA4_: ; } LA3: ; } #line 610 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if ((L) < ((NI) 0) || (L) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(L, ((NI) 0), ((NI) IL64(9223372036854775807))); } unsureAsgnRef((void**) (&(*s)), (tySequence__9apztJSmgERYU8fZOjI4pOg*) setLengthSeqV2(&((*s))->Sup, (&NTI__9apztJSmgERYU8fZOjI4pOg_), ((NI) (L))));} #line 633 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(NI, selectWrite__f7ae9b4ywBVX6nosEZDhp9cw)(tySequence__9apztJSmgERYU8fZOjI4pOg** writefds, NI timeout) { NI result; struct timeval tv; fd_set wr; NI m; result = (NI)0; #line 642 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 642 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" tv = timeValFromMilliseconds__OtKozLj4h73UWNus5W4NYA(timeout); nimZeroMem((void*)(&wr), sizeof(fd_set)); #line 645 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" m = ((NI) 0); #line 646 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 646 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" createFdSet__qeAKZQwZIp32QbFZfozb3w((&wr), (*writefds), (&m)); #line 648 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17; int T5_; #line 648 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 648 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (!!((timeout == ((NI) -1)))) goto LA3_; #line 649 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 649 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 649 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimAddInt(m, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17)) { raiseOverflow(); }; if (((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17)) < ((int) (-2147483647 -1)) || ((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17)) > ((int) 2147483647)){ raiseRangeErrorI((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17), ((int) (-2147483647 -1)), ((int) 2147483647)); } #line 649 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T5_ = (int)0; T5_ = select(((int) ((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_17))), NIM_NIL, (&wr), NIM_NIL, (&tv)); result = ((NI) (T5_)); } goto LA1_; LA3_: ; { NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18; int T7_; #line 651 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 651 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 651 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if (nimAddInt(m, ((NI) 1), &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18)) { raiseOverflow(); }; if (((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18)) < ((int) (-2147483647 -1)) || ((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18)) > ((int) 2147483647)){ raiseRangeErrorI((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18), ((int) (-2147483647 -1)), ((int) 2147483647)); } #line 651 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T7_ = (int)0; T7_ = select(((int) ((NI)(TM__f9bP3LqjpgpB9cXL8Nnak7tQ_18))), NIM_NIL, (&wr), NIM_NIL, NIM_NIL); result = ((NI) (T7_)); } LA1_: ; #line 653 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 653 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" pruneSocketSet__DzCd1luyXumO9c9aKDjkCMAQ(writefds, (&wr)); return result;} #line 550 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(NI, getSockOptInt__g5P5hOeKQnylIzc7ktyiRA)(int socket, NI level, NI optname) { NI result; int res; socklen_t size; result = (NI)0; res = (int)0; #line 554 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" size = ((socklen_t) 4); #line 555 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" { int T3_; NI32 T6_; #line 556 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 555 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" if ((level) < ((int) (-2147483647 -1)) || (level) > ((int) 2147483647)){ raiseRangeErrorI(level, ((int) (-2147483647 -1)), ((int) 2147483647)); } if ((optname) < ((int) (-2147483647 -1)) || (optname) > ((int) 2147483647)){ raiseRangeErrorI(optname, ((int) (-2147483647 -1)), ((int) 2147483647)); } #line 555 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T3_ = (int)0; T3_ = getsockopt(socket, ((int) (level)), ((int) (optname)), ((void*) ((&res))), (&size)); if (!(T3_ < ((NI32) 0))) goto LA4_; #line 557 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 557 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 557 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" T6_ = (NI32)0; T6_ = osLastError__9bUWNxbcGnToMWA9b79aTXLIw(); #line 557 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" raiseOSError__CWyPYlyH9a6rAuZckFyVxPA(T6_, ((NimStringDesc*) NIM_NIL)); } LA4_: ; #line 558 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = ((NI) (res)); return result;} #line 278 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(NU16, ntohs__mS2aR27cvkzR5vKc9cgIFwg)(NU16 x_0) { NU16 result; result = (NU16)0; #line 283 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 283 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 283 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 283 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = (NU16)((NU16)((NU16)(x_0) >> (NU16)(((NU16) 8))) | (NU16)((NU16)(x_0) << (NU16)(((NU16) 8)))); return result;} #line 227 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, bindAddr__aQyfo03zPWPcHE65m8j1pw)(int socket, struct sockaddr* name_0, socklen_t namelen) { int result; result = (int)0; #line 229 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 229 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = bind(socket, name_0, namelen); return result;} #line 231 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(int, listen__pMPsTdchcqQvJDjLVQV1BQ)(int socket, int backlog) { int result; result = (int)0; #line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = listen(socket, backlog); return result;} #line 268 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" N_LIB_PRIVATE N_NIMCALL(NU32, ntohl__iBa9bcNfE4emNkgmMoxrrtA)(NU32 x_0) { NU32 result; result = (NU32)0; #line 275 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 275 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 274 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 273 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 273 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 274 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 274 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 275 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 275 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" #line 276 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/nativesockets.nim" result = (NU32)((NU32)((NU32)((NU32)((NU32)(x_0) >> (NU32)(((NU32) 24))) | (NU32)((NU32)((NU32)(x_0) >> (NU32)(((NU32) 8))) & ((NU32) 65280))) | (NU32)((NU32)((NU32)(x_0) << (NU32)(((NU32) 8))) & ((NU32) 16711680))) | (NU32)((NU32)(x_0) << (NU32)(((NU32) 24)))); return result;} N_LIB_PRIVATE N_NIMCALL(void, stdlib_nativesocketsDatInit000)(void) { #line 999999 "generated_not_to_break_here" static TNimNode* TM__f9bP3LqjpgpB9cXL8Nnak7tQ_2_4[4]; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4; static char* NIM_CONST TM__f9bP3LqjpgpB9cXL8Nnak7tQ_3[4] = { "AF_UNSPEC", "AF_UNIX", "AF_INET", "AF_INET6"}; static TNimNode* TM__f9bP3LqjpgpB9cXL8Nnak7tQ_5_4[4]; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7; static char* NIM_CONST TM__f9bP3LqjpgpB9cXL8Nnak7tQ_6[4] = { "SOCK_STREAM", "SOCK_DGRAM", "SOCK_RAW", "SOCK_SEQPACKET"}; static TNimNode* TM__f9bP3LqjpgpB9cXL8Nnak7tQ_8_7[7]; NI TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10; static char* NIM_CONST TM__f9bP3LqjpgpB9cXL8Nnak7tQ_9[7] = { "IPPROTO_TCP", "IPPROTO_UDP", "IPPROTO_IP", "IPPROTO_IPV6", "IPPROTO_RAW", "IPPROTO_ICMP", "IPPROTO_ICMPV6"}; static TNimNode TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[18];NTI__Q79bEtFARvq0ekDNtvj3Vqg_.size = sizeof(tyEnum_Domain__Q79bEtFARvq0ekDNtvj3Vqg); NTI__Q79bEtFARvq0ekDNtvj3Vqg_.kind = 14; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.base = 0; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.flags = 3; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.name = "Domain"; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.nextType = nimTypeRoot; nimTypeRoot=&NTI__Q79bEtFARvq0ekDNtvj3Vqg_; for (TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4 = 0; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4 < 4; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4++) { TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4+0].kind = 1; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4+0].offset = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4+0].name = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_3[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4]; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_2_4[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4] = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_4+0]; } TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[0].offset = 0; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[1].offset = 1; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[2].offset = 2; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[3].offset = 23; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[4].len = 4; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[4].kind = 2; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[4].sons = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_2_4[0]; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.node = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[4]; NTI__Q79bEtFARvq0ekDNtvj3Vqg_.flags = 1<<2; NTI__NQT1bItGG2X9byGdrWX7ujw_.size = sizeof(tyEnum_SockType__NQT1bItGG2X9byGdrWX7ujw); NTI__NQT1bItGG2X9byGdrWX7ujw_.kind = 14; NTI__NQT1bItGG2X9byGdrWX7ujw_.base = 0; NTI__NQT1bItGG2X9byGdrWX7ujw_.flags = 3; NTI__NQT1bItGG2X9byGdrWX7ujw_.name = "SockType"; NTI__NQT1bItGG2X9byGdrWX7ujw_.nextType = nimTypeRoot; nimTypeRoot=&NTI__NQT1bItGG2X9byGdrWX7ujw_; for (TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7 = 0; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7 < 4; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7++) { TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7+5].kind = 1; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7+5].offset = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7+5].name = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_6[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7]; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_5_4[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7] = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_7+5]; } TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[5].offset = 1; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[6].offset = 2; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[7].offset = 3; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[8].offset = 5; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[9].len = 4; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[9].kind = 2; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[9].sons = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_5_4[0]; NTI__NQT1bItGG2X9byGdrWX7ujw_.node = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[9]; NTI__NQT1bItGG2X9byGdrWX7ujw_.flags = 1<<2; NTI__dqJ1OqRGclxIMMdSLRzzXg_.size = sizeof(tyEnum_Protocol__dqJ1OqRGclxIMMdSLRzzXg); NTI__dqJ1OqRGclxIMMdSLRzzXg_.kind = 14; NTI__dqJ1OqRGclxIMMdSLRzzXg_.base = 0; NTI__dqJ1OqRGclxIMMdSLRzzXg_.flags = 3; NTI__dqJ1OqRGclxIMMdSLRzzXg_.name = "Protocol"; NTI__dqJ1OqRGclxIMMdSLRzzXg_.nextType = nimTypeRoot; nimTypeRoot=&NTI__dqJ1OqRGclxIMMdSLRzzXg_; for (TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10 = 0; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10 < 7; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10++) { TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10+10].kind = 1; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10+10].offset = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10+10].name = TM__f9bP3LqjpgpB9cXL8Nnak7tQ_9[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10]; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_8_7[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10] = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[TM__f9bP3LqjpgpB9cXL8Nnak7tQ_10+10]; } TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[10].offset = 6; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[11].offset = 17; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[12].offset = 18; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[13].offset = 19; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[14].offset = 20; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[15].offset = 21; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[16].offset = 22; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[17].len = 7; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[17].kind = 2; TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[17].sons = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_8_7[0]; NTI__dqJ1OqRGclxIMMdSLRzzXg_.node = &TM__f9bP3LqjpgpB9cXL8Nnak7tQ_0[17]; NTI__dqJ1OqRGclxIMMdSLRzzXg_.flags = 1<<2; }