/* Generated by Nim Compiler v1.3.5 */
/*   (c) 2020 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64

/* section: NIM_merge_HEADERS */

#include "nimbase.h"
#include "winsock2.h"
#include <windows.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

/* section: NIM_merge_FRAME_DEFINES */
#define nimfr_(x, y)
#define nimln_(x, y)

/* section: NIM_merge_FORWARD_TYPES */
typedef struct tyObject_GUID__J2WQBMgezjwf6Trblkflgg tyObject_GUID__J2WQBMgezjwf6Trblkflgg;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg;
typedef struct tyObject_OVERLAPPED__9ayhTq9cybD7eA9aZA09akSNXg tyObject_OVERLAPPED__9ayhTq9cybD7eA9aZA09akSNXg;
typedef struct tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA;
typedef struct tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw;
typedef struct tyObject_AddrInfo__C9ahX3gj0cVjII4vjiaSHBQ tyObject_AddrInfo__C9ahX3gj0cVjII4vjiaSHBQ;
typedef struct tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog;
typedef struct tyObject_Timeval__9boMTr1l3P8e1j9aAjdqsQtA tyObject_Timeval__9boMTr1l3P8e1j9aAjdqsQtA;
typedef struct Exception Exception;
typedef struct tySequence__aNpJjaoUowCQc7fBn3wtDQ tySequence__aNpJjaoUowCQc7fBn3wtDQ;
typedef struct TSafePoint TSafePoint;
typedef struct GcFrameHeader GcFrameHeader;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw;
typedef struct tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg;
typedef struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg;
typedef struct tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w;

/* section: NIM_merge_TYPES */
typedef NI8 tyArray__9cWG514ToTTjfTPLhXXV0IQ[8];
struct tyObject_GUID__J2WQBMgezjwf6Trblkflgg {
NI32 D1;
NI16 D2;
NI16 D3;
tyArray__9cWG514ToTTjfTPLhXXV0IQ D4;
};
typedef N_STDCALL_PTR(NCSTRING, tyProc__5ctyytqoGFQ0BA1imFGbVw) (int family, void* paddr, NCSTRING pStringBuffer, NI32 stringBufSize);
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NF tyArray__iV2wVpdhi9coq9cstlcqapXg[2001];
struct tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg {
tyArray__iV2wVpdhi9coq9cstlcqapXg tls;
};
typedef N_STDCALL_PTR(int, tyProc__As5z9bYt859cLKWaorPRgQYA) (NI16 wVersionRequired, WSADATA* WSData);
typedef N_STDCALL_PTR(NI32, tyProc__aO673xGTLLxou7P7GxoCXA) (NI32 dwFlags, void* lpSource, NI32 dwMessageId, NI32 dwLanguageId, void* lpBuffer, NI32 nSize, void* arguments);
typedef N_STDCALL_PTR(void, tyProc__im9buRnIvptJfzdASYMEbBA) (void* p);
typedef N_STDCALL_PTR(NI32, tyProc__9bXer9a4ps9aSGctILcxWReVw) (void);
typedef N_STDCALL_PTR(NI, tyProc__9aO2cP4IgwjXF8JfUR57CHQ) (int af, int typ, int protocol);
typedef N_STDCALL_PTR(int, tyProc__IQbFr9cLT9bipWCXYfwYwjOw) (NI s);
typedef N_STDCALL_PTR(void, tyProc__X0Q3cs1Ai9bfe54O0LJQ1fQ) (NI32 para1, NI32 para2, tyObject_OVERLAPPED__9ayhTq9cybD7eA9aZA09akSNXg* para3);
typedef N_STDCALL_PTR(int, tyProc__m8OtNuKklv1X2vQjXQkzSA) (NI s, NI32 dwIoControlCode, void* lpvInBuffer, NI32 cbInBuffer, void* lpvOutBuffer, NI32 cbOutBuffer, NI32* lpcbBytesReturned, tyObject_OVERLAPPED__9ayhTq9cybD7eA9aZA09akSNXg* lpOverlapped, tyProc__X0Q3cs1Ai9bfe54O0LJQ1fQ lpCompletionRoutine);
typedef N_STDCALL_PTR(void, tyProc__Tjolzh1w2dIIpj3oCDGPFw) (NI32 dwMilliseconds);
typedef N_STDCALL_PTR(NI, tyProc__uryidYWkntM7ddjZSyxvyQ) (void);
typedef N_STDCALL_PTR(NI, tyProc__lLim4ugM6CVjiaTaa7eXVA) (NI16* lpFileName, tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA* lpFindFileData);
struct tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw {
NI32 dwLowDateTime;
NI32 dwHighDateTime;
};
typedef NI16 tyArray__EKfNt9b8uxndgFbu2Ky3XAQ[260];
typedef NI16 tyArray__Get9cpRTS5VjGKP6CDsI9bYA[14];
struct tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA {
NI32 dwFileAttributes;
tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw ftCreationTime;
tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw ftLastAccessTime;
tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw ftLastWriteTime;
NI32 nFileSizeHigh;
NI32 nFileSizeLow;
NI32 dwReserved0;
NI32 dwReserved1;
tyArray__EKfNt9b8uxndgFbu2Ky3XAQ cFileName;
tyArray__Get9cpRTS5VjGKP6CDsI9bYA cAlternateFileName;
};
typedef N_STDCALL_PTR(void, tyProc__ofoySXaAAlxxs9bQS9a1etlg) (NI hFindFile);
typedef N_STDCALL_PTR(int, tyProc__MvjKU9c5nvs0N3IrS4vNgSw) (NCSTRING nodename, NCSTRING servname, tyObject_AddrInfo__C9ahX3gj0cVjII4vjiaSHBQ* hints, tyObject_AddrInfo__C9ahX3gj0cVjII4vjiaSHBQ** res);
typedef N_STDCALL_PTR(void, tyProc__IV3cwg4tBg3JP8ITSKt7oQ) (tyObject_AddrInfo__C9ahX3gj0cVjII4vjiaSHBQ* ai);
typedef N_STDCALL_PTR(int, tyProc__T129bsPZ4FvuSF4rGFSBKkg) (NI s, SOCKADDR* name, unsigned int namelen);
typedef N_STDCALL_PTR(int, tyProc__4YBDaTH9b4xNNXSV9ahdJZ8w) (NI s, void* buf, int len, int flags);
typedef NI tyArray__SLBTEB08vk46ttuRaTxAYw[64];
struct tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog {
int fd_count;
tyArray__SLBTEB08vk46ttuRaTxAYw fd_array;
};
typedef N_STDCALL_PTR(int, tyProc__rWrG4X5lbcXQyLNkF9aNWhQ) (int nfds, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* readfds, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* writefds, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* exceptfds, tyObject_Timeval__9boMTr1l3P8e1j9aAjdqsQtA* timeout);
typedef N_STDCALL_PTR(NIM_BOOL, tyProc__8Py1tJvU9bm83KdBcpIBjeQ) (NI s, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* set);
typedef N_STDCALL_PTR(NI32, tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) (NI16* lpFileName);
typedef N_STDCALL_PTR(NI16*, tyProc__dQrdVesp1gLEVufnwKAlGA) (void);
typedef N_STDCALL_PTR(NI32, tyProc__dsGSP5d71RCsLRHTMM4ScA) (tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpIdleTime, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpKernelTime, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpUserTime);
typedef N_STDCALL_PTR(NI32, tyProc__Rm9bSPgU9bryMLuDkmTLzYBA) (NI hProcess, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpCreationTime, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpExitTime, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpKernelTime, tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpUserTime);
typedef N_STDCALL_PTR(NI32, tyProc__upTK7viB3ItEbrKv1N4qcg) (NI32 nBufferLength, NI16* lpBuffer);
typedef N_STDCALL_PTR(NI32, tyProc__OOyWBIidJm2ts1p9ci5TMxQ) (NI16* pathName, void* security);
typedef NIM_CHAR tyArray__EWK8XzFKXCg2WflN3ijhqA[257];
typedef NIM_CHAR tyArray__4249al09aeC68W9cvqMnjIYOA[129];
typedef NIM_CHAR tyArray__NSMq3FMCIrS8gSbyinBZ8w[14];
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__9axCnCRMUx32AHzFgBrzSMg) (Exception* e);
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (void* ClE_0);
void* ClE_0;
} tyProc__HzVCwACFYM9cx9aV62PdjtuA;
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI collections;
NI maxThreshold;
NI maxStackSize;
NI freedObjects;
};
struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw {
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* head;
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* tail;
CRITICAL_SECTION lock;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw toDispose;
NI gcThreadId;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (tyProc__HzVCwACFYM9cx9aV62PdjtuA cbproc, void* ClE_0);
void* ClE_0;
} tyProc__VHS3NdmbwcdcZKmKV1JWhw;

/* section: NIM_merge_SEQ_TYPES */
struct tySequence__aNpJjaoUowCQc7fBn3wtDQ {
  TGenericSeq Sup;
  tyProc__HzVCwACFYM9cx9aV62PdjtuA data[SEQ_DECL_SIZE];
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
typedef struct {tyProc__9axCnCRMUx32AHzFgBrzSMg localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg;
NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
tySequence__aNpJjaoUowCQc7fBn3wtDQ* threadDestructionHandlers__8OmU3x0fNdA0DLtOmU3kWw;
NI threadId__wzrdPYhtL9czkCWS4o9an9cRw;
TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
TSafePoint* excHandler__rqLlY5bs9atDw2OXYqJEn5g;
Exception* currException__9bVPeDJlYTi9bQApZpfH8wjg;
GcFrameHeader* gcFramePtr__ot48iojqko9aFxGhyjjjVaA;
tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* utcInstance__oeKVHn4dFpBJO35HhEkelw;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* localInstance__cLtN9cK9bCe6IPhJ3UFNLNKA;
NIM_BOOL envComputed__LLyFo9bsdu1ZXMDvAe8DhrQ;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* environment__mlhK49b6YMgc9cgrcYkKq9a3g;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* ownArgv__WVJ54JSHy7VxacV39bwBPFA;
NIM_BOOL ownParsedArgv__9btHydaUC5pNXxitEZsyzIg;
tyProc__VHS3NdmbwcdcZKmKV1JWhw callSoonProc__9b9b4iUSd60RO2UqC52ifJ6A;
tyObject_PDispatchercolonObjectType___mNiwh37MfaAP9cG4kqT6kpg* gDisp__yIbBArLUsg2pBJkilx4yvg;
tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* defaultSslContext__3GZQajZtKdLpqTTN2RjTzw;
NIM_BOOL isSlave__t9a8wsVVRYqGEKhg1vb49b3g;
NIM_BOOL pyThreadFrameInited__0LBR4zzVR5uWvgtv8SrMjg;
NIM_BOOL gcInited__uuy3PWTwb5gov9ao9bXJYBPg;
} NimThreadVars;

/* section: NIM_merge_PROC_HEADERS */
N_LIB_PRIVATE N_NIMCALL(void*, loadLib__Yq5XYz2ycX5V5B9bUM4Uyiw)(NimStringDesc* path, NIM_BOOL globalSymbols);
N_LIB_PRIVATE N_NIMCALL(void*, symAddr__ALH9bdNwXEzg7MPq4PA9csvw)(void* lib, NCSTRING name);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(void*, GetThreadLocalVars)(void);
N_LIB_PRIVATE N_NIMCALL(void*, threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw)(NI32 dwTlsIndex);
N_LIB_PRIVATE N_NIMCALL(void*, nimLoadLibrary)(NimStringDesc* path);
N_LIB_PRIVATE N_NIMCALL(void, nimLoadLibraryError)(NimStringDesc* path);
N_LIB_PRIVATE N_NIMCALL(void*, nimGetProcAddr)(void* lib, NCSTRING name);
N_LIB_PRIVATE N_NIMCALL(NI64, ze64__Ym9bDMq70VeyLEG9cy2hJAlw)(NI32 x);

/* section: NIM_merge_DATA */
STRING_LITERAL(TM__k6kyf4Co79a84IkK9blFuQVA_2, "Ws2_32.dll", 10);
STRING_LITERAL(TM__k6kyf4Co79a84IkK9blFuQVA_5, "Ws2_32.dll", 10);
STRING_LITERAL(TM__k6kyf4Co79a84IkK9blFuQVA_10, "kernel32", 8);
STRING_LITERAL(TM__k6kyf4Co79a84IkK9blFuQVA_11, "kernel32", 8);

/* section: NIM_merge_VARS */
N_LIB_PRIVATE tyObject_GUID__J2WQBMgezjwf6Trblkflgg WSAID_CONNECTEX__YmR9c9crObjjK9ckt1ygsPQKg = {((NI32) 631375801), ((NI16) -8717), ((NI16) 18016), {((NI8) -114),
((NI8) -23),
((NI8) 118),
((NI8) -27),
((NI8) -116),
((NI8) 116),
((NI8) 6),
((NI8) 62)}
}
;
N_LIB_PRIVATE tyObject_GUID__J2WQBMgezjwf6Trblkflgg WSAID_ACCEPTEX__pwoOiDuyZgHBOLaI2GSBpg = {((NI32) -1254720015), ((NI16) -13396), ((NI16) 4559), {((NI8) -107),
((NI8) -54),
((NI8) 0),
((NI8) -128),
((NI8) 95),
((NI8) 72),
((NI8) -95),
((NI8) -110)}
}
;
N_LIB_PRIVATE tyObject_GUID__J2WQBMgezjwf6Trblkflgg WSAID_GETACCEPTEXSOCKADDRS__rSjtFMq7pCHQR2EQvcKbDg = {((NI32) -1254720014), ((NI16) -13396), ((NI16) 4559), {((NI8) -107),
((NI8) -54),
((NI8) 0),
((NI8) -128),
((NI8) 95),
((NI8) 72),
((NI8) -95),
((NI8) -110)}
}
;
N_LIB_PRIVATE tyProc__5ctyytqoGFQ0BA1imFGbVw inet_ntop_real__FVXn9aJ5AOo23ScDsZUc9aZw = NIM_NIL;
N_LIB_PRIVATE void* ws2__hGspZUrVrEMpO9aP9c3dJQPQ;
extern NI32 globalsSlot__ciXDZu9c27pHpCRMoz4RIgw;
static void* TM__k6kyf4Co79a84IkK9blFuQVA_3;
tyProc__As5z9bYt859cLKWaorPRgQYA Dl_12983442_;
static void* TM__k6kyf4Co79a84IkK9blFuQVA_8;
tyProc__aO673xGTLLxou7P7GxoCXA Dl_12981835_;
tyProc__im9buRnIvptJfzdASYMEbBA Dl_12982001_;
tyProc__9bXer9a4ps9aSGctILcxWReVw Dl_12981830_;
tyProc__9aO2cP4IgwjXF8JfUR57CHQ Dl_12983260_;
tyProc__IQbFr9cLT9bipWCXYfwYwjOw Dl_12983265_;
tyProc__m8OtNuKklv1X2vQjXQkzSA Dl_12985067_;
tyProc__Tjolzh1w2dIIpj3oCDGPFw Dl_12982864_;
tyProc__uryidYWkntM7ddjZSyxvyQ Dl_12983563_;
tyProc__lLim4ugM6CVjiaTaa7eXVA Dl_12982456_;
tyProc__ofoySXaAAlxxs9bQS9a1etlg Dl_12982614_;
tyProc__MvjKU9c5nvs0N3IrS4vNgSw Dl_12983447_;
tyProc__IV3cwg4tBg3JP8ITSKt7oQ Dl_12983456_;
tyProc__T129bsPZ4FvuSF4rGFSBKkg Dl_12983281_;
tyProc__4YBDaTH9b4xNNXSV9ahdJZ8w Dl_12983345_;
tyProc__rWrG4X5lbcXQyLNkF9aNWhQ Dl_12983336_;
tyProc__8Py1tJvU9bm83KdBcpIBjeQ Dl_12983377_;
tyProc__4YBDaTH9b4xNNXSV9ahdJZ8w Dl_12983320_;
tyProc__2Dt6vzy4xOVEtn3qjtrTDQ Dl_12982624_;
tyProc__dQrdVesp1gLEVufnwKAlGA Dl_12982645_;
tyProc__2Dt6vzy4xOVEtn3qjtrTDQ Dl_12982647_;
tyProc__dsGSP5d71RCsLRHTMM4ScA Dl_12985132_;
tyProc__Rm9bSPgU9bryMLuDkmTLzYBA Dl_12985138_;
tyProc__upTK7viB3ItEbrKv1N4qcg Dl_12982004_;
tyProc__OOyWBIidJm2ts1p9ci5TMxQ Dl_12982011_;

/* section: NIM_merge_PROCS */
static N_INLINE(void*, GetThreadLocalVars)(void) {
	void* result;
	void* T1_;
	result = (void*)0;
	T1_ = (void*)0;
	T1_ = threadVarGetValue__O8VJSmwa3WY6y9bP6Ht9b7hw(globalsSlot__ciXDZu9c27pHpCRMoz4RIgw);
	result = ((void*) ((*((tyObject_GcThread__hgJQSlfXDOK3SwSHjeZBXg*) (T1_))).tls));
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	NimThreadVars* NimTV_;
	NimTV_ = (NimThreadVars*) GetThreadLocalVars();
	result = (NIM_BOOL*)0;
	result = (&NimTV_->nimInErrorMode__759bT87luu8XGcbkw13FUjA);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, rdFileSize__K9a4TDWuOfvg9cCJzFh9c9cB9bQ)(tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA* f) {
	NI64 result;
	NI64 T1_;
	NI64 T2_;
	result = (NI64)0;
	T1_ = (NI64)0;
	T1_ = ze64__Ym9bDMq70VeyLEG9cy2hJAlw((*f).nFileSizeLow);
	T2_ = (NI64)0;
	T2_ = ze64__Ym9bDMq70VeyLEG9cy2hJAlw((*f).nFileSizeHigh);
	result = (NI64)(T1_ | (NI64)((NU64)(T2_) << (NU64)(((NI) 32))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, FD_ZERO__fc638nyQpO9cH1ijJnul9bcg)(tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* s) {
	(*s).fd_count = ((int) 0);
}
N_LIB_PRIVATE N_NIMCALL(void, FD_SET__1WYTU33XIA9apfyIaLFoFkw)(NI socket_0, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* s) {
	{
		if (!((*s).fd_count < ((NI32) 64))) goto LA3_;
		(*s).fd_array[(((NI) ((*s).fd_count)))- 0] = socket_0;
		(*s).fd_count += ((NI) 1);
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(int, FD_ISSET__2ettf7Q5JTgZVmDLhx6ICQ)(NI socket_0, tyObject_TFdSet__lYo1mv6gU9aT1ZE1etM9ceog* set) {
	int result;
	result = (int)0;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = Dl_12983377_(socket_0, set);
		if (!T3_) goto LA4_;
		result = ((NI32) 1);
	}
	goto LA1_;
	LA4_: ;
	{
		result = ((NI32) 0);
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, rdFileTime__DfLqBYlqX7ZqK7NeVOk8ew)(tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw f) {
	NI64 result;
	NI64 T1_;
	NI64 T2_;
	result = (NI64)0;
	T1_ = (NI64)0;
	T1_ = ze64__Ym9bDMq70VeyLEG9cy2hJAlw(f.dwLowDateTime);
	T2_ = (NI64)0;
	T2_ = ze64__Ym9bDMq70VeyLEG9cy2hJAlw(f.dwHighDateTime);
	result = (NI64)(T1_ | (NI64)((NU64)(T2_) << (NU64)(((NI) 32))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, stdlib_winleanInit000)(void) {
{
	void* T1_;
NIM_BOOL* nimErr_;
nimErr_ = nimErrorFlag();
	T1_ = (void*)0;
	T1_ = loadLib__Yq5XYz2ycX5V5B9bUM4Uyiw(((NimStringDesc*) &TM__k6kyf4Co79a84IkK9blFuQVA_2), NIM_FALSE);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	ws2__hGspZUrVrEMpO9aP9c3dJQPQ = T1_;
	{
		void* T6_;
		if (!!((ws2__hGspZUrVrEMpO9aP9c3dJQPQ == NIM_NIL))) goto LA4_;
		T6_ = (void*)0;
		T6_ = symAddr__ALH9bdNwXEzg7MPq4PA9csvw(ws2__hGspZUrVrEMpO9aP9c3dJQPQ, "inet_ntop");
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		inet_ntop_real__FVXn9aJ5AOo23ScDsZUc9aZw = ((tyProc__5ctyytqoGFQ0BA1imFGbVw) (T6_));
	}
	LA4_: ;
	BeforeRet_: ;
}
}

N_LIB_PRIVATE N_NIMCALL(void, stdlib_winleanDatInit000)(void) {

/* section: NIM_merge_DYNLIB_INIT */
if (!((TM__k6kyf4Co79a84IkK9blFuQVA_3 = nimLoadLibrary(((NimStringDesc*) &TM__k6kyf4Co79a84IkK9blFuQVA_5)))
)) nimLoadLibraryError(((NimStringDesc*) &TM__k6kyf4Co79a84IkK9blFuQVA_2));
	Dl_12983442_ = (tyProc__As5z9bYt859cLKWaorPRgQYA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "WSAStartup");
if (!((TM__k6kyf4Co79a84IkK9blFuQVA_8 = nimLoadLibrary(((NimStringDesc*) &TM__k6kyf4Co79a84IkK9blFuQVA_10)))
)) nimLoadLibraryError(((NimStringDesc*) &TM__k6kyf4Co79a84IkK9blFuQVA_11));
	Dl_12981835_ = (tyProc__aO673xGTLLxou7P7GxoCXA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "FormatMessageW");
	Dl_12982001_ = (tyProc__im9buRnIvptJfzdASYMEbBA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "LocalFree");
	Dl_12981830_ = (tyProc__9bXer9a4ps9aSGctILcxWReVw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetLastError");
	Dl_12983260_ = (tyProc__9aO2cP4IgwjXF8JfUR57CHQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "socket");
	Dl_12983265_ = (tyProc__IQbFr9cLT9bipWCXYfwYwjOw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "closesocket");
	Dl_12985067_ = (tyProc__m8OtNuKklv1X2vQjXQkzSA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "WSAIoctl");
	Dl_12982864_ = (tyProc__Tjolzh1w2dIIpj3oCDGPFw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "Sleep");
	Dl_12983563_ = (tyProc__uryidYWkntM7ddjZSyxvyQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetCurrentProcess");
	Dl_12982456_ = (tyProc__lLim4ugM6CVjiaTaa7eXVA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "FindFirstFileW");
	Dl_12982614_ = (tyProc__ofoySXaAAlxxs9bQS9a1etlg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "FindClose");
	Dl_12983447_ = (tyProc__MvjKU9c5nvs0N3IrS4vNgSw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "getaddrinfo");
	Dl_12983456_ = (tyProc__IV3cwg4tBg3JP8ITSKt7oQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "freeaddrinfo");
	Dl_12983281_ = (tyProc__T129bsPZ4FvuSF4rGFSBKkg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "connect");
	Dl_12983345_ = (tyProc__4YBDaTH9b4xNNXSV9ahdJZ8w) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "send");
	Dl_12983336_ = (tyProc__rWrG4X5lbcXQyLNkF9aNWhQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "select");
	Dl_12983377_ = (tyProc__8Py1tJvU9bm83KdBcpIBjeQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "__WSAFDIsSet");
	Dl_12983320_ = (tyProc__4YBDaTH9b4xNNXSV9ahdJZ8w) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "recv");
	Dl_12982624_ = (tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetFileAttributesW");
	Dl_12982645_ = (tyProc__dQrdVesp1gLEVufnwKAlGA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetEnvironmentStringsW");
	Dl_12982647_ = (tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "FreeEnvironmentStringsW");
	Dl_12985132_ = (tyProc__dsGSP5d71RCsLRHTMM4ScA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetSystemTimes");
	Dl_12985138_ = (tyProc__Rm9bSPgU9bryMLuDkmTLzYBA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetProcessTimes");
	Dl_12982004_ = (tyProc__upTK7viB3ItEbrKv1N4qcg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "GetCurrentDirectoryW");
	Dl_12982011_ = (tyProc__OOyWBIidJm2ts1p9ci5TMxQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_8, "CreateDirectoryW");
}

