/* Generated by Nim Compiler v2.2.10 */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <spawn.h>
#include <signal.h>
#include <sys/wait.h>
#include <time.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.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
typedef struct tyTuple__XOVT24GHXwqiEj5GCsEGCA tyTuple__XOVT24GHXwqiEj5GCsEGCA;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
typedef struct tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ;
typedef struct tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg;
typedef struct tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content;
typedef struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A;
typedef struct TNimTypeV2 TNimTypeV2;
typedef struct RootObj RootObj;
typedef struct tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w;
typedef struct tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w;
typedef struct tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg;
typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q;
typedef struct tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg;
typedef struct tyTuple__DTRsWi2kgTewbhN2TT5mbA tyTuple__DTRsWi2kgTewbhN2TT5mbA;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tySequence__xv3aaFd3JCw8NbmALHiezQ tySequence__xv3aaFd3JCw8NbmALHiezQ;
typedef struct tySequence__xv3aaFd3JCw8NbmALHiezQ_Content tySequence__xv3aaFd3JCw8NbmALHiezQ_Content;
typedef struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA tyTuple__sPaDkVPSC0MkcoXCxPH9ccA;
typedef struct tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA;
typedef struct tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA;
typedef struct tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg;
typedef struct tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg;
typedef struct tySequence__9aHwlozdspjDnjhtzDhmdVg tySequence__9aHwlozdspjDnjhtzDhmdVg;
typedef struct tySequence__9aHwlozdspjDnjhtzDhmdVg_Content tySequence__9aHwlozdspjDnjhtzDhmdVg_Content;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g tySequence__qwqHTkRvwhrRyENtudHQ7g;
typedef struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content tySequence__qwqHTkRvwhrRyENtudHQ7g_Content;
struct NimStrPayload {
	NI cap;
	NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
	NI len;
	NimStrPayload* p;
};
struct tyTuple__XOVT24GHXwqiEj5GCsEGCA {
	NimStringV2 Field0;
	NI Field1;
};
typedef NU8 tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw;
typedef int tyArray__Zwjt9bECqO23Zah8rGoMkoQ[2];
struct tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA {
	NimStringV2 sysCommand;
	NCSTRING* sysArgs;
	NCSTRING* sysEnv;
	NCSTRING workingDir;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStdin;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStdout;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStderr;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pErrorPipe;
	tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
  NI len; tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content* p;
};
struct tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A {
	NI rc;
	NI rootIdx;
};
struct TNimTypeV2 {
	void* destructor;
	NI size;
	NI16 align;
	NI16 depth;
	NU32* display;
	void* traceImpl;
	void* typeInfoV1;
	NI flags;
	void* vTable[SEQ_DECL_SIZE];
};
struct RootObj {
	TNimTypeV2* m_type;
};
struct tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ {
	RootObj Sup;
	int inHandle;
	int outHandle;
	int errHandle;
	pid_t id;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* inStream;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* outStream;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* errStream;
	int exitStatus;
	NIM_BOOL exitFlag;
	tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options;
};
struct tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg {
	NI len;
	NI cap;
	tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d;
};
struct tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg {
	NI len;
	NI cap;
	tyTuple__DTRsWi2kgTewbhN2TT5mbA* d;
};
struct tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w {
	tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg traceStack;
	tyObject_CellSeq__IHvIqxITv1yMjJj8lwLrhg toFree;
	NI freed;
	NI touched;
	NI edges;
	NI rcSum;
	NIM_BOOL keepThreshold;
};
struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q {
	void** Field0;
	TNimTypeV2* Field1;
};
typedef NU8 tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw;
typedef NCSTRING tyUncheckedArray__nvS6J9clHMUMHfoZd8Ad2zg[1];
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
	NimStringV2 Field0;
	NimStringV2 Field1;
};
struct tySequence__xv3aaFd3JCw8NbmALHiezQ {
  NI len; tySequence__xv3aaFd3JCw8NbmALHiezQ_Content* p;
};
typedef NU8 tyEnum_StringTableMode__u9a7txyB5iiP8Ga24K7XezA;
struct tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg {
	RootObj Sup;
	NI counter;
	tySequence__xv3aaFd3JCw8NbmALHiezQ data;
	tyEnum_StringTableMode__u9a7txyB5iiP8Ga24K7XezA mode;
};
struct tyTuple__sPaDkVPSC0MkcoXCxPH9ccA {
	NimStringV2 Field0;
	NimStringV2 Field1;
	NIM_BOOL Field2;
};
typedef NimStringV2 tyArray__dyW7vpmfeTYw8kX3EXuaJA[3];
typedef N_NIMCALL_PTR(void, tyProc__DXGqmuActUm0S3MKNsreGw) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__Fono1uAye9aDS77o2sqPoIg) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0);
typedef N_NIMCALL_PTR(void, tyProc__zdMZVwOrDkH4aQdAWbmhfA) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, NI pos_p1);
typedef N_NIMCALL_PTR(NI, tyProc__hJ4RdVQy2jQRw0zV2TsXng) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0);
typedef N_NIMCALL_PTR(NI, tyProc__e59bWp0wEul4j9a5QwZc9bB9cQ) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, NimStringV2* buffer_p1, tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA slice_p2);
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc__7tjyszhbbb180aOkghqCyw) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, NimStringV2* line_p1);
typedef N_NIMCALL_PTR(NI, tyProc__a9cZWdPu9bXGVJA7dJZ9aX8bQ) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, void* buffer_p1, NI bufLen_p2);
typedef N_NIMCALL_PTR(void, tyProc__BwfRbL9cjs7RFNMDfL4200g) (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, void* buffer_p1, NI bufLen_p2);
struct tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w {
	RootObj Sup;
	tyProc__DXGqmuActUm0S3MKNsreGw closeImpl;
	tyProc__Fono1uAye9aDS77o2sqPoIg atEndImpl;
	tyProc__zdMZVwOrDkH4aQdAWbmhfA setPositionImpl;
	tyProc__hJ4RdVQy2jQRw0zV2TsXng getPositionImpl;
	tyProc__e59bWp0wEul4j9a5QwZc9bB9cQ readDataStrImpl;
	tyProc__7tjyszhbbb180aOkghqCyw readLineImpl;
	tyProc__a9cZWdPu9bXGVJA7dJZ9aX8bQ readDataImpl;
	tyProc__a9cZWdPu9bXGVJA7dJZ9aX8bQ peekDataImpl;
	tyProc__BwfRbL9cjs7RFNMDfL4200g writeDataImpl;
	tyProc__DXGqmuActUm0S3MKNsreGw flushImpl;
};
struct tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA {
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w Sup;
	FILE* f;
};
typedef NU8 tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg;
struct tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg {
	NI64 seconds;
	NI nanosecond;
};
struct tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg {
	NI64 ticks;
};
typedef tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg tyArray__wiSdUURaglXGOCT5SEwZlw[3];
typedef NimStringV2 tyArray__TonP9cxJgj8gXu71dWIyNlA[1];
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NI idx_p0, void* ClE_0);
void* ClE_0;
} tyProc__SqRJqa5aOiKB4EuKlKh9asA;
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NI idx_p0, tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p1, void* ClE_0);
void* ClE_0;
} tyProc__T07WD5hEWgf9abRYNKhwosw;
struct tySequence__9aHwlozdspjDnjhtzDhmdVg {
  NI len; tySequence__9aHwlozdspjDnjhtzDhmdVg_Content* p;
};
struct tySequence__qwqHTkRvwhrRyENtudHQ7g {
  NI len; tySequence__qwqHTkRvwhrRyENtudHQ7g_Content* p;
};
typedef N_CLOSURE_PTR(void, TM__HZdw8BhppcTQo8DIK46LSg_37) (NI idx_p0);
typedef N_CLOSURE_PTR(void, TM__HZdw8BhppcTQo8DIK46LSg_42) (NI idx_p0, tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p1);
typedef N_CLOSURE_PTR(void, TM__HZdw8BhppcTQo8DIK46LSg_43) (NI idx_p0);
typedef N_CLOSURE_PTR(void, TM__HZdw8BhppcTQo8DIK46LSg_45) (NI idx_p0);
typedef N_CLOSURE_PTR(void, TM__HZdw8BhppcTQo8DIK46LSg_47) (NI idx_p0, tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p1);
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content { NI cap; NimStringV2 data[SEQ_DECL_SIZE]; };
struct tySequence__xv3aaFd3JCw8NbmALHiezQ_Content { NI cap; tyTuple__sPaDkVPSC0MkcoXCxPH9ccA data[SEQ_DECL_SIZE]; };
struct tyObject_HSlice__OAVyDXS0QPw7LdXClfU2hA {
	NI a;
	NI b;
};
struct tySequence__9aHwlozdspjDnjhtzDhmdVg_Content { NI cap; tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* data[SEQ_DECL_SIZE]; };
struct tySequence__qwqHTkRvwhrRyENtudHQ7g_Content { NI cap; NI data[SEQ_DECL_SIZE]; };
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2691)(NimStringV2 dest_p0);
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1);
static N_INLINE(void, nimSetMem__system_u2172)(void* a_p0, int v_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u228)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0);
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0);
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_u3497)(NIM_BOOL isDestroyAction_p0, tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* s_p1, TNimTypeV2* desc_p2);
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p_p0);
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObj)(NI size_p0, NI alignment_p1);
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZosproc_u2061)(void* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u248)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZosproc_u260)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0, void* env_p1);
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1);
static N_INLINE(void, add__system_u3018)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0, void** c_p1, TNimTypeV2* t_p2);
N_LIB_PRIVATE N_NIMCALL(void, resize__system_u3026)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0);
static N_INLINE(NI, pluspercent___system_u785)(NI x_p0, NI y_p1);
N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__stdZoserrors_u119)(NI32 errorCode_p0, NimStringV2 additionalInfo_p1);
N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__stdZoserrors_u122)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___system_u2700)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void*, newSeqPayload)(NI cap_p0, NI elemSize_p1, NI elemAlign_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, eqdup___system_u2697)(NimStringV2 src_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2694)(NimStringV2* dest_p0, NimStringV2 src_p1);
N_LIB_PRIVATE N_NIMCALL(void, add__stdZenumutils_u71)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ* x_p0, NimStringV2 y_p1);
N_LIB_PRIVATE N_NIMCALL(NCSTRING*, allocCStringArray__system_u5597)(NimStringV2* a_p0, NI a_p0Len_0);
N_LIB_PRIVATE N_NIMCALL(NCSTRING*, envToCStringArray__pureZosproc_u755)(void);
static N_INLINE(NIM_BOOL, eqeq___system_u8576)(NCSTRING x_p0, NCSTRING y_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, cstrToNimstr)(NCSTRING str_p0);
static N_INLINE(NI, find__pureZparseutils_u636)(NimStringV2 a_p0, NIM_CHAR item_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___stdZprivateZospaths2_u315)(tyTuple__UV3llMMYFckfui8YMBuUZA* dest_p0, tyTuple__UV3llMMYFckfui8YMBuUZA src_p1);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8632)(NimStringV2 s_p0, NI first_p1, NI last_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, substr__system_u8645)(NimStringV2 s_p0, NI first_p1);
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___system_u2688)(NimStringV2* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZprivateZospaths2_u306)(tyTuple__UV3llMMYFckfui8YMBuUZA dest_p0);
N_LIB_PRIVATE N_NOCONV(void*, alloc0Impl__system_u1760)(NI size_p0);
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1);
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2);
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space_p0);
N_LIB_PRIVATE N_NOCONV(void*, allocImpl__system_u1758)(NI size_p0);
N_LIB_PRIVATE N_NIMCALL(NCSTRING*, envToCStringArray__pureZosproc_u743)(tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* t_p0);
N_LIB_PRIVATE N_NIMCALL(NI, nstlen)(tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* t_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nosgetCurrentDir)(void);
N_LIB_PRIVATE N_NIMCALL(pid_t, startProcessAuxSpawn__pureZosproc_u785)(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA* data_p0);
static N_INLINE(NI, nimCStrLen)(NCSTRING a_p0);
static N_INLINE(void, setCurrentDir__stdZprivateZosdirs_u501)(NimStringV2 newDir_p0);
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuJoinSep)(NimStringV2* a_p0, NI a_p0Len_0, NimStringV2 sep_p1);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0);
N_LIB_PRIVATE N_NIMCALL(void, deallocCStringArray__system_u5651)(NCSTRING* a_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u5506)(tySequence__sM4lkSb7zS6F7OVMvW9cffQ dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u910)(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZstreams_u684)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w** dest_p0, tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* src_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA*, createStream__pureZosproc_u1165)(int* handle_p0, tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg fileMode_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, open__stdZsyncio_u475)(FILE** f_p0, int filehandle_p1, tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg mode_p2);
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA*, newFileStream__pureZstreams_u1072)(FILE* f_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZstreams_u980)(tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA* dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZstreams_u676)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w** dest_p0, tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* src_p1, NIM_BOOL cyclic_p2);
N_LIB_PRIVATE N_NIMCALL(int, exitStatusLikeShell__pureZos_u163)(int status_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg, initDuration__pureZtimes_u487)(NI64 nanoseconds_p0, NI64 microseconds_p1, NI64 milliseconds_p2, NI64 seconds_p3, NI64 minutes_p4, NI64 hours_p5, NI64 days_p6, NI64 weeks_p7);
N_LIB_PRIVATE N_NIMCALL(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg, plus___stdZmonotimes_u41)(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg a_p0, tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg b_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg, getMonoTime__stdZmonotimes_u5)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___stdZmonotimes_u53)(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg a_p0, tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg b_p1);
N_LIB_PRIVATE N_NIMCALL(NI64, ticks__stdZmonotimes_u31)(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg t_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg, minus___stdZmonotimes_u37)(tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg a_p0, tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg b_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg, min__pureZosproc_u1111)(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg* x_p0, NI x_p0Len_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg, ntMulDuration)(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg a_p0, NI64 b_p1);
N_LIB_PRIVATE N_NIMCALL(void, close__pureZstreams_u58)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0);
N_LIB_PRIVATE N_NIMCALL(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ*, nospstartProcess)(NimStringV2 command_p0, NimStringV2 workingDir_p1, NimStringV2* args_p2, NI args_p2Len_0, tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* env_p3, tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options_p4);
N_LIB_PRIVATE N_NIMCALL(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*, nospoutputStream)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, write__pureZstreams_u184)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, NimStringV2 x_p1);
N_LIB_PRIVATE N_NIMCALL(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*, nospinputStream)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZstreams_u673)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* dest_p0);
N_NIMCALL(NimStringV2, rawNewString)(NI cap_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, readLine__pureZstreams_u555)(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* s_p0, NimStringV2* line_p1);
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s_p0, NI addLen_p1);
N_LIB_PRIVATE N_NIMCALL(NI, nosppeekExitCode)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isExitStatus__pureZosproc_u740)(int status_p0);
N_LIB_PRIVATE N_NIMCALL(void, nospclose)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(NI, ncpicountProcessors)(void);
N_LIB_PRIVATE N_NIMCALL(tySequence__9aHwlozdspjDnjhtzDhmdVg, newSeq__pureZosproc_u145)(NI len_p0);
N_LIB_PRIVATE N_NIMCALL(tySequence__qwqHTkRvwhrRyENtudHQ7g, newSeq__pureZosproc_u390)(NI len_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZosproc_u239)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ** dest_p0, tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* src_p1);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosprunning)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u474)(tySequence__qwqHTkRvwhrRyENtudHQ7g dest_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u319)(tySequence__9aHwlozdspjDnjhtzDhmdVg dest_p0);
N_LIB_PRIVATE N_NIMCALL(NI, nospwaitForExit)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0, NI timeout_p1);
N_LIB_PRIVATE TNimTypeV2 NTIv2__KkmVhVBIhdGPRUKkZJq9cLQ_;
static const struct {
  NI cap; NIM_CHAR data[0+1];
} TM__HZdw8BhppcTQo8DIK46LSg_3 = { 0 | NIM_STRLIT_FLAG, "" };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_4 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const struct {
  NI cap; NIM_CHAR data[7+1];
} TM__HZdw8BhppcTQo8DIK46LSg_5 = { 7 | NIM_STRLIT_FLAG, "/bin/sh" };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_6 = {7, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_5};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_7 = {7, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_5};
static const struct {
  NI cap; NIM_CHAR data[2+1];
} TM__HZdw8BhppcTQo8DIK46LSg_8 = { 2 | NIM_STRLIT_FLAG, "-c" };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_9 = {2, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_8};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__HZdw8BhppcTQo8DIK46LSg_10 = { 1 | NIM_STRLIT_FLAG, "=" };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_11 = {1, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_10};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_12 = {1, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_10};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_13 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_14 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_15 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_16 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_17 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_18 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_19 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_20 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_21 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_22 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_23 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_24 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_25 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__HZdw8BhppcTQo8DIK46LSg_26 = { 1 | NIM_STRLIT_FLAG, " " };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_27 = {1, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_26};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_28 = {1, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_26};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_29 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_30 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_31 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_32 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_33 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const struct {
  NI cap; NIM_CHAR data[1+1];
} TM__HZdw8BhppcTQo8DIK46LSg_34 = { 1 | NIM_STRLIT_FLAG, "\012" };
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_35 = {1, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_34};
static NIM_CONST tyProc__SqRJqa5aOiKB4EuKlKh9asA TM__HZdw8BhppcTQo8DIK46LSg_36 = {NIM_NIL,NIM_NIL};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_38 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_39 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_40 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static NIM_CONST tyProc__T07WD5hEWgf9abRYNKhwosw TM__HZdw8BhppcTQo8DIK46LSg_41 = {NIM_NIL,NIM_NIL};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_44 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
static const NimStringV2 TM__HZdw8BhppcTQo8DIK46LSg_46 = {0, (NimStrPayload*)&TM__HZdw8BhppcTQo8DIK46LSg_3};
N_LIB_PRIVATE NIM_CONST tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg maxWait__pureZosproc_u1089 = {IL64(0), ((NI)50000000)}
;
static NIM_CONST NU32 TM__HZdw8BhppcTQo8DIK46LSg_2[2] = {3701606400, 1234535680};
N_LIB_PRIVATE TNimTypeV2 NTIv2__KkmVhVBIhdGPRUKkZJq9cLQ_ = {.destructor = (void*)rttiDestroy__pureZosproc_u2061, .size = sizeof(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ), .align = (NI16) NIM_ALIGNOF(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ), .depth = 1, .display = TM__HZdw8BhppcTQo8DIK46LSg_2, .traceImpl = (void*)eqtrace___pureZosproc_u260, .flags = 0};
extern NCSTRING* environ;
extern NIM_BOOL nimInErrorMode__system_u4143;
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZosproc_u2043)(tyTuple__XOVT24GHXwqiEj5GCsEGCA* dest_p0, tyTuple__XOVT24GHXwqiEj5GCsEGCA src_p1) {
	if ((*dest_p0).Field0.p != src_p1.Field0.p) {	eqdestroy___system_u2691((*dest_p0).Field0);
	}
(*dest_p0).Field0.len = src_p1.Field0.len; (*dest_p0).Field0.p = src_p1.Field0.p;
	(*dest_p0).Field1 = src_p1.Field1;
}
static N_INLINE(void, nimSetMem__system_u2172)(void* a_p0, int v_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a_p0, v_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, nimZeroMem)(void* p_p0, NI size_p1) {
	nimSetMem__system_u2172(p_p0, ((int)0), size_p1);
}
static N_INLINE(NI, minuspercent___system_u805)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU32)(((NU) (x_p0))) - (NU32)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p_p0) {
	NIM_BOOL result;
	result = NIM_FALSE;
	{
		tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A* cell_1;
		NI T5_;
		if (!!((p_p0 == NIM_NIL))) goto LA3_;
		T5_ = (NI)0;
		T5_ = minuspercent___system_u805(((NI) (ptrdiff_t) (p_p0)), ((NI)8));
		cell_1 = ((tyObject_RefHeader__GDnGTjNyvwISJbkIvAst3A*) (T5_));
		{
			if (!((NI)((*cell_1).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
			result = NIM_TRUE;
		}
		goto LA6_;
LA8_: ;
		{
			(*cell_1).rc = minuspercent___system_u805((*cell_1).rc, ((NI)16));
		}
LA6_: ;
		rememberCycle__system_u3497(result, cell_1, (*((TNimTypeV2**) (p_p0))));
	}
LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u228)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(dest_p0);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(dest_p0);
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u248)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn((*dest_p0).errStream);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose((*dest_p0).errStream);
	}
LA4_: ;
	{
		NIM_BOOL T8_;
		T8_ = (NIM_BOOL)0;
		T8_ = nimDecRefIsLastCyclicDyn((*dest_p0).outStream);
		if (!T8_) goto LA9_;
		nimDestroyAndDispose((*dest_p0).outStream);
	}
LA9_: ;
	{
		NIM_BOOL T13_;
		T13_ = (NIM_BOOL)0;
		T13_ = nimDecRefIsLastCyclicDyn((*dest_p0).inStream);
		if (!T13_) goto LA14_;
		nimDestroyAndDispose((*dest_p0).inStream);
	}
LA14_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, rttiDestroy__pureZosproc_u2061)(void* dest_p0) {
	eqdestroy___pureZosproc_u248((&(*((tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ*) (dest_p0)))));
}
static N_INLINE(NI, pluspercent___system_u785)(NI x_p0, NI y_p1) {
	NI result;
	result = ((NI) ((NU)((NU32)(((NU) (x_p0))) + (NU32)(((NU) (y_p1))))));
	return result;
}
static N_INLINE(void, add__system_u3018)(tyObject_CellSeq__gW9aeWLFbrNaeUKXqxYBXhg* s_p0, void** c_p1, TNimTypeV2* t_p2) {
	void** colontmp_;
	TNimTypeV2* colontmp__2;
	{
		if (!((*s_p0).cap <= (*s_p0).len)) goto LA3_;
		resize__system_u3026(s_p0);
	}
LA3_: ;
	colontmp_ = c_p1;
	colontmp__2 = t_p2;
	(*s_p0).d[(*s_p0).len].Field0 = colontmp_;
	(*s_p0).d[(*s_p0).len].Field1 = colontmp__2;
	(*s_p0).len = pluspercent___system_u785((*s_p0).len, ((NI)1));
}
static N_INLINE(void, nimTraceRefDyn)(void* q_p0, void* env_p1) {
	void** p_1;
	p_1 = ((void**) (q_p0));
	{
		tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w* j_1;
		if (!!(((*p_1) == NIM_NIL))) goto LA3_;
		j_1 = ((tyObject_GcEnv__HccVszwojlCZRN46BE9cG8w*) (env_p1));
		add__system_u3018((&(*j_1).traceStack), p_1, (*((TNimTypeV2**) ((*p_1)))));
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZosproc_u260)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* dest_p0, void* env_p1) {
	nimTraceRefDyn(&(*dest_p0).inStream, env_p1);
	nimTraceRefDyn(&(*dest_p0).outStream, env_p1);
	nimTraceRefDyn(&(*dest_p0).errStream, env_p1);
}
static N_INLINE(NIM_BOOL, eqeq___system_u8576)(NCSTRING x_p0, NCSTRING y_p1) {
	NIM_BOOL result;
	{
		if (!(((void*) (x_p0)) == ((void*) (y_p1)))) goto LA3_;
		result = NIM_TRUE;
	}
	goto LA1_;
LA3_: ;
	{
		NIM_BOOL T6_;
		T6_ = (NIM_BOOL)0;
		T6_ = (((void*) (x_p0)) == NIM_NIL);
		if (T6_) goto LA7_;
		T6_ = (((void*) (y_p1)) == NIM_NIL);
LA7_: ;
		if (!T6_) goto LA8_;
		result = NIM_FALSE;
	}
	goto LA1_;
LA8_: ;
	{
		int T11_;
		T11_ = (int)0;
		T11_ = strcmp(x_p0, y_p1);
		result = (T11_ == ((NI32)0));
	}
LA1_: ;
	return result;
}
static N_INLINE(NI, find__pureZparseutils_u636)(NimStringV2 a_p0, NIM_CHAR item_p1) {
	NI result;
{	result = ((NI)0);
	{
		NIM_CHAR i_1;
		NI i_2;
		NI L_1;
		i_1 = (NIM_CHAR)0;
		i_2 = ((NI)0);
		L_1 = a_p0.len;
		{
			while (1) {
				if (!(i_2 < L_1)) goto LA3;
				i_1 = a_p0.p->data[i_2];
				{
					if (!((NU8)(i_1) == (NU8)(item_p1))) goto LA6_;
					goto BeforeRet_;
				}
LA6_: ;
				result += ((NI)1);
				i_2 += ((NI)1);
			} LA3: ;
		}
	}
	result = ((NI)-1);
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest_p0, void* source_p1, NI size_p2) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest_p0, source_p1, ((size_t) (size_p2)));
}
static N_INLINE(void, copyMem__system_u1742)(void* dest_p0, void* source_p1, NI size_p2) {
	nimCopyMem(dest_p0, source_p1, size_p2);
}
static N_INLINE(void, appendString)(NimStringV2* dest_p0, NimStringV2 src_p1) {
	{
		if (!(((NI)0) < src_p1.len)) goto LA3_;
		copyMem__system_u1742(((void*) ((&(*(*dest_p0).p).data[(*dest_p0).len]))), ((void*) ((&(*src_p1.p).data[((NI)0)]))), (src_p1.len));
		(*dest_p0).len += src_p1.len;
		(*(*dest_p0).p).data[(*dest_p0).len] = 0;
	}
LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(NCSTRING*, envToCStringArray__pureZosproc_u755)(void) {
	NCSTRING* result;
	NI counter_1;
	void* T7_;
	NI i_2;
	result = (NCSTRING*)0;
	counter_1 = ((NI)0);
	{
		NimStringV2 key_1;
		NimStringV2 val_1;
		key_1.len = 0; key_1.p = NIM_NIL;
		val_1.len = 0; val_1.p = NIM_NIL;
		{
			tyTuple__UV3llMMYFckfui8YMBuUZA ai_1;
			NI i_1;
			nimZeroMem((void*)(&ai_1), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
			i_1 = ((NI)0);
			{
				while (1) {
					NIM_BOOL T5_;
					NimStringV2 kv_1;
					NI p_1;
					tyTuple__UV3llMMYFckfui8YMBuUZA T6_;
					T5_ = (NIM_BOOL)0;
					T5_ = eqeq___system_u8576(environ[i_1], ((NCSTRING) NIM_NIL));
					if (!!(T5_)) goto LA4;
					kv_1.len = 0; kv_1.p = NIM_NIL;
					kv_1 = cstrToNimstr(environ[i_1]);
					i_1 += ((NI)1);
					p_1 = find__pureZparseutils_u636(kv_1, 61);
					T6_.Field0 = substr__system_u8632(kv_1, ((NI)0), (NI)(p_1 - ((NI)1)));
					T6_.Field1 = substr__system_u8645(kv_1, (NI)(p_1 + ((NI)1)));
					eqsink___stdZprivateZospaths2_u315((&ai_1), T6_);
					eqsink___system_u2700((&key_1), ai_1.Field0);
					eqwasMoved___system_u2688((&ai_1.Field0));
					eqsink___system_u2700((&val_1), ai_1.Field1);
					eqwasMoved___system_u2688((&ai_1.Field1));
					counter_1 += ((NI)1);
					eqdestroy___system_u2691(kv_1);
				} LA4: ;
			}
			eqdestroy___stdZprivateZospaths2_u306(ai_1);
		}
		eqdestroy___system_u2691(val_1);
		eqdestroy___system_u2691(key_1);
	}
	T7_ = (void*)0;
	T7_ = alloc0Impl__system_u1760(((NI)((NI)(counter_1 + ((NI)1)) * ((NI)4))));
	result = ((NCSTRING*) (T7_));
	i_2 = ((NI)0);
	{
		NimStringV2 key_2;
		NimStringV2 val_2;
		key_2.len = 0; key_2.p = NIM_NIL;
		val_2.len = 0; val_2.p = NIM_NIL;
		{
			tyTuple__UV3llMMYFckfui8YMBuUZA ai_2;
			NI i_3;
			nimZeroMem((void*)(&ai_2), sizeof(tyTuple__UV3llMMYFckfui8YMBuUZA));
			i_3 = ((NI)0);
			{
				while (1) {
					NIM_BOOL T12_;
					NimStringV2 kv_2;
					NimStringV2 x_1;
					NI p_2;
					tyTuple__UV3llMMYFckfui8YMBuUZA T13_;
					NimStringV2 T14_;
					void* T15_;
					T12_ = (NIM_BOOL)0;
					T12_ = eqeq___system_u8576(environ[i_3], ((NCSTRING) NIM_NIL));
					if (!!(T12_)) goto LA11;
					kv_2.len = 0; kv_2.p = NIM_NIL;
					x_1.len = 0; x_1.p = NIM_NIL;
					kv_2 = cstrToNimstr(environ[i_3]);
					i_3 += ((NI)1);
					p_2 = find__pureZparseutils_u636(kv_2, 61);
					T13_.Field0 = substr__system_u8632(kv_2, ((NI)0), (NI)(p_2 - ((NI)1)));
					T13_.Field1 = substr__system_u8645(kv_2, (NI)(p_2 + ((NI)1)));
					eqsink___stdZprivateZospaths2_u315((&ai_2), T13_);
					eqsink___system_u2700((&key_2), ai_2.Field0);
					eqwasMoved___system_u2688((&ai_2.Field0));
					eqsink___system_u2700((&val_2), ai_2.Field1);
					eqwasMoved___system_u2688((&ai_2.Field1));
					T14_.len = 0; T14_.p = NIM_NIL;
					T14_ = rawNewString(key_2.len + val_2.len + 1);
appendString((&T14_), key_2);
appendString((&T14_), TM__HZdw8BhppcTQo8DIK46LSg_11);
appendString((&T14_), val_2);
					x_1 = T14_;
					T15_ = (void*)0;
					T15_ = allocImpl__system_u1758(((NI)(x_1.len + ((NI)1))));
					result[i_2] = ((NCSTRING) (T15_));
					copyMem__system_u1742(((void*) (result[i_2])), ((void*) ((&x_1.p->data[((NI)0)]))), ((NI)(x_1.len + ((NI)1))));
					i_2 += ((NI)1);
					eqdestroy___system_u2691(x_1);
					eqdestroy___system_u2691(kv_2);
				} LA11: ;
			}
			eqdestroy___stdZprivateZospaths2_u306(ai_2);
		}
		eqdestroy___system_u2691(val_2);
		eqdestroy___system_u2691(key_2);
	}
	return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
	NIM_BOOL* result;
	result = (&nimInErrorMode__system_u4143);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NCSTRING*, envToCStringArray__pureZosproc_u743)(tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* t_p0) {
	NCSTRING* result;
	NI T1_;
	void* T2_;
	NI i_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NCSTRING*)0;
	T1_ = (NI)0;
	T1_ = nstlen(t_p0);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	T2_ = (void*)0;
	T2_ = alloc0Impl__system_u1760(((NI)((NI)(T1_ + ((NI)1)) * ((NI)4))));
	result = ((NCSTRING*) (T2_));
	i_1 = ((NI)0);
	{
		NimStringV2 key_1;
		NimStringV2 val_1;
		key_1.len = 0; key_1.p = NIM_NIL;
		val_1.len = 0; val_1.p = NIM_NIL;
		{
			NI h_1;
			NI colontmp_;
			NI T5_;
			NI res_1;
			h_1 = (NI)0;
			colontmp_ = (NI)0;
			T5_ = ((*t_p0).data.len-1);
			colontmp_ = T5_;
			res_1 = ((NI)0);
			{
				while (1) {
					if (!(res_1 <= colontmp_)) goto LA7;
					h_1 = ((NI) (res_1));
					{
						NimStringV2 x_1;
						NimStringV2 T12_;
						void* T13_;
						if (!(*t_p0).data.p->data[h_1].Field2) goto LA10_;
						x_1.len = 0; x_1.p = NIM_NIL;
						eqcopy___system_u2694((&key_1), (*t_p0).data.p->data[h_1].Field0);
						eqcopy___system_u2694((&val_1), (*t_p0).data.p->data[h_1].Field1);
						T12_.len = 0; T12_.p = NIM_NIL;
						T12_ = rawNewString(key_1.len + val_1.len + 1);
appendString((&T12_), key_1);
appendString((&T12_), TM__HZdw8BhppcTQo8DIK46LSg_12);
appendString((&T12_), val_1);
						x_1 = T12_;
						T13_ = (void*)0;
						T13_ = allocImpl__system_u1758(((NI)(x_1.len + ((NI)1))));
						result[i_1] = ((NCSTRING) (T13_));
						copyMem__system_u1742(((void*) (result[i_1])), ((void*) ((&x_1.p->data[((NI)0)]))), ((NI)(x_1.len + ((NI)1))));
						i_1 += ((NI)1);
						eqdestroy___system_u2691(x_1);
					}
LA10_: ;
					res_1 += ((NI)1);
				} LA7: ;
			}
		}
		eqdestroy___system_u2691(val_1);
		eqdestroy___system_u2691(key_1);
	}
	}BeforeRet_: ;
	return result;
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0) {
	NCSTRING result;
	{
		if (!(s_p0.len == ((NI)0))) goto LA3_;
		result = "";
	}
	goto LA1_;
LA3_: ;
	{
		result = ((NCSTRING) ((*s_p0.p).data));
	}
LA1_: ;
	return result;
}
static N_INLINE(NI, nimCStrLen)(NCSTRING a_p0) {
	NI result;
	size_t T5_;
{	{
		if (!(a_p0 == 0)) goto LA3_;
		result = ((NI)0);
		goto BeforeRet_;
	}
LA3_: ;
	T5_ = (size_t)0;
	T5_ = strlen(a_p0);
	result = ((NI) (T5_));
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, setCurrentDir__stdZprivateZosdirs_u501)(NimStringV2 newDir_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		int T3_;
		NI32 T6_;
		T3_ = (int)0;
		T3_ = chdir(nimToCStringConv(newDir_p0));
		if (!!((T3_ == ((NI32)0)))) goto LA4_;
		T6_ = (NI32)0;
		T6_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T6_, newDir_p0);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA4_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(pid_t, startProcessAuxSpawn__pureZosproc_u785)(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA* data_p0) {
	pid_t result;
	posix_spawnattr_t attr_1;
	posix_spawn_file_actions_t fops_1;
	sigset_t mask_1;
	NI32 flags_1;
	int res_1;
	pid_t pid_1;
	int T108_;
	int T109_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (pid_t)0;
	nimZeroMem((void*)(&attr_1), sizeof(posix_spawnattr_t));
	nimZeroMem((void*)(&fops_1), sizeof(posix_spawn_file_actions_t));
	{
		int T3_;
		NI32 T6_;
		T3_ = (int)0;
		T3_ = posix_spawn_file_actions_init((&fops_1));
		if (!!((T3_ == ((NI32)0)))) goto LA4_;
		T6_ = (NI32)0;
		T6_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T6_, TM__HZdw8BhppcTQo8DIK46LSg_13);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA4_: ;
	{
		int T9_;
		NI32 T12_;
		T9_ = (int)0;
		T9_ = posix_spawnattr_init((&attr_1));
		if (!!((T9_ == ((NI32)0)))) goto LA10_;
		T12_ = (NI32)0;
		T12_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T12_, TM__HZdw8BhppcTQo8DIK46LSg_14);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA10_: ;
	nimZeroMem((void*)(&mask_1), sizeof(sigset_t));
	{
		int T15_;
		NI32 T18_;
		T15_ = (int)0;
		T15_ = sigemptyset((&mask_1));
		if (!!((T15_ == ((NI32)0)))) goto LA16_;
		T18_ = (NI32)0;
		T18_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T18_, TM__HZdw8BhppcTQo8DIK46LSg_15);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA16_: ;
	{
		int T21_;
		NI32 T24_;
		T21_ = (int)0;
		T21_ = posix_spawnattr_setsigmask((&attr_1), (&mask_1));
		if (!!((T21_ == ((NI32)0)))) goto LA22_;
		T24_ = (NI32)0;
		T24_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T24_, TM__HZdw8BhppcTQo8DIK46LSg_16);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA22_: ;
	{
		if (!(((*data_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)6)))&7U)))!=0)) goto LA27_;
		{
			int T31_;
			NI32 T34_;
			T31_ = (int)0;
			T31_ = posix_spawnattr_setpgroup((&attr_1), ((NI32)0));
			if (!!((T31_ == ((NI32)0)))) goto LA32_;
			T34_ = (NI32)0;
			T34_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T34_, TM__HZdw8BhppcTQo8DIK46LSg_17);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA32_: ;
	}
LA27_: ;
	flags_1 = (NI32)(((int)64) | POSIX_SPAWN_SETSIGMASK);
	{
		if (!(((*data_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)6)))&7U)))!=0)) goto LA37_;
		flags_1 = (NI32)(flags_1 | POSIX_SPAWN_SETPGROUP);
	}
LA37_: ;
	{
		int T41_;
		NI32 T44_;
		T41_ = (int)0;
		T41_ = posix_spawnattr_setflags((&attr_1), flags_1);
		if (!!((T41_ == ((NI32)0)))) goto LA42_;
		T44_ = (NI32)0;
		T44_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T44_, TM__HZdw8BhppcTQo8DIK46LSg_18);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA42_: ;
	{
		if (!!((((*data_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)4)))&7U)))!=0))) goto LA47_;
		{
			int T51_;
			NI32 T54_;
			T51_ = (int)0;
			T51_ = posix_spawn_file_actions_addclose((&fops_1), (*data_p0).pStdin[(((NI)1))- 0]);
			if (!!((T51_ == ((NI32)0)))) goto LA52_;
			T54_ = (NI32)0;
			T54_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T54_, TM__HZdw8BhppcTQo8DIK46LSg_19);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA52_: ;
		{
			int T57_;
			NI32 T60_;
			T57_ = (int)0;
			T57_ = posix_spawn_file_actions_adddup2((&fops_1), (*data_p0).pStdin[(((NI)0))- 0], ((int)0));
			if (!!((T57_ == ((NI32)0)))) goto LA58_;
			T60_ = (NI32)0;
			T60_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T60_, TM__HZdw8BhppcTQo8DIK46LSg_20);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA58_: ;
		{
			int T63_;
			NI32 T66_;
			T63_ = (int)0;
			T63_ = posix_spawn_file_actions_addclose((&fops_1), (*data_p0).pStdout[(((NI)0))- 0]);
			if (!!((T63_ == ((NI32)0)))) goto LA64_;
			T66_ = (NI32)0;
			T66_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T66_, TM__HZdw8BhppcTQo8DIK46LSg_21);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA64_: ;
		{
			int T69_;
			NI32 T72_;
			T69_ = (int)0;
			T69_ = posix_spawn_file_actions_adddup2((&fops_1), (*data_p0).pStdout[(((NI)1))- 0], ((int)1));
			if (!!((T69_ == ((NI32)0)))) goto LA70_;
			T72_ = (NI32)0;
			T72_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T72_, TM__HZdw8BhppcTQo8DIK46LSg_22);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA70_: ;
		{
			int T75_;
			NI32 T78_;
			T75_ = (int)0;
			T75_ = posix_spawn_file_actions_addclose((&fops_1), (*data_p0).pStderr[(((NI)0))- 0]);
			if (!!((T75_ == ((NI32)0)))) goto LA76_;
			T78_ = (NI32)0;
			T78_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T78_, TM__HZdw8BhppcTQo8DIK46LSg_23);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA76_: ;
		{
			if (!(((*data_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)3)))&7U)))!=0)) goto LA81_;
			{
				int T85_;
				NI32 T88_;
				T85_ = (int)0;
				T85_ = posix_spawn_file_actions_adddup2((&fops_1), (*data_p0).pStdout[(((NI)1))- 0], ((int)2));
				if (!!((T85_ == ((NI32)0)))) goto LA86_;
				T88_ = (NI32)0;
				T88_ = osLastError__stdZoserrors_u122();
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				raiseOSError__stdZoserrors_u119(T88_, TM__HZdw8BhppcTQo8DIK46LSg_24);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			}
LA86_: ;
		}
		goto LA79_;
LA81_: ;
		{
			{
				int T92_;
				NI32 T95_;
				T92_ = (int)0;
				T92_ = posix_spawn_file_actions_adddup2((&fops_1), (*data_p0).pStderr[(((NI)1))- 0], ((int)2));
				if (!!((T92_ == ((NI32)0)))) goto LA93_;
				T95_ = (NI32)0;
				T95_ = osLastError__stdZoserrors_u122();
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				raiseOSError__stdZoserrors_u119(T95_, TM__HZdw8BhppcTQo8DIK46LSg_25);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			}
LA93_: ;
		}
LA79_: ;
	}
LA47_: ;
	res_1 = (int)0;
	{
		NimStringV2 colontmpD_;
		if (!(((NI)0) < nimCStrLen((*data_p0).workingDir))) goto LA98_;
		colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
		colontmpD_ = cstrToNimstr((*data_p0).workingDir);
		setCurrentDir__stdZprivateZosdirs_u501(colontmpD_);
		if (NIM_UNLIKELY(*nimErr_)) goto LA100_;
		{
			LA100_:;
		}
		{
			eqdestroy___system_u2691(colontmpD_);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA98_: ;
	pid_1 = (pid_t)0;
	{
		if (!(((*data_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)1)))&7U)))!=0)) goto LA105_;
		res_1 = posix_spawnp((&pid_1), nimToCStringConv((*data_p0).sysCommand), (&fops_1), (&attr_1), (*data_p0).sysArgs, (*data_p0).sysEnv);
	}
	goto LA103_;
LA105_: ;
	{
		res_1 = posix_spawn((&pid_1), nimToCStringConv((*data_p0).sysCommand), (&fops_1), (&attr_1), (*data_p0).sysArgs, (*data_p0).sysEnv);
	}
LA103_: ;
	T108_ = (int)0;
	T108_ = posix_spawn_file_actions_destroy((&fops_1));
	(void)(T108_);
	T109_ = (int)0;
	T109_ = posix_spawnattr_destroy((&attr_1));
	(void)(T109_);
	{
		if (!!((res_1 == ((NI32)0)))) goto LA112_;
		raiseOSError__stdZoserrors_u119(((NI32) (res_1)), (*data_p0).sysCommand);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA112_: ;
	result = pid_1;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u910)(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA* dest_p0) {
	eqdestroy___system_u2691((*dest_p0).sysCommand);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ*, nospstartProcess)(NimStringV2 command_p0, NimStringV2 workingDir_p1, NimStringV2* args_p2, NI args_p2Len_0, tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* env_p3, tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options_p4) {
	tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* result;
	tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA data_1;
	tySequence__sM4lkSb7zS6F7OVMvW9cffQ sysArgsRaw_1;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStdin_1;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStdout_1;
	tyArray__Zwjt9bECqO23Zah8rGoMkoQ pStderr_1;
	pid_t pid_1;
	NCSTRING* sysArgs_1;
	NCSTRING* colontmpD__4;
	NCSTRING* colontmpD__5;
	NCSTRING* sysEnv_1;
	NimStringV2 currentDir_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	nimZeroMem((void*)(&data_1), sizeof(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA));
	sysArgsRaw_1.len = 0; sysArgsRaw_1.p = NIM_NIL;
	nimZeroMem((void*)pStdin_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimZeroMem((void*)pStdin_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimZeroMem((void*)pStdout_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimZeroMem((void*)pStdout_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimZeroMem((void*)pStderr_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimZeroMem((void*)pStderr_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	eqdestroy___pureZosproc_u228(result);
	result = (tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ*) nimNewObj(sizeof(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ), NIM_ALIGNOF(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ));
	(*result).Sup.m_type = (&NTIv2__KkmVhVBIhdGPRUKkZJq9cLQ_);
	(*result).options = options_p4;
	(*result).exitFlag = NIM_TRUE;
	{
		if (!!(((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)4)))&7U)))!=0))) goto LA4_;
		{
			NIM_BOOL T8_;
			NIM_BOOL T9_;
			int T10_;
			int T12_;
			int T14_;
			NI32 T17_;
			T8_ = (NIM_BOOL)0;
			T9_ = (NIM_BOOL)0;
			T10_ = (int)0;
			T10_ = pipe(pStdin_1);
			T9_ = !((T10_ == ((NI32)0)));
			if (T9_) goto LA11_;
			T12_ = (int)0;
			T12_ = pipe(pStdout_1);
			T9_ = !((T12_ == ((NI32)0)));
LA11_: ;
			T8_ = T9_;
			if (T8_) goto LA13_;
			T14_ = (int)0;
			T14_ = pipe(pStderr_1);
			T8_ = !((T14_ == ((NI32)0)));
LA13_: ;
			if (!T8_) goto LA15_;
			T17_ = (NI32)0;
			T17_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
			raiseOSError__stdZoserrors_u119(T17_, TM__HZdw8BhppcTQo8DIK46LSg_4);
			if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
		}
LA15_: ;
	}
LA4_: ;
	nimZeroMem((void*)(&data_1), sizeof(tyObject_StartProcessData__0UVyYpspHwxcA3iZ1BWZeA));
	{
		NimStringV2 colontmpD_;
		if (!((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)2)))&7U)))!=0)) goto LA20_;
		eqsink___system_u2700((&data_1.sysCommand), TM__HZdw8BhppcTQo8DIK46LSg_6);
		sysArgsRaw_1.len = 3; sysArgsRaw_1.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(3, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
		sysArgsRaw_1.p->data[0] = TM__HZdw8BhppcTQo8DIK46LSg_7;
		sysArgsRaw_1.p->data[1] = TM__HZdw8BhppcTQo8DIK46LSg_9;
		colontmpD_ = eqdup___system_u2697(command_p0);
		sysArgsRaw_1.p->data[2] = colontmpD_;
	}
	goto LA18_;
LA20_: ;
	{
		NimStringV2 colontmpD__2;
		eqcopy___system_u2694((&data_1.sysCommand), command_p0);
		sysArgsRaw_1.len = 1; sysArgsRaw_1.p = (tySequence__sM4lkSb7zS6F7OVMvW9cffQ_Content*) newSeqPayload(1, sizeof(NimStringV2), NIM_ALIGNOF(NimStringV2));
		colontmpD__2 = eqdup___system_u2697(command_p0);
		sysArgsRaw_1.p->data[0] = colontmpD__2;
		{
			NimStringV2* arg_1;
			NI i_1;
			arg_1 = (NimStringV2*)0;
			i_1 = ((NI)0);
			{
				while (1) {
					NimStringV2 colontmpD__3;
					if (!(i_1 < args_p2Len_0)) goto LA25;
					arg_1 = (&args_p2[i_1]);
					colontmpD__3 = eqdup___system_u2697((*arg_1));
					add__stdZenumutils_u71((&sysArgsRaw_1), colontmpD__3);
					i_1 += ((NI)1);
				} LA25: ;
			}
		}
	}
LA18_: ;
	pid_1 = (pid_t)0;
	sysArgs_1 = allocCStringArray__system_u5597(((sysArgsRaw_1).p) ? (sysArgsRaw_1.p->data) : NIM_NIL, sysArgsRaw_1.len);
	colontmpD__4 = (NCSTRING*)0;
	colontmpD__5 = (NCSTRING*)0;
	{
		if (!(env_p3 == ((tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg*) NIM_NIL))) goto LA29_;
		colontmpD__4 = envToCStringArray__pureZosproc_u755();
		if (NIM_UNLIKELY(*nimErr_)) goto LA26_;
		sysEnv_1 = colontmpD__4;
	}
	goto LA27_;
LA29_: ;
	{
		colontmpD__5 = envToCStringArray__pureZosproc_u743(env_p3);
		if (NIM_UNLIKELY(*nimErr_)) goto LA26_;
		sysEnv_1 = colontmpD__5;
	}
LA27_: ;
	currentDir_1.len = 0; currentDir_1.p = NIM_NIL;
	data_1.sysArgs = sysArgs_1;
	data_1.sysEnv = sysEnv_1;
	nimCopyMem((void*)data_1.pStdin, (NIM_CONST void*)pStdin_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimCopyMem((void*)data_1.pStdout, (NIM_CONST void*)pStdout_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	nimCopyMem((void*)data_1.pStderr, (NIM_CONST void*)pStderr_1, sizeof(tyArray__Zwjt9bECqO23Zah8rGoMkoQ));
	data_1.workingDir = nimToCStringConv(workingDir_p1);
	data_1.options = options_p4;
	currentDir_1 = nosgetCurrentDir();
	if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
	pid_1 = startProcessAuxSpawn__pureZosproc_u785((&data_1));
	if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
	{
		if (!(((NI)0) < workingDir_p1.len)) goto LA36_;
		setCurrentDir__stdZprivateZosdirs_u501(currentDir_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
	}
LA36_: ;
	{
		NimStringV2 colontmpD__6;
		tyArray__dyW7vpmfeTYw8kX3EXuaJA T43_;
		if (!((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)0)))&7U)))!=0)) goto LA40_;
		colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
		T43_[0] = command_p0;
		T43_[1] = TM__HZdw8BhppcTQo8DIK46LSg_27;
		colontmpD__6 = nsuJoinSep(args_p2, args_p2Len_0, TM__HZdw8BhppcTQo8DIK46LSg_28);
		if (NIM_UNLIKELY(*nimErr_)) goto LA42_;
		T43_[2] = colontmpD__6;
		echoBinSafe(T43_, 3);
		{
			LA42_:;
		}
		{
			eqdestroy___system_u2691(colontmpD__6);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA33_;
	}
LA40_: ;
	(*result).id = pid_1;
	(*result).exitFlag = NIM_FALSE;
	{
		if (!((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)4)))&7U)))!=0)) goto LA48_;
		(*result).inHandle = ((int)0);
		(*result).outHandle = ((int)1);
		{
			if (!((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)3)))&7U)))!=0)) goto LA52_;
			(*result).errHandle = (*result).outHandle;
		}
		goto LA50_;
LA52_: ;
		{
			(*result).errHandle = ((int)2);
		}
LA50_: ;
	}
	goto LA46_;
LA48_: ;
	{
		int T62_;
		int T63_;
		int T64_;
		(*result).inHandle = pStdin_1[(((NI)1))- 0];
		(*result).outHandle = pStdout_1[(((NI)0))- 0];
		{
			int T60_;
			if (!((options_p4 &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)3)))&7U)))!=0)) goto LA58_;
			(*result).errHandle = (*result).outHandle;
			T60_ = (int)0;
			T60_ = close(pStderr_1[(((NI)0))- 0]);
			(void)(T60_);
		}
		goto LA56_;
LA58_: ;
		{
			(*result).errHandle = pStderr_1[(((NI)0))- 0];
		}
LA56_: ;
		T62_ = (int)0;
		T62_ = close(pStderr_1[(((NI)1))- 0]);
		(void)(T62_);
		T63_ = (int)0;
		T63_ = close(pStdin_1[(((NI)0))- 0]);
		(void)(T63_);
		T64_ = (int)0;
		T64_ = close(pStdout_1[(((NI)1))- 0]);
		(void)(T64_);
	}
LA46_: ;
	{
		LA33_:;
	}
	{
		eqdestroy___system_u2691(currentDir_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto LA32_;
	{
		LA32_:;
	}
	{
		deallocCStringArray__system_u5651(sysEnv_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto LA26_;
	{
		LA26_:;
	}
	{
		deallocCStringArray__system_u5651(sysArgs_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		eqdestroy___system_u5506(sysArgsRaw_1);
		eqdestroy___pureZosproc_u910((&data_1));
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA*, createStream__pureZosproc_u1165)(int* handle_p0, tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg fileMode_p1) {
	tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA* result;
	FILE* f_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	f_1 = 0;
	{
		NIM_BOOL T3_;
		NI32 T6_;
		T3_ = (NIM_BOOL)0;
		T3_ = open__stdZsyncio_u475(&f_1, (*handle_p0), fileMode_p1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		if (!!(T3_)) goto LA4_;
		T6_ = (NI32)0;
		T6_ = osLastError__stdZoserrors_u122();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		raiseOSError__stdZoserrors_u119(T6_, TM__HZdw8BhppcTQo8DIK46LSg_29);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
LA4_: ;
	result = newFileStream__pureZstreams_u1072(f_1);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*, nospinputStream)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0) {
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	{
		tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w** T5_;
		tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA* T6_;
		if (!((*p_p0).inStream == ((tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*) NIM_NIL))) goto LA3_;
		T5_ = (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w**)0;
		T5_ = &(*p_p0).inStream;
		T6_ = NIM_NIL;
		T6_ = createStream__pureZosproc_u1165((&(*p_p0).inHandle), ((tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg)1));
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZstreams_u980(T6_); goto BeforeRet_;}
		eqsink___pureZstreams_u684(T5_, &T6_->Sup);
	}
LA3_: ;
	eqcopy___pureZstreams_u676(&result, (*p_p0).inStream, NIM_FALSE);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*, nospoutputStream)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0) {
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = NIM_NIL;
	{
		tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w** T5_;
		tyObject_FileStreamObj__5UvDPztSlRBlwzg9bp1LtoA* T6_;
		if (!((*p_p0).outStream == ((tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*) NIM_NIL))) goto LA3_;
		T5_ = (tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w**)0;
		T5_ = &(*p_p0).outStream;
		T6_ = NIM_NIL;
		T6_ = createStream__pureZosproc_u1165((&(*p_p0).outHandle), ((tyEnum_FileMode__YkEVJbjDa9aPvYTBr8yiUWg)0));
		if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZstreams_u980(T6_); goto BeforeRet_;}
		eqsink___pureZstreams_u684(T5_, &T6_->Sup);
	}
LA3_: ;
	eqcopy___pureZstreams_u676(&result, (*p_p0).outStream, NIM_FALSE);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nospwaitForExit)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0, NI timeout_p1) {
	NI result;
	int T47_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	{
		int T5_;
		if (!(*p_p0).exitFlag) goto LA3_;
		T5_ = (int)0;
		T5_ = exitStatusLikeShell__pureZos_u163((*p_p0).exitStatus);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = ((NI) (T5_));
		goto BeforeRet_;
	}
LA3_: ;
	{
		int status_1;
		if (!(timeout_p1 < ((NI)0))) goto LA8_;
		status_1 = ((int)0);
		{
			pid_t T12_;
			NI32 T15_;
			T12_ = (pid_t)0;
			T12_ = waitpid((*p_p0).id, (&status_1), ((int)0));
			if (!(T12_ < ((NI32)0))) goto LA13_;
			T15_ = (NI32)0;
			T15_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T15_, TM__HZdw8BhppcTQo8DIK46LSg_30);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA13_: ;
		(*p_p0).exitFlag = NIM_TRUE;
		(*p_p0).exitStatus = status_1;
	}
	goto LA6_;
LA8_: ;
	{
		tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg wait_1;
		tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg deadline_1;
		tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg T17_;
		tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg delay_1;
		wait_1 = initDuration__pureZtimes_u487(IL64(0), IL64(0), ((NI64) (timeout_p1)), IL64(0), IL64(0), IL64(0), IL64(0), IL64(0));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T17_ = getMonoTime__stdZmonotimes_u5();
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		deadline_1 = plus___stdZmonotimes_u41(T17_, wait_1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		delay_1 = initDuration__pureZtimes_u487(IL64(0), IL64(50), IL64(0), IL64(0), IL64(0), IL64(0), IL64(0), IL64(0));
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		{
			while (1) {
				int status_2;
				pid_t pid_1;
				status_2 = ((int)0);
				pid_1 = waitpid((*p_p0).id, (&status_2), WNOHANG);
				{
					if (!((*p_p0).id == pid_1)) goto LA22_;
					(*p_p0).exitFlag = NIM_TRUE;
					(*p_p0).exitStatus = status_2;
					goto LA18;
				}
				goto LA20_;
LA22_: ;
				{
					NI32 T27_;
					if (!(((NI) (pid_1)) == ((NI)-1))) goto LA25_;
					T27_ = (NI32)0;
					T27_ = osLastError__stdZoserrors_u122();
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
					raiseOSError__stdZoserrors_u119(T27_, TM__HZdw8BhppcTQo8DIK46LSg_31);
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				}
				goto LA20_;
LA25_: ;
				{
					{
						tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg T31_;
						NIM_BOOL T32_;
						T31_ = getMonoTime__stdZmonotimes_u5();
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						T32_ = (NIM_BOOL)0;
						T32_ = lteq___stdZmonotimes_u53(deadline_1, T31_);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						if (!T32_) goto LA33_;
						{
							int T37_;
							NI32 T40_;
							T37_ = (int)0;
							T37_ = kill((*p_p0).id, SIGKILL);
							if (!(T37_ < ((NI32)0))) goto LA38_;
							T40_ = (NI32)0;
							T40_ = osLastError__stdZoserrors_u122();
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
							raiseOSError__stdZoserrors_u119(T40_, TM__HZdw8BhppcTQo8DIK46LSg_32);
							if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						}
LA38_: ;
					}
					goto LA29_;
LA33_: ;
					{
						tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg newWait_1;
						tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg T42_;
						NI64 ticks_1;
						NI64 ns_1;
						NI64 secs_1;
						struct timespec waitSpec_1;
						struct timespec unused_1;
						int T43_;
						tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg remaining_1;
						tyObject_MonoTime__gfTIziSaHbUnXL4ibQmWGg T44_;
						tyArray__wiSdUURaglXGOCT5SEwZlw T45_;
						tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg T46_;
						T42_ = getMonoTime__stdZmonotimes_u5();
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						newWait_1 = plus___stdZmonotimes_u41(T42_, delay_1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						ticks_1 = ticks__stdZmonotimes_u31(newWait_1);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						ns_1 = (NI64)(ticks_1 % IL64(1000000000));
						secs_1 = (NI64)(ticks_1 / IL64(1000000000));
						nimZeroMem((void*)(&waitSpec_1), sizeof(struct timespec));
						nimZeroMem((void*)(&unused_1), sizeof(struct timespec));
						waitSpec_1.tv_sec = ((long) (secs_1));
						waitSpec_1.tv_nsec = ((long) (ns_1));
						T43_ = (int)0;
						T43_ = clock_nanosleep(((clockid_t) (CLOCK_MONOTONIC)), TIMER_ABSTIME, (&waitSpec_1), (&unused_1));
						(void)(T43_);
						T44_ = getMonoTime__stdZmonotimes_u5();
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						remaining_1 = minus___stdZmonotimes_u37(deadline_1, T44_);
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						nimZeroMem((void*)(&T46_), sizeof(tyObject_Duration__jAw0SyQ4ug9awOiI2XrxEhg));
						T46_ = ntMulDuration(delay_1, IL64(2));
						if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
						T45_[0] = T46_;
						T45_[1] = remaining_1;
						T45_[2] = maxWait__pureZosproc_u1089;
						delay_1 = min__pureZosproc_u1111(T45_, 3);
					}
LA29_: ;
				}
LA20_: ;
			}
		} LA18: ;
	}
LA6_: ;
	T47_ = (int)0;
	T47_ = exitStatusLikeShell__pureZos_u163((*p_p0).exitStatus);
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	result = ((NI) (T47_));
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, nospclose)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0) {
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		if (!!((((*p_p0).options &((NU8)1<<((NU)((((tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw)4)))&7U)))!=0))) goto LA3_;
		{
			if (!!(((*p_p0).inStream == ((tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*) NIM_NIL)))) goto LA7_;
			close__pureZstreams_u58((*p_p0).inStream);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		goto LA5_;
LA7_: ;
		{
			int T10_;
			T10_ = (int)0;
			T10_ = close((*p_p0).inHandle);
			(void)(T10_);
		}
LA5_: ;
		{
			if (!!(((*p_p0).outStream == ((tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*) NIM_NIL)))) goto LA13_;
			close__pureZstreams_u58((*p_p0).outStream);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		goto LA11_;
LA13_: ;
		{
			int T16_;
			T16_ = (int)0;
			T16_ = close((*p_p0).outHandle);
			(void)(T16_);
		}
LA11_: ;
		{
			if (!!(((*p_p0).errStream == ((tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w*) NIM_NIL)))) goto LA19_;
			close__pureZstreams_u58((*p_p0).errStream);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
		goto LA17_;
LA19_: ;
		{
			int T22_;
			T22_ = (int)0;
			T22_ = close((*p_p0).errHandle);
			(void)(T22_);
		}
LA17_: ;
	}
LA3_: ;
	}BeforeRet_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u2034)(tyTuple__XOVT24GHXwqiEj5GCsEGCA dest_p0) {
	eqdestroy___system_u2691(dest_p0.Field0);
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isExitStatus__pureZosproc_u740)(int status_p0) {
	NIM_BOOL result;
	NIM_BOOL T1_;
	T1_ = (NIM_BOOL)0;
	T1_ = WIFEXITED(status_p0);
	if (T1_) goto LA2_;
	T1_ = WIFSIGNALED(status_p0);
LA2_: ;
	result = T1_;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nosppeekExitCode)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0) {
	NI result;
	int status_1;
	pid_t ret_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	status_1 = ((int)0);
	result = ((NI)-1);
	{
		int T5_;
		if (!(*p_p0).exitFlag) goto LA3_;
		T5_ = (int)0;
		T5_ = exitStatusLikeShell__pureZos_u163((*p_p0).exitStatus);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		result = ((NI) (T5_));
		goto BeforeRet_;
	}
LA3_: ;
	ret_1 = waitpid((*p_p0).id, (&status_1), WNOHANG);
	{
		if (!(((NI32)0) < ret_1)) goto LA8_;
		{
			NIM_BOOL T12_;
			int T15_;
			T12_ = (NIM_BOOL)0;
			T12_ = isExitStatus__pureZosproc_u740(status_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			if (!T12_) goto LA13_;
			(*p_p0).exitFlag = NIM_TRUE;
			(*p_p0).exitStatus = status_1;
			T15_ = (int)0;
			T15_ = exitStatusLikeShell__pureZos_u163(status_1);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			result = ((NI) (T15_));
		}
LA13_: ;
	}
LA8_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyTuple__XOVT24GHXwqiEj5GCsEGCA, execCmdEx__pureZosproc_u1990)(NimStringV2 command_p0, tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options_p1, tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg* env_p2, NimStringV2 workingDir_p3, NimStringV2 input_p4) {
	tyTuple__XOVT24GHXwqiEj5GCsEGCA result;
	tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_1;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* outp_1;
	tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* colontmpD_;
	NimStringV2 colontmp_;
	NimStringV2 line_1;
	tyArray__TonP9cxJgj8gXu71dWIyNlA T2_;
	NI colontmp__2;
	NimStringV2 blitTmp_1;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	nimZeroMem((void*)(&result), sizeof(tyTuple__XOVT24GHXwqiEj5GCsEGCA));
	p_1 = NIM_NIL;
	outp_1 = NIM_NIL;
	colontmpD_ = NIM_NIL;
	colontmp_.len = 0; colontmp_.p = NIM_NIL;
	line_1.len = 0; line_1.p = NIM_NIL;
	p_1 = nospstartProcess(command_p0, workingDir_p3, T2_, 0, env_p2, (options_p1 | 4));
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	outp_1 = nospoutputStream(p_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		tyObject_StreamObj__nX3kZRlh8Dq3gQ2cC6DE8w* colontmpD__2;
		if (!(((NI)0) < input_p4.len)) goto LA5_;
		colontmpD__2 = NIM_NIL;
		colontmpD__2 = nospinputStream(p_1);
		if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		write__pureZstreams_u184(colontmpD__2, input_p4);
		if (NIM_UNLIKELY(*nimErr_)) goto LA7_;
		{
			LA7_:;
		}
		{
			eqdestroy___pureZstreams_u673(colontmpD__2);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	}
LA5_: ;
	colontmpD_ = nospinputStream(p_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	close__pureZstreams_u58(colontmpD_);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	colontmp_ = TM__HZdw8BhppcTQo8DIK46LSg_33;
	colontmp__2 = ((NI)-1);
	blitTmp_1 = colontmp_;
	eqwasMoved___system_u2688((&colontmp_));
	result.Field0 = blitTmp_1;
	result.Field1 = colontmp__2;
	line_1 = rawNewString(((NI)120));
	{
		while (1) {
			{
				NIM_BOOL T14_;
				T14_ = (NIM_BOOL)0;
				T14_ = readLine__pureZstreams_u555(outp_1, (&line_1));
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				if (!T14_) goto LA15_;
				prepareAdd((&result.Field0), line_1.len + 0);
appendString((&result.Field0), line_1);
				prepareAdd((&result.Field0), 1);
appendString((&result.Field0), TM__HZdw8BhppcTQo8DIK46LSg_35);
			}
			goto LA12_;
LA15_: ;
			{
				NI T18_;
				T18_ = (NI)0;
				T18_ = nosppeekExitCode(p_1);
				if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
				result.Field1 = T18_;
				{
					if (!!((result.Field1 == ((NI)-1)))) goto LA21_;
					goto LA10;
				}
LA21_: ;
			}
LA12_: ;
		}
	} LA10: ;
	nospclose(p_1);
	if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
	{
		LA1_:;
	}
	{
		eqdestroy___system_u2691(line_1);
		eqdestroy___system_u2691(colontmp_);
		eqdestroy___pureZstreams_u673(colontmpD_);
		eqdestroy___pureZstreams_u673(outp_1);
		eqdestroy___pureZosproc_u228(p_1);
	}
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZosproc_u2031)(tyTuple__XOVT24GHXwqiEj5GCsEGCA* dest_p0) {
	(*dest_p0).Field0.len = 0; (*dest_p0).Field0.p = NIM_NIL;
	(*dest_p0).Field1 = 0;
}
N_LIB_PRIVATE N_NIMCALL(NI, nospexecCmd)(NimStringV2 command_p0) {
	NI result;
	int colontmpD_;
	int colontmpD__2;
	int tmp_1;
	int T1_;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	colontmpD_ = (int)0;
	colontmpD__2 = (int)0;
	tmp_1 = system(nimToCStringConv(command_p0));
	T1_ = (int)0;
	{
		if (!(tmp_1 == ((NI32)-1))) goto LA4_;
		colontmpD_ = tmp_1;
		T1_ = colontmpD_;
	}
	goto LA2_;
LA4_: ;
	{
		colontmpD__2 = exitStatusLikeShell__pureZos_u163(tmp_1);
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		T1_ = colontmpD__2;
	}
LA2_: ;
	result = ((NI) (T1_));
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u619)(tyProc__SqRJqa5aOiKB4EuKlKh9asA dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(dest_p0.ClE_0);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(dest_p0.ClE_0);
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(NI, nospcountProcessors)(void) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = (NI)0;
	result = ncpicountProcessors();
	if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqwasMoved___pureZosproc_u225)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ** dest_p0) {
	(*dest_p0) = 0;
}
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZosproc_u239)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ** dest_p0, tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* src_p1) {
	tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* colontmp_;
	colontmp_ = (*dest_p0);
	(*dest_p0) = src_p1;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(colontmp_);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(colontmp_);
	}
LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosprunning)(tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_p0) {
	NIM_BOOL result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	{
		if (!(*p_p0).exitFlag) goto LA3_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	goto LA1_;
LA3_: ;
	{
		int status_1;
		pid_t ret_1;
		status_1 = ((int)1);
		ret_1 = waitpid((*p_p0).id, (&status_1), WNOHANG);
		{
			if (!(ret_1 == ((NI32) (((NI) ((*p_p0).id)))))) goto LA8_;
			{
				NIM_BOOL T12_;
				T12_ = (NIM_BOOL)0;
				T12_ = isExitStatus__pureZosproc_u740(status_1);
				if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				if (!T12_) goto LA13_;
				(*p_p0).exitFlag = NIM_TRUE;
				(*p_p0).exitStatus = status_1;
				result = NIM_FALSE;
				goto BeforeRet_;
			}
			goto LA10_;
LA13_: ;
			{
				result = NIM_TRUE;
				goto BeforeRet_;
			}
LA10_: ;
		}
		goto LA6_;
LA8_: ;
		{
			if (!(ret_1 == ((NI32)0))) goto LA17_;
			result = NIM_TRUE;
			goto BeforeRet_;
		}
		goto LA6_;
LA17_: ;
		{
			NI32 T20_;
			result = NIM_FALSE;
			T20_ = (NI32)0;
			T20_ = osLastError__stdZoserrors_u122();
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
			raiseOSError__stdZoserrors_u119(T20_, TM__HZdw8BhppcTQo8DIK46LSg_39);
			if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
		}
LA6_: ;
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, nospexecProcesses)(NimStringV2* cmds_p0, NI cmds_p0Len_0, tySet_tyEnum_ProcessOption__f8zQPCJAq3Y51oMx2CR9cxw options_p1, NI n_p2, tyProc__SqRJqa5aOiKB4EuKlKh9asA beforeRunEvent_p3, tyProc__T07WD5hEWgf9abRYNKhwosw afterRunEvent_p4) {
	NI result;
NIM_BOOL* nimErr_;
{nimErr_ = nimErrorFlag();
	result = ((NI)0);
	{
		tySequence__9aHwlozdspjDnjhtzDhmdVg q_1;
		tySequence__qwqHTkRvwhrRyENtudHQ7g idxs_1;
		NI i_1;
		NI m_1;
		NI ecount_1;
		if (!(((NI)1) < n_p2)) goto LA3_;
		q_1.len = 0; q_1.p = NIM_NIL;
		idxs_1.len = 0; idxs_1.p = NIM_NIL;
		i_1 = ((NI)0);
		q_1 = newSeq__pureZosproc_u145((n_p2));
		idxs_1 = newSeq__pureZosproc_u390((n_p2));
		m_1 = ((n_p2 <= cmds_p0Len_0) ? n_p2 : cmds_p0Len_0);
		{
			while (1) {
				tyArray__TonP9cxJgj8gXu71dWIyNlA T12_;
				tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* T13_;
				if (!(i_1 < m_1)) goto LA7;
				{
					if (!!((beforeRunEvent_p3.ClP_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClP_0 && beforeRunEvent_p3.ClE_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClE_0))) goto LA10_;
					beforeRunEvent_p3.ClE_0? beforeRunEvent_p3.ClP_0(i_1, beforeRunEvent_p3.ClE_0):((TM__HZdw8BhppcTQo8DIK46LSg_37)(beforeRunEvent_p3.ClP_0))(i_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
				}
LA10_: ;
				T13_ = NIM_NIL;
				T13_ = nospstartProcess(cmds_p0[i_1], TM__HZdw8BhppcTQo8DIK46LSg_38, T12_, 0, ((tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg*) NIM_NIL), (options_p1 | 4));
				if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZosproc_u228(T13_); goto LA5_;}
				eqsink___pureZosproc_u239(&q_1.p->data[i_1], T13_);
				idxs_1.p->data[i_1] = i_1;
				i_1 += ((NI)1);
			} LA7: ;
		}
		ecount_1 = cmds_p0Len_0;
		{
			while (1) {
				if (!(((NI)0) < ecount_1)) goto LA15;
				{
					NI rexit_1;
					int status_1;
					pid_t res_1;
					rexit_1 = ((NI)-1);
					status_1 = ((int)1);
					res_1 = waitpid(((pid_t)-1), (&status_1), ((int)0));
					{
						if (!(((NI32)0) < res_1)) goto LA19_;
						{
							NI r_1;
							NI colontmp_;
							NI res_2;
							r_1 = (NI)0;
							colontmp_ = (NI)0;
							colontmp_ = (NI)(m_1 - ((NI)1));
							res_2 = ((NI)0);
							{
								while (1) {
									if (!(res_2 <= colontmp_)) goto LA23;
									r_1 = ((NI) (res_2));
									{
										NIM_BOOL T26_;
										T26_ = (NIM_BOOL)0;
										T26_ = !((q_1.p->data[r_1] == 0));
										if (!(T26_)) goto LA27_;
										T26_ = ((*q_1.p->data[r_1]).id == res_1);
LA27_: ;
										if (!T26_) goto LA28_;
										{
											NIM_BOOL T32_;
											T32_ = (NIM_BOOL)0;
											T32_ = WIFEXITED(status_1);
											if (T32_) goto LA33_;
											T32_ = WIFSIGNALED(status_1);
LA33_: ;
											if (!T32_) goto LA34_;
											(*q_1.p->data[r_1]).exitFlag = NIM_TRUE;
											(*q_1.p->data[r_1]).exitStatus = status_1;
											rexit_1 = r_1;
											goto LA21;
										}
LA34_: ;
									}
LA28_: ;
									res_2 += ((NI)1);
								} LA23: ;
							}
						} LA21: ;
					}
					goto LA17_;
LA19_: ;
					{
						NI32 err_1;
						err_1 = osLastError__stdZoserrors_u122();
						if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
						{
							if (!(err_1 == ((NI32) (ECHILD)))) goto LA39_;
							{
								NI r_2;
								NI colontmp__2;
								NI res_3;
								r_2 = (NI)0;
								colontmp__2 = (NI)0;
								colontmp__2 = (NI)(m_1 - ((NI)1));
								res_3 = ((NI)0);
								{
									while (1) {
										if (!(res_3 <= colontmp__2)) goto LA43;
										r_2 = ((NI) (res_3));
										{
											NIM_BOOL T46_;
											NIM_BOOL T48_;
											T46_ = (NIM_BOOL)0;
											T46_ = !((q_1.p->data[r_2] == 0));
											if (!(T46_)) goto LA47_;
											T48_ = (NIM_BOOL)0;
											T48_ = nosprunning(q_1.p->data[r_2]);
											if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
											T46_ = !(T48_);
LA47_: ;
											if (!T46_) goto LA49_;
											(*q_1.p->data[r_2]).exitFlag = NIM_TRUE;
											(*q_1.p->data[r_2]).exitStatus = status_1;
											rexit_1 = r_2;
											goto LA41;
										}
LA49_: ;
										res_3 += ((NI)1);
									} LA43: ;
								}
							} LA41: ;
						}
						goto LA37_;
LA39_: ;
						{
							if (!(err_1 == ((NI32) (EINTR)))) goto LA52_;
							goto LA16;
						}
						goto LA37_;
LA52_: ;
						{
							raiseOSError__stdZoserrors_u119(err_1, TM__HZdw8BhppcTQo8DIK46LSg_40);
							if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
						}
LA37_: ;
					}
LA17_: ;
					{
						NI T59_;
						if (!(((NI)0) <= rexit_1)) goto LA57_;
						T59_ = (NI)0;
						T59_ = nosppeekExitCode(q_1.p->data[rexit_1]);
						if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
						result = ((result >= (T59_ > 0? (T59_) : -(T59_))) ? result : (T59_ > 0? (T59_) : -(T59_)));
						{
							if (!!((afterRunEvent_p4.ClP_0 == TM__HZdw8BhppcTQo8DIK46LSg_41.ClP_0 && afterRunEvent_p4.ClE_0 == TM__HZdw8BhppcTQo8DIK46LSg_41.ClE_0))) goto LA62_;
							afterRunEvent_p4.ClE_0? afterRunEvent_p4.ClP_0(idxs_1.p->data[rexit_1], q_1.p->data[rexit_1], afterRunEvent_p4.ClE_0):((TM__HZdw8BhppcTQo8DIK46LSg_42)(afterRunEvent_p4.ClP_0))(idxs_1.p->data[rexit_1], q_1.p->data[rexit_1]);
							if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
						}
LA62_: ;
						nospclose(q_1.p->data[rexit_1]);
						if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
						{
							tyArray__TonP9cxJgj8gXu71dWIyNlA T72_;
							tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* T73_;
							if (!(i_1 < cmds_p0Len_0)) goto LA66_;
							{
								if (!!((beforeRunEvent_p3.ClP_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClP_0 && beforeRunEvent_p3.ClE_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClE_0))) goto LA70_;
								beforeRunEvent_p3.ClE_0? beforeRunEvent_p3.ClP_0(i_1, beforeRunEvent_p3.ClE_0):((TM__HZdw8BhppcTQo8DIK46LSg_43)(beforeRunEvent_p3.ClP_0))(i_1);
								if (NIM_UNLIKELY(*nimErr_)) goto LA5_;
							}
LA70_: ;
							T73_ = NIM_NIL;
							T73_ = nospstartProcess(cmds_p0[i_1], TM__HZdw8BhppcTQo8DIK46LSg_44, T72_, 0, ((tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg*) NIM_NIL), (options_p1 | 4));
							if (NIM_UNLIKELY(*nimErr_)) {eqdestroy___pureZosproc_u228(T73_); goto LA5_;}
							eqsink___pureZosproc_u239(&q_1.p->data[rexit_1], T73_);
							idxs_1.p->data[rexit_1] = i_1;
							i_1 += ((NI)1);
						}
						goto LA64_;
LA66_: ;
						{
							eqsink___pureZosproc_u239(&q_1.p->data[rexit_1], ((tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ*) NIM_NIL));
						}
LA64_: ;
						ecount_1 -= ((NI)1);
					}
LA57_: ;
				} LA16: ;
			} LA15: ;
		}
		{
			LA5_:;
		}
		{
			eqdestroy___pureZosproc_u474(idxs_1);
			eqdestroy___pureZosproc_u319(q_1);
		}
		if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
	}
	goto LA1_;
LA3_: ;
	{
		{
			NI i_2;
			NI colontmp__3;
			NI res_4;
			i_2 = (NI)0;
			colontmp__3 = (NI)0;
			colontmp__3 = (cmds_p0Len_0-1);
			res_4 = ((NI)0);
			{
				while (1) {
					tyObject_ProcessObj__KkmVhVBIhdGPRUKkZJq9cLQ* p_1;
					tyArray__TonP9cxJgj8gXu71dWIyNlA T86_;
					NI T87_;
					if (!(res_4 <= colontmp__3)) goto LA80;
					p_1 = NIM_NIL;
					i_2 = ((NI) (res_4));
					{
						if (!!((beforeRunEvent_p3.ClP_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClP_0 && beforeRunEvent_p3.ClE_0 == TM__HZdw8BhppcTQo8DIK46LSg_36.ClE_0))) goto LA84_;
						beforeRunEvent_p3.ClE_0? beforeRunEvent_p3.ClP_0(i_2, beforeRunEvent_p3.ClE_0):((TM__HZdw8BhppcTQo8DIK46LSg_45)(beforeRunEvent_p3.ClP_0))(i_2);
						if (NIM_UNLIKELY(*nimErr_)) goto LA81_;
					}
LA84_: ;
					p_1 = nospstartProcess(cmds_p0[i_2], TM__HZdw8BhppcTQo8DIK46LSg_46, T86_, 0, ((tyObject_StringTableObj__eKsdjq89aDBcvVY68b206Qg*) NIM_NIL), (options_p1 | 4));
					if (NIM_UNLIKELY(*nimErr_)) goto LA81_;
					T87_ = (NI)0;
					T87_ = nospwaitForExit(p_1, ((NI)-1));
					if (NIM_UNLIKELY(*nimErr_)) goto LA81_;
					result = (((T87_ > 0? (T87_) : -(T87_)) >= result) ? (T87_ > 0? (T87_) : -(T87_)) : result);
					{
						if (!!((afterRunEvent_p4.ClP_0 == TM__HZdw8BhppcTQo8DIK46LSg_41.ClP_0 && afterRunEvent_p4.ClE_0 == TM__HZdw8BhppcTQo8DIK46LSg_41.ClE_0))) goto LA90_;
						afterRunEvent_p4.ClE_0? afterRunEvent_p4.ClP_0(i_2, p_1, afterRunEvent_p4.ClE_0):((TM__HZdw8BhppcTQo8DIK46LSg_47)(afterRunEvent_p4.ClP_0))(i_2, p_1);
						if (NIM_UNLIKELY(*nimErr_)) goto LA81_;
					}
LA90_: ;
					nospclose(p_1);
					if (NIM_UNLIKELY(*nimErr_)) goto LA81_;
					res_4 += ((NI)1);
					{
						LA81_:;
					}
					{
						eqdestroy___pureZosproc_u228(p_1);
					}
					if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
				} LA80: ;
			}
		}
	}
LA1_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZosproc_u651)(tyProc__T07WD5hEWgf9abRYNKhwosw dest_p0) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = nimDecRefIsLastCyclicDyn(dest_p0.ClE_0);
		if (!T3_) goto LA4_;
		nimDestroyAndDispose(dest_p0.ClE_0);
	}
LA4_: ;
}
