/* 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"
#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_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA;
typedef struct tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw;
typedef struct tyObject_STARTUPINFO__WGlpKvY9cdd69bAwMQMNLYoQ tyObject_STARTUPINFO__WGlpKvY9cdd69bAwMQMNLYoQ;
typedef struct tyObject_PROCESS_INFORMATION__rpgAdaffN9b79bo2kEQiFsMg tyObject_PROCESS_INFORMATION__rpgAdaffN9b79bo2kEQiFsMg;
typedef struct tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw;

/* 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 N_STDCALL_PTR(NI, tyProc__uryidYWkntM7ddjZSyxvyQ) (void);
typedef N_STDCALL_PTR(NI, tyProc__zP2zGemcuVRvOUE82f9a0Pw) (NI32 nStdHandle);
typedef N_STDCALL_PTR(NI16*, tyProc__dQrdVesp1gLEVufnwKAlGA) (void);
typedef N_STDCALL_PTR(NI32, tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) (NI16* para1);
typedef N_STDCALL_PTR(NI32, tyProc__Fy3maWJHyCtUWvrB9bSdkUw) (NI16* lpFileName, NI32 nBufferLength, NI16* lpBuffer, NI16** lpFilePart);
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__lLim4ugM6CVjiaTaa7eXVA) (NI16* lpFileName, tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA* lpFindFileData);
typedef N_STDCALL_PTR(NI32, tyProc__jwEWAkul5J6p6K0UfXa1tw) (NI hFindFile, tyObject_WIN32_FIND_DATA__aYwmSz9bIz0JHAL9ciwIrnhA* lpFindFileData);
typedef N_STDCALL_PTR(void, tyProc__ofoySXaAAlxxs9bQS9a1etlg) (NI hFindFile);
typedef N_STDCALL_PTR(NI32, tyProc__upTK7viB3ItEbrKv1N4qcg) (NI32 nBufferLength, NI16* lpBuffer);
typedef N_STDCALL_PTR(NI32, tyProc__LGDJfXC77WFm4ami8tbVyg) (NI handle, NI16* buf, NI32 size);
typedef N_STDCALL_PTR(NI32, tyProc__C5kM33gEhlSKPXwfDNHofQ) (NI* hReadPipe, NI* hWritePipe, tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw* lpPipeAttributes, NI32 nSize);
typedef N_STDCALL_PTR(NI32, tyProc__mBVOPXmpGfUrrbA9a5K9cMbQ) (NI hObject, NI32 dwMask, NI32 dwFlags);
typedef N_STDCALL_PTR(NI, tyProc__ox3t5iM0vxm1voo9c2CrxLQ) (NI16* lpName, NI32 dwOpenMode, NI32 dwPipeMode, NI32 nMaxInstances, NI32 nOutBufferSize, NI32 nInBufferSize, NI32 nDefaultTimeOut, tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw* lpSecurityAttributes);
typedef N_STDCALL_PTR(NI, tyProc__A2Q4AG9aesAd2D8S5BP4y2g) (NI16* lpFileName, NI32 dwDesiredAccess, NI32 dwShareMode, void* lpSecurityAttributes, NI32 dwCreationDisposition, NI32 dwFlagsAndAttributes, NI hTemplateFile);
typedef N_STDCALL_PTR(NI32, tyProc__oew1DfaGl5XhHmnBK0HYXQ) (NI hSourceProcessHandle, NI hSourceHandle, NI hTargetProcessHandle, NI* lpTargetHandle, NI32 dwDesiredAccess, NI32 bInheritHandle, NI32 dwOptions);
typedef N_STDCALL_PTR(NI32, tyProc__P13srMBg9b3d3yEV9aW4NCoA) (NI hObject);
typedef N_STDCALL_PTR(NI32, tyProc__hHrNIgHA5HNxhRfMx6QeWg) (NI16* lpApplicationName, NI16* lpCommandLine, tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw* lpProcessAttributes, tyObject_SECURITY_ATTRIBUTES__P4HW9ceaevTBZ5O3kGC8yyw* lpThreadAttributes, NI32 bInheritHandles, NI32 dwCreationFlags, NI16* lpEnvironment, NI16* lpCurrentDirectory, tyObject_STARTUPINFO__WGlpKvY9cdd69bAwMQMNLYoQ* lpStartupInfo, tyObject_PROCESS_INFORMATION__rpgAdaffN9b79bo2kEQiFsMg* lpProcessInformation);
typedef N_STDCALL_PTR(NI32, tyProc__9ajZYMGL5GqiRFqiCC367oA) (NI hFile, void* buffer, NI32 nNumberOfBytesToRead, NI32* lpNumberOfBytesRead, void* lpOverlapped);
typedef N_STDCALL_PTR(NI32, tyProc__FprzxJFfqQdWyyGxiUsmeQ) (NI hHandle, NI32 dwMilliseconds);
typedef N_STDCALL_PTR(NI32, tyProc__KxeGXN001TReCr89ca9c5bng) (NI hProcess, NI32* lpExitCode);
typedef N_STDCALL_PTR(void, tyProc__9bc9cLDdaqTE6n5J78feKRYg) (tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw* lpSystemTimeAsFileTime);
struct tyObject_FILETIME__bs4NMleDDVF7xsEK0SGLBw {
NI32 dwLowDateTime;
NI32 dwHighDateTime;
};
typedef N_STDCALL_PTR(NI32, tyProc__OOyWBIidJm2ts1p9ci5TMxQ) (NI16* pathName, void* security);
typedef N_STDCALL_PTR(NI32, tyProc__HH5OcpN6GzcD9cRu6eeMBGw) (NI16* lpFileName, NI32 dwFileAttributes);

/* 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);
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, "kernel32", 8);
STRING_LITERAL(TM__k6kyf4Co79a84IkK9blFuQVA_6, "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 NIM_BOOL nimInErrorMode__759bT87luu8XGcbkw13FUjA;
static void* TM__k6kyf4Co79a84IkK9blFuQVA_3;
tyProc__uryidYWkntM7ddjZSyxvyQ Dl_12798563_;
tyProc__zP2zGemcuVRvOUE82f9a0Pw Dl_12796820_;
tyProc__dQrdVesp1gLEVufnwKAlGA Dl_12797645_;
tyProc__2Dt6vzy4xOVEtn3qjtrTDQ Dl_12797647_;
tyProc__Fy3maWJHyCtUWvrB9bSdkUw Dl_12797617_;
tyProc__aO673xGTLLxou7P7GxoCXA Dl_12796835_;
tyProc__im9buRnIvptJfzdASYMEbBA Dl_12797001_;
tyProc__9bXer9a4ps9aSGctILcxWReVw Dl_12796830_;
tyProc__lLim4ugM6CVjiaTaa7eXVA Dl_12797456_;
tyProc__jwEWAkul5J6p6K0UfXa1tw Dl_12797461_;
tyProc__ofoySXaAAlxxs9bQS9a1etlg Dl_12797614_;
tyProc__2Dt6vzy4xOVEtn3qjtrTDQ Dl_12797624_;
tyProc__upTK7viB3ItEbrKv1N4qcg Dl_12797004_;
tyProc__LGDJfXC77WFm4ami8tbVyg Dl_12797022_;
tyProc__C5kM33gEhlSKPXwfDNHofQ Dl_12796557_;
tyProc__mBVOPXmpGfUrrbA9a5K9cMbQ Dl_12798558_;
tyProc__ox3t5iM0vxm1voo9c2CrxLQ Dl_12796565_;
tyProc__A2Q4AG9aesAd2D8S5BP4y2g Dl_12798565_;
tyProc__oew1DfaGl5XhHmnBK0HYXQ Dl_12798543_;
tyProc__P13srMBg9b3d3yEV9aW4NCoA Dl_12796538_;
tyProc__hHrNIgHA5HNxhRfMx6QeWg Dl_12796587_;
tyProc__9ajZYMGL5GqiRFqiCC367oA Dl_12796541_;
tyProc__9ajZYMGL5GqiRFqiCC367oA Dl_12796549_;
tyProc__FprzxJFfqQdWyyGxiUsmeQ Dl_12796807_;
tyProc__KxeGXN001TReCr89ca9c5bng Dl_12796815_;
tyProc__9bc9cLDdaqTE6n5J78feKRYg Dl_12797860_;
tyProc__OOyWBIidJm2ts1p9ci5TMxQ Dl_12797011_;
tyProc__2Dt6vzy4xOVEtn3qjtrTDQ Dl_12798574_;
tyProc__HH5OcpN6GzcD9cRu6eeMBGw Dl_12797627_;

/* section: NIM_merge_PROCS */
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (NIM_BOOL*)0;
	result = (&nimInErrorMode__759bT87luu8XGcbkw13FUjA);
	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_6));
	Dl_12798563_ = (tyProc__uryidYWkntM7ddjZSyxvyQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetCurrentProcess");
	Dl_12796820_ = (tyProc__zP2zGemcuVRvOUE82f9a0Pw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetStdHandle");
	Dl_12797645_ = (tyProc__dQrdVesp1gLEVufnwKAlGA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetEnvironmentStringsW");
	Dl_12797647_ = (tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "FreeEnvironmentStringsW");
	Dl_12797617_ = (tyProc__Fy3maWJHyCtUWvrB9bSdkUw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetFullPathNameW");
	Dl_12796835_ = (tyProc__aO673xGTLLxou7P7GxoCXA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "FormatMessageW");
	Dl_12797001_ = (tyProc__im9buRnIvptJfzdASYMEbBA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "LocalFree");
	Dl_12796830_ = (tyProc__9bXer9a4ps9aSGctILcxWReVw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetLastError");
	Dl_12797456_ = (tyProc__lLim4ugM6CVjiaTaa7eXVA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "FindFirstFileW");
	Dl_12797461_ = (tyProc__jwEWAkul5J6p6K0UfXa1tw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "FindNextFileW");
	Dl_12797614_ = (tyProc__ofoySXaAAlxxs9bQS9a1etlg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "FindClose");
	Dl_12797624_ = (tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetFileAttributesW");
	Dl_12797004_ = (tyProc__upTK7viB3ItEbrKv1N4qcg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetCurrentDirectoryW");
	Dl_12797022_ = (tyProc__LGDJfXC77WFm4ami8tbVyg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetModuleFileNameW");
	Dl_12796557_ = (tyProc__C5kM33gEhlSKPXwfDNHofQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CreatePipe");
	Dl_12798558_ = (tyProc__mBVOPXmpGfUrrbA9a5K9cMbQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "SetHandleInformation");
	Dl_12796565_ = (tyProc__ox3t5iM0vxm1voo9c2CrxLQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CreateNamedPipeW");
	Dl_12798565_ = (tyProc__A2Q4AG9aesAd2D8S5BP4y2g) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CreateFileW");
	Dl_12798543_ = (tyProc__oew1DfaGl5XhHmnBK0HYXQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "DuplicateHandle");
	Dl_12796538_ = (tyProc__P13srMBg9b3d3yEV9aW4NCoA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CloseHandle");
	Dl_12796587_ = (tyProc__hHrNIgHA5HNxhRfMx6QeWg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CreateProcessW");
	Dl_12796541_ = (tyProc__9ajZYMGL5GqiRFqiCC367oA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "ReadFile");
	Dl_12796549_ = (tyProc__9ajZYMGL5GqiRFqiCC367oA) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "WriteFile");
	Dl_12796807_ = (tyProc__FprzxJFfqQdWyyGxiUsmeQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "WaitForSingleObject");
	Dl_12796815_ = (tyProc__KxeGXN001TReCr89ca9c5bng) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetExitCodeProcess");
	Dl_12797860_ = (tyProc__9bc9cLDdaqTE6n5J78feKRYg) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "GetSystemTimeAsFileTime");
	Dl_12797011_ = (tyProc__OOyWBIidJm2ts1p9ci5TMxQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "CreateDirectoryW");
	Dl_12798574_ = (tyProc__2Dt6vzy4xOVEtn3qjtrTDQ) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "DeleteFileW");
	Dl_12797627_ = (tyProc__HH5OcpN6GzcD9cRu6eeMBGw) nimGetProcAddr(TM__k6kyf4Co79a84IkK9blFuQVA_3, "SetFileAttributesW");
}

