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

#include "nimbase.h"
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
typedef struct TY125402 TY125402;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Cell47704 Cell47704;
typedef struct Cellseq47720 Cellseq47720;
typedef struct Gcheap50018 Gcheap50018;
typedef struct Gcstack50016 Gcstack50016;
typedef struct Cellset47716 Cellset47716;
typedef struct Pagedesc47712 Pagedesc47712;
typedef struct Memregion29888 Memregion29888;
typedef struct Smallchunk29840 Smallchunk29840;
typedef struct Llchunk29882 Llchunk29882;
typedef struct Bigchunk29842 Bigchunk29842;
typedef struct Intset29814 Intset29814;
typedef struct Trunk29810 Trunk29810;
typedef struct Avlnode29886 Avlnode29886;
typedef struct Gcstat50014 Gcstat50014;
typedef struct Tlinkedlist135016 Tlinkedlist135016;
typedef struct Tlistentry135010 Tlistentry135010;
typedef struct Tinfoos166037 Tinfoos166037;
typedef struct Tinfocpu166462 Tinfocpu166462;
typedef struct Tinfocc193008 Tinfocc193008;
typedef struct TY118906 TY118906;
typedef struct Ropeobj168006 Ropeobj168006;
typedef struct Tstrentry135012 Tstrentry135012;
typedef struct TNimObject TNimObject;
typedef struct TY194724 TY194724;
typedef struct Processobj149404 Processobj149404;
typedef struct Streamobj144418 Streamobj144418;
typedef struct Basechunk29838 Basechunk29838;
typedef struct Freecell29830 Freecell29830;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Cell47704  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47720  {
NI len;
NI cap;
Cell47704** d;
};
struct  Cellset47716  {
NI counter;
NI max;
Pagedesc47712* head;
Pagedesc47712** data;
};
typedef Smallchunk29840* TY29903[512];
typedef Trunk29810* Trunkbuckets29812[256];
struct  Intset29814  {
Trunkbuckets29812 data;
};
struct  Memregion29888  {
NI minlargeobj;
NI maxlargeobj;
TY29903 freesmallchunks;
Llchunk29882* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29842* freechunkslist;
Intset29814 chunkstarts;
Avlnode29886* root;
Avlnode29886* deleted;
Avlnode29886* last;
Avlnode29886* freeavlnodes;
};
struct  Gcstat50014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap50018  {
Gcstack50016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47720 zct;
Cellseq47720 decstack;
Cellset47716 cycleroots;
Cellseq47720 tempstack;
NI recgclock;
Memregion29888 region;
Gcstat50014 stat;
};
struct  Tlinkedlist135016  {
Tlistentry135010* head;
Tlistentry135010* tail;
NI counter;
};
typedef NU8 Sha1digest191003[20];
struct Tinfoos166037 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
NimStringDesc* Field3;
NimStringDesc* Field4;
NimStringDesc* Field5;
NimStringDesc* Field6;
NimStringDesc* Field7;
NimStringDesc* Field8;
NimStringDesc* Field9;
NimStringDesc* Field10;
NimStringDesc* Field11;
NU8 Field12;
};
typedef Tinfoos166037 TY166069[24];
struct Tinfocpu166462 {
NimStringDesc* Field0;
NI Field1;
NU8 Field2;
NI Field3;
NI Field4;
};
typedef Tinfocpu166462 TY166490[18];
struct Tinfocc193008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
NimStringDesc* Field3;
NimStringDesc* Field4;
NimStringDesc* Field5;
NimStringDesc* Field6;
NimStringDesc* Field7;
NimStringDesc* Field8;
NimStringDesc* Field9;
NimStringDesc* Field10;
NimStringDesc* Field11;
NimStringDesc* Field12;
NimStringDesc* Field13;
NimStringDesc* Field14;
NimStringDesc* Field15;
NimStringDesc* Field16;
NimStringDesc* Field17;
NimStringDesc* Field18;
NimStringDesc* Field19;
NU8 Field20;
};
typedef Tinfocc193008 TY193427[13];
struct TY118906 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
typedef NimStringDesc* TY183169[2];
typedef NimStringDesc* TY199970[14];
typedef NimStringDesc* TY182752[1];
typedef Ropeobj168006* TY168507[1];
struct  TNimObject  {
TNimType* m_type;
};
struct  Tlistentry135010  {
  TNimObject Sup;
Tlistentry135010* prev;
Tlistentry135010* next;
};
struct  Tstrentry135012  {
  Tlistentry135010 Sup;
NimStringDesc* data;
};
struct  TY194724  {
NI HEX3Astate;
TY125402* prettycmds194576;
TY125402* cmds194559;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (NI idx, void* ClEnv);
void* ClEnv;
} TY194578;
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (NI idx, Processobj149404* p, void* ClEnv);
void* ClEnv;
} TY194584;
typedef NU8 TY201404[32];
typedef NimStringDesc* TY184781[4];
struct  Gcstack50016  {
Gcstack50016* prev;
Gcstack50016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY29819[8];
struct  Pagedesc47712  {
Pagedesc47712* next;
NI key;
TY29819 bits;
};
struct  Basechunk29838  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29840  {
  Basechunk29838 Sup;
Smallchunk29840* next;
Smallchunk29840* prev;
Freecell29830* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29882  {
NI size;
NI acc;
Llchunk29882* next;
};
struct  Bigchunk29842  {
  Basechunk29838 Sup;
Bigchunk29842* next;
Bigchunk29842* prev;
NI align;
NF data;
};
struct  Trunk29810  {
Trunk29810* next;
NI key;
TY29819 bits;
};
typedef Avlnode29886* TY29893[2];
struct  Avlnode29886  {
TY29893 link;
NI key;
NI upperbound;
NI level;
};
struct  Ropeobj168006  {
  TNimObject Sup;
Ropeobj168006* left;
Ropeobj168006* right;
NI length;
NimStringDesc* data;
};
struct  Processobj149404  {
  TNimObject Sup;
int inhandle;
int outhandle;
int errhandle;
Streamobj144418* instream;
Streamobj144418* outstream;
Streamobj144418* errstream;
pid_t id;
int exitcode;
NU8 options;
};
typedef N_NIMCALL_PTR(void, TY144419) (Streamobj144418* s);
typedef N_NIMCALL_PTR(NIM_BOOL, TY144423) (Streamobj144418* s);
typedef N_NIMCALL_PTR(void, TY144427) (Streamobj144418* s, NI pos);
typedef N_NIMCALL_PTR(NI, TY144432) (Streamobj144418* s);
typedef N_NIMCALL_PTR(NI, TY144436) (Streamobj144418* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(NI, TY144442) (Streamobj144418* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY144448) (Streamobj144418* s, void* buffer, NI buflen);
typedef N_NIMCALL_PTR(void, TY144454) (Streamobj144418* s);
struct  Streamobj144418  {
  TNimObject Sup;
TY144419 closeimpl;
TY144423 atendimpl;
TY144427 setpositionimpl;
TY144432 getpositionimpl;
TY144436 readdataimpl;
TY144442 peekdataimpl;
TY144448 writedataimpl;
TY144454 flushimpl;
};
struct  Freecell29830  {
Freecell29830* next;
NI zerofield;
};
struct TY125402 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Cell47704*, usrtocell_51640)(void* usr);
static N_INLINE(void, rtladdzct_53201)(Cell47704* c);
N_NOINLINE(void, addzct_51617)(Cellseq47720* s, Cell47704* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(NIM_BOOL, externalfilechanged_194385)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, togeneratedfile_160082)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_160074)(NimStringDesc* path);
N_NIMCALL(void, footprint_194381)(NimStringDesc* filename, Sha1digest191003* Result);
N_NIMCALL(void, securehash_191011)(NimStringDesc* str, Sha1digest191003* Result);
N_NIMCALL(NimStringDesc*, HEX24_191020)(Sha1digest191003 self);
N_NIMCALL(void, securehashfile_191016)(NimStringDesc* filename, Sha1digest191003* Result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, getcompilecfilecmd_194284)(NimStringDesc* cfilename, NIM_BOOL isexternal);
N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, getconfigvar_159282)(NimStringDesc* key);
N_NIMCALL(NU8, nametocc_193518)(NimStringDesc* name);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void, rawmessage_184612)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, cfilespecificoptions_193945)(NimStringDesc* cfilename);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY118906* Result);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NIM_BOOL, existsconfigvar_159278)(NimStringDesc* key);
N_NIMCALL(void, addopt_193821)(NimStringDesc** dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, getdebug_193896)(NU8 c);
N_NIMCALL(NimStringDesc*, getconfigvar_193622)(NU8 c, NimStringDesc* suffix);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, getoptspeed_193892)(NU8 c);
N_NIMCALL(NimStringDesc*, getoptsize_193900)(NU8 c);
N_NIMCALL(NimStringDesc*, getcompilerexe_194258)(NU8 compiler);
static N_INLINE(NIM_BOOL, needsexeext_194227)(void);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
static N_INLINE(NIM_BOOL, noabsolutepaths_193904)(void);
N_NIMCALL(NimStringDesc*, nospquoteShell)(NimStringDesc* s);
N_NIMCALL(void, add_193939)(NimStringDesc** s, NimStringDesc** many, NI manyLen0);
N_NIMCALL(NimStringDesc*, nsuJoin)(NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, nosjoinPath)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NimStringDesc*, nosextractFilename)(NimStringDesc* path);
N_NIMCALL(NimStringDesc*, toobjfile_193859)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, completecfilepath_193854)(NimStringDesc* cfile, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_160201)(NimStringDesc* f, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getprefixdir_159295)(void);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(NIM_BOOL, open_15603)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(void, parsesecurehash_191058)(NimStringDesc* hash, Sha1digest191003* Result);
N_NIMCALL(NimStringDesc*, readline_15710)(FILE* f);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_191087)(Sha1digest191003 a, Sha1digest191003 b);
static N_INLINE(void, writeline_160405)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_15689)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, appendstr_135244)(Tlinkedlist135016* list, NimStringDesc* data);
N_NIMCALL(void, prependstr_135413)(Tlinkedlist135016* list, NimStringDesc* data);
N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, undefsymbol_189007)(NimStringDesc* symbol);
N_NIMCALL(void, definesymbol_189004)(NimStringDesc* symbol);
N_NIMCALL(void, addcompileoption_193830)(NimStringDesc* option);
N_NIMCALL(Ropeobj168006*, rope_168277)(NimStringDesc* s);
N_NIMCALL(void, add_168482)(Ropeobj168006** a, Ropeobj168006* b);
N_NIMCALL(Ropeobj168006*, genmappingfiles_194748)(Tlinkedlist135016* list);
N_NIMCALL(void, addf_169205)(Ropeobj168006** c, NimStringDesc* frmt, Ropeobj168006** args, NI argsLen0);
N_NIMCALL(void, add_168487)(Ropeobj168006** a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, getcompileoptions_193991)(void);
N_NIMCALL(NimStringDesc*, getlinkoptions_193994)(void);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, writerope_168836)(Ropeobj168006* head, NimStringDesc* filename, NIM_BOOL usewarning);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP4603)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_CLOSURE(void, HEX3Aanonymous_194577)(NI idx, void* ClEnv);
N_CLOSURE(void, HEX3Aanonymous_194583)(NI idx, Processobj149404* p, void* ClEnv);
N_NIMCALL(NI, peekexitcode_149677)(Processobj149404* p);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, TY201404 chars);
N_NIMCALL(NimStringDesc*, readall_144517)(Streamobj144418* s);
N_NIMCALL(Streamobj144418*, nospoutputStream)(Processobj149404* p);
N_NIMCALL(void, compilecfile_194433)(Tlinkedlist135016* list, Ropeobj168006** script, TY125402** cmds, TY125402** prettycmds, NIM_BOOL isexternal);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NI, nospcountProcessors)(void);
N_NIMCALL(NI, execwithecho_193876)(NimStringDesc* cmd, NU16 msg);
N_NIMCALL(NI, nospexecCmd)(NimStringDesc* command);
N_NIMCALL(NI, nospexecProcesses)(NimStringDesc** cmds, NI cmdsLen0, NU8 options_149709, NI n, TY194578 beforerunevent, TY194584 afterrunevent);
static N_INLINE(NimStringDesc*, libnametmpl_193494)(void);
N_NIMCALL(NimStringDesc*, getlinkerexe_194271)(NU8 compiler);
N_NIMCALL(NimStringDesc*, expandtilde_130801)(NimStringDesc* path);
N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringDesc* path);
N_NIMCALL(void, execexternalprogram_193881)(NimStringDesc* cmd, NU16 msg);
N_NIMCALL(void, generatescript_193885)(NimStringDesc* projectfile, Ropeobj168006* script);
N_NIMCALL(NimStringDesc*, HEX2F_118665)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(void, initlinkedlist_135028)(Tlinkedlist135016* list);
STRING_LITERAL(TMP522, "", 0);
STRING_LITERAL(TMP1796, "sha1", 4);
extern NIM_CONST TY166069 Os_166055;
extern NIM_CONST TY166490 Cpu_166476;
STRING_LITERAL(TMP1798, "gcc", 3);
STRING_LITERAL(TMP1799, "o", 1);
STRING_LITERAL(TMP1800, " -O3 -ffast-math ", 17);
STRING_LITERAL(TMP1801, " -Os -ffast-math ", 17);
STRING_LITERAL(TMP1802, "g++", 3);
STRING_LITERAL(TMP1803, "-c $options $include -o $objfile $file", 38);
STRING_LITERAL(TMP1804, " -mwindows", 10);
STRING_LITERAL(TMP1805, " -shared", 8);
STRING_LITERAL(TMP1806, "ar rcs $libfile $objfiles", 25);
STRING_LITERAL(TMP1807, "$buildgui $builddll -o $exefile $objfiles $options", 50);
STRING_LITERAL(TMP1808, " -I", 3);
STRING_LITERAL(TMP1809, " -L", 3);
STRING_LITERAL(TMP1810, " -l$1", 5);
STRING_LITERAL(TMP1811, "-fPIC", 5);
STRING_LITERAL(TMP1812, "asm($1);$n", 10);
STRING_LITERAL(TMP1813, "$1 $3 $2 ", 9);
STRING_LITERAL(TMP1814, "__attribute__((__packed__))", 27);
STRING_LITERAL(TMP1815, "llvm_gcc", 8);
STRING_LITERAL(TMP1816, "llvm-gcc", 8);
STRING_LITERAL(TMP1817, "llvm-g++", 8);
STRING_LITERAL(TMP1818, "llvm-ar rcs $libfile $objfiles", 30);
STRING_LITERAL(TMP1819, "clang", 5);
STRING_LITERAL(TMP1820, "clang++", 7);
STRING_LITERAL(TMP1821, "lcc", 3);
STRING_LITERAL(TMP1822, "obj", 3);
STRING_LITERAL(TMP1823, " -O -p6 ", 8);
STRING_LITERAL(TMP1824, "$options $include -Fo$objfile $file", 35);
STRING_LITERAL(TMP1825, " -subsystem windows", 19);
STRING_LITERAL(TMP1826, " -dll", 5);
STRING_LITERAL(TMP1827, "lcclnk", 6);
STRING_LITERAL(TMP1828, "$options $buildgui $builddll -O $exefile $objfiles", 50);
STRING_LITERAL(TMP1829, " -g5 ", 5);
STRING_LITERAL(TMP1830, "_asm{$n$1$n}$n", 14);
STRING_LITERAL(TMP1831, "$1 $2", 5);
STRING_LITERAL(TMP1832, "bcc", 3);
STRING_LITERAL(TMP1833, " -O2 -6 ", 8);
STRING_LITERAL(TMP1834, " -O1 -6 ", 8);
STRING_LITERAL(TMP1835, "bcc32", 5);
STRING_LITERAL(TMP1836, "-c $options $include -o$objfile $file", 37);
STRING_LITERAL(TMP1837, " -tW", 4);
STRING_LITERAL(TMP1838, " -tWD", 5);
STRING_LITERAL(TMP1839, "$options $buildgui $builddll -e$exefile $objfiles", 49);
STRING_LITERAL(TMP1840, "__asm{$n$1$n}$n", 15);
STRING_LITERAL(TMP1841, "dmc", 3);
STRING_LITERAL(TMP1842, " -ff -o -6 ", 11);
STRING_LITERAL(TMP1843, " -L/exet:nt/su:windows", 22);
STRING_LITERAL(TMP1844, " -WD", 4);
STRING_LITERAL(TMP1845, "$options $buildgui $builddll -o$exefile $objfiles", 49);
STRING_LITERAL(TMP1846, " -g ", 4);
STRING_LITERAL(TMP1847, "$3$n$1 $2", 9);
STRING_LITERAL(TMP1848, "#pragma pack(1)", 15);
STRING_LITERAL(TMP1849, "wcc", 3);
STRING_LITERAL(TMP1850, " -ox -on -6 -d0 -fp6 -zW ", 25);
STRING_LITERAL(TMP1851, "wcl386", 6);
STRING_LITERAL(TMP1852, "-c $options $include -fo=$objfile $file", 39);
STRING_LITERAL(TMP1853, " -bw", 4);
STRING_LITERAL(TMP1854, " -bd", 4);
STRING_LITERAL(TMP1855, "$options $buildgui $builddll -fe=$exefile $objfiles ", 52);
STRING_LITERAL(TMP1856, " -i=", 4);
STRING_LITERAL(TMP1857, " -d2 ", 5);
STRING_LITERAL(TMP1858, "vcc", 3);
STRING_LITERAL(TMP1859, " /Ogityb2 /G7 /arch:SSE2 ", 25);
STRING_LITERAL(TMP1860, " /O1 /G7 ", 9);
STRING_LITERAL(TMP1861, "cl", 2);
STRING_LITERAL(TMP1862, "/c $options $include /Fo$objfile $file", 38);
STRING_LITERAL(TMP1863, " /link /SUBSYSTEM:WINDOWS ", 26);
STRING_LITERAL(TMP1864, " /LD", 4);
STRING_LITERAL(TMP1865, "lib /OUT:$libfile $objfiles", 27);
STRING_LITERAL(TMP1866, "$options $builddll /Fe$exefile $objfiles $buildgui", 50);
STRING_LITERAL(TMP1867, " /I", 3);
STRING_LITERAL(TMP1868, " /LIBPATH:", 10);
STRING_LITERAL(TMP1869, " $1.lib", 7);
STRING_LITERAL(TMP1870, " /RTC1 /Z7 ", 11);
STRING_LITERAL(TMP1871, "tcc", 3);
STRING_LITERAL(TMP1872, "UNAVAILABLE!", 12);
STRING_LITERAL(TMP1873, "-o $exefile $options $buildgui $builddll $objfiles", 50);
STRING_LITERAL(TMP1874, "pcc", 3);
STRING_LITERAL(TMP1875, " -Ox ", 5);
STRING_LITERAL(TMP1876, " -Os ", 5);
STRING_LITERAL(TMP1877, "cc", 2);
STRING_LITERAL(TMP1878, "-c $options $include -Fo$objfile $file", 38);
STRING_LITERAL(TMP1879, " -SUBSYSTEM:WINDOWS", 19);
STRING_LITERAL(TMP1880, " -DLL", 5);
STRING_LITERAL(TMP1881, "$options $buildgui $builddll -OUT:$exefile $objfiles", 52);
STRING_LITERAL(TMP1882, " -Zi ", 5);
STRING_LITERAL(TMP1883, "ucc", 3);
STRING_LITERAL(TMP1884, " -O3 ", 5);
STRING_LITERAL(TMP1885, " -O1 ", 5);
STRING_LITERAL(TMP1886, " -shared ", 9);
STRING_LITERAL(TMP1887, "-o $exefile $buildgui $builddll $objfiles $options", 50);
STRING_LITERAL(TMP1888, "icl", 3);
STRING_LITERAL(TMP1889, "fasm", 4);
STRING_LITERAL(TMP1890, "$file $objfile", 14);
NIM_CONST TY193427 Cc_193413 = {{((NimStringDesc*) &TMP1798),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP1800),
((NimStringDesc*) &TMP1801),
((NimStringDesc*) &TMP1798),
((NimStringDesc*) &TMP1802),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP1804),
((NimStringDesc*) &TMP1805),
((NimStringDesc*) &TMP1806),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1807),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP1809),
((NimStringDesc*) &TMP1810),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1811),
((NimStringDesc*) &TMP1812),
((NimStringDesc*) &TMP1813),
((NimStringDesc*) &TMP1814),
183}
,
{((NimStringDesc*) &TMP1815),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP1800),
((NimStringDesc*) &TMP1801),
((NimStringDesc*) &TMP1816),
((NimStringDesc*) &TMP1817),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP1804),
((NimStringDesc*) &TMP1805),
((NimStringDesc*) &TMP1818),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1807),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP1809),
((NimStringDesc*) &TMP1810),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1811),
((NimStringDesc*) &TMP1812),
((NimStringDesc*) &TMP1813),
((NimStringDesc*) &TMP1814),
183}
,
{((NimStringDesc*) &TMP1819),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP1800),
((NimStringDesc*) &TMP1801),
((NimStringDesc*) &TMP1819),
((NimStringDesc*) &TMP1820),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP1804),
((NimStringDesc*) &TMP1805),
((NimStringDesc*) &TMP1818),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1807),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP1809),
((NimStringDesc*) &TMP1810),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1811),
((NimStringDesc*) &TMP1812),
((NimStringDesc*) &TMP1813),
((NimStringDesc*) &TMP1814),
183}
,
{((NimStringDesc*) &TMP1821),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1823),
((NimStringDesc*) &TMP1823),
((NimStringDesc*) &TMP1821),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1824),
((NimStringDesc*) &TMP1825),
((NimStringDesc*) &TMP1826),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1827),
((NimStringDesc*) &TMP1828),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1829),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1830),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
0}
,
{((NimStringDesc*) &TMP1832),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1833),
((NimStringDesc*) &TMP1834),
((NimStringDesc*) &TMP1835),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1836),
((NimStringDesc*) &TMP1837),
((NimStringDesc*) &TMP1838),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1835),
((NimStringDesc*) &TMP1839),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
4}
,
{((NimStringDesc*) &TMP1841),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1842),
((NimStringDesc*) &TMP1842),
((NimStringDesc*) &TMP1841),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1836),
((NimStringDesc*) &TMP1843),
((NimStringDesc*) &TMP1844),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1841),
((NimStringDesc*) &TMP1845),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1846),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1847),
((NimStringDesc*) &TMP1848),
4}
,
{((NimStringDesc*) &TMP1849),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1850),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1851),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1852),
((NimStringDesc*) &TMP1853),
((NimStringDesc*) &TMP1854),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1851),
((NimStringDesc*) &TMP1855),
((NimStringDesc*) &TMP1856),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1857),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
4}
,
{((NimStringDesc*) &TMP1858),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1859),
((NimStringDesc*) &TMP1860),
((NimStringDesc*) &TMP1861),
((NimStringDesc*) &TMP1861),
((NimStringDesc*) &TMP1862),
((NimStringDesc*) &TMP1863),
((NimStringDesc*) &TMP1864),
((NimStringDesc*) &TMP1865),
((NimStringDesc*) &TMP1861),
((NimStringDesc*) &TMP1866),
((NimStringDesc*) &TMP1867),
((NimStringDesc*) &TMP1868),
((NimStringDesc*) &TMP1869),
((NimStringDesc*) &TMP1870),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1847),
((NimStringDesc*) &TMP1848),
76}
,
{((NimStringDesc*) &TMP1871),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1871),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP1872),
((NimStringDesc*) &TMP1805),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1871),
((NimStringDesc*) &TMP1873),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1846),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
3}
,
{((NimStringDesc*) &TMP1874),
((NimStringDesc*) &TMP1822),
((NimStringDesc*) &TMP1875),
((NimStringDesc*) &TMP1876),
((NimStringDesc*) &TMP1877),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1878),
((NimStringDesc*) &TMP1879),
((NimStringDesc*) &TMP1880),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1877),
((NimStringDesc*) &TMP1881),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1882),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
0}
,
{((NimStringDesc*) &TMP1883),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP1884),
((NimStringDesc*) &TMP1885),
((NimStringDesc*) &TMP1877),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1886),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1877),
((NimStringDesc*) &TMP1887),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1840),
((NimStringDesc*) &TMP1831),
((NimStringDesc*) &TMP522),
0}
,
{((NimStringDesc*) &TMP1888),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP1800),
((NimStringDesc*) &TMP1801),
((NimStringDesc*) &TMP1888),
((NimStringDesc*) &TMP1802),
((NimStringDesc*) &TMP1803),
((NimStringDesc*) &TMP1804),
((NimStringDesc*) &TMP1805),
((NimStringDesc*) &TMP1806),
((NimStringDesc*) &TMP1888),
((NimStringDesc*) &TMP1807),
((NimStringDesc*) &TMP1808),
((NimStringDesc*) &TMP1809),
((NimStringDesc*) &TMP1810),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1811),
((NimStringDesc*) &TMP1812),
((NimStringDesc*) &TMP1813),
((NimStringDesc*) &TMP1814),
183}
,
{((NimStringDesc*) &TMP1889),
((NimStringDesc*) &TMP1799),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP1889),
((NimStringDesc*) &TMP1889),
((NimStringDesc*) &TMP1890),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
((NimStringDesc*) &TMP522),
0}
}
;
STRING_LITERAL(TMP1891, ".asm", 4);
STRING_LITERAL(TMP1892, "assembler", 9);
STRING_LITERAL(TMP1893, ".debug", 6);
STRING_LITERAL(TMP1894, " ", 1);
STRING_LITERAL(TMP1895, ".cpp", 4);
STRING_LITERAL(TMP1896, ".objc", 5);
STRING_LITERAL(TMP1897, ".js", 3);
STRING_LITERAL(TMP1898, ".options.debug", 14);
STRING_LITERAL(TMP1899, ".speed", 6);
STRING_LITERAL(TMP1900, ".options.speed", 14);
STRING_LITERAL(TMP1901, ".size", 5);
STRING_LITERAL(TMP1902, ".options.size", 13);
STRING_LITERAL(TMP1903, ".always", 7);
STRING_LITERAL(TMP1904, ".exe", 4);
STRING_LITERAL(TMP1905, "exe", 3);
STRING_LITERAL(TMP1910, "file", 4);
STRING_LITERAL(TMP1911, "objfile", 7);
STRING_LITERAL(TMP1912, "options", 7);
STRING_LITERAL(TMP1913, "include", 7);
STRING_LITERAL(TMP1914, "nim", 3);
STRING_LITERAL(TMP1915, "lib", 3);
STRING_LITERAL(TMP1917, "\012", 1);
STRING_LITERAL(TMP2013, ".options.always", 15);
STRING_LITERAL(TMP2014, ".path", 5);
STRING_LITERAL(TMP4588, "[C_Files]\012", 10);
STRING_LITERAL(TMP4589, "--file:r\"$1\"$N", 14);
STRING_LITERAL(TMP4590, "\012[C_Compiler]\012Flags=", 20);
STRING_LITERAL(TMP4591, "__dummy__", 9);
STRING_LITERAL(TMP4592, "\"", 1);
STRING_LITERAL(TMP4593, "\012[Linker]\012Flags=", 16);
STRING_LITERAL(TMP4594, ".options.linker", 15);
STRING_LITERAL(TMP4595, "\012[Environment]\012libpath=", 23);
STRING_LITERAL(TMP4596, "\012[Symbols]$n$1", 14);
STRING_LITERAL(TMP4597, "mapping.txt", 11);
STRING_LITERAL(TMP4604, "execution of an external compiler program \'", 43);
STRING_LITERAL(TMP4605, "\' failed with exit code: ", 25);
STRING_LITERAL(TMP4606, "\012\012", 2);
static NIM_CONST TY201404 TMP4607 = {
0x00, 0x3E, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP4608, "CC: ", 4);
static NIM_CONST TY194578 TMP4618 = {NIM_NIL,NIM_NIL};
STRING_LITERAL(TMP4619, "libfile", 7);
STRING_LITERAL(TMP4620, "$1.lib", 6);
STRING_LITERAL(TMP4621, "lib$1.a", 7);
STRING_LITERAL(TMP4622, "objfiles", 8);
STRING_LITERAL(TMP4623, ".linkerexe", 10);
STRING_LITERAL(TMP4624, "builddll", 8);
STRING_LITERAL(TMP4625, "buildgui", 8);
STRING_LITERAL(TMP4626, "exefile", 7);
STRING_LITERAL(TMP4627, "compile_", 8);
NU8 ccompiler_193431;
NU8 cassembler_193432;
NIM_BOOL gmixedmode_193433;
TY125402* cincludes_193451;
extern TNimType NTI125402; /* seq[string] */
extern Gcheap50018 gch_50059;
TY125402* clibs_193469;
TY125402* clinkedlibs_193487;
Tlinkedlist135016 tolink_193506;
Tlinkedlist135016 tocompile_193507;
Tlinkedlist135016 externaltocompile_193508;
NimStringDesc* linkoptions_193509;
NimStringDesc* compileoptions_193510;
NimStringDesc* ccompilerpath_193511;
NI filecounter_193937;
extern NU32 gglobaloptions_159121;
extern NU8 gcmd_159123;
extern NU8 targetos_166603;
extern NU8 targetcpu_166601;
extern NU8 hostos_166604;
extern NU8 hostcpu_166602;
extern NU32 goptions_159119;
extern NimStringDesc* libpath_159198;
extern TNimType NTI191003; /* Sha1Digest */
extern NimStringDesc* gprojectpath_159200;
TNimType NTI194724; /* object */
extern TNimType NTI324021; /* range -1..0(int) */
TNimType NTI194723; /* ref object */
extern NimStringDesc* tnl_166618;
extern NI gnumberofprocessors_159131;
extern NI gverbosity_159130;
extern NimStringDesc* gprojectname_159199;
extern NimStringDesc* outfile_159127;

static N_INLINE(Cell47704*, usrtocell_51640)(void* usr) {
	Cell47704* result;
	result = 0;
	result = ((Cell47704*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(Cell47704))))));
	return result;
}

static N_INLINE(void, rtladdzct_53201)(Cell47704* c) {
	addzct_51617((&gch_50059.zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell47704* c;
	c = usrtocell_51640(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_53201(c);
	}
	LA3: ;
}

static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	memcpy(((NCSTRING) ((&(*dest).data[((*dest).Sup.len)- 0]))), ((NCSTRING) ((*src).data)), (NI)((*src).Sup.len + ((NI) 1)));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(NU8, nametocc_193518)(NimStringDesc* name) {
	NU8 result;
{	result = 0;
	{
		NU8 i_193614;
		NI res_193619;
		i_193614 = 0;
		res_193619 = ((NI) 1);
		{
			while (1) {
				if (!(res_193619 <= ((NI) 13))) goto LA3;
				i_193614 = ((NU8) (res_193619));
				{
					NI LOC6;
					LOC6 = 0;
					LOC6 = nsuCmpIgnoreStyle(name, Cc_193413[(i_193614)- 1].Field0);
					if (!(LOC6 == ((NI) 0))) goto LA7;
					result = i_193614;
					goto BeforeRet;
				}
				LA7: ;
				res_193619 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NU8) 0);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, addopt_193821)(NimStringDesc** dest, NimStringDesc* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (((*dest) ? (*dest)->Sup.len : 0) == ((NI) 0));
		if (LOC3) goto LA4;
		LOC3 = !(((NU8)((*dest)->data[(NI)(((*dest) ? (*dest)->Sup.len : 0) - ((NI) 1))]) == (NU8)(32)));
		LA4: ;
		if (!LOC3) goto LA5;
		(*dest) = resizeString((*dest), 1);
appendString((*dest), ((NimStringDesc*) &TMP1894));
	}
	LA5: ;
	(*dest) = resizeString((*dest), src->Sup.len + 0);
appendString((*dest), src);
}

static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[((*dest).Sup.len)- 0] = c;
	(*dest).data[((NI)((*dest).Sup.len + ((NI) 1)))- 0] = 0;
	(*dest).Sup.len += ((NI) 1);
}

N_NIMCALL(NimStringDesc*, getconfigvar_193622)(NU8 c, NimStringDesc* suffix) {
	NimStringDesc* result;
	NimStringDesc* fullsuffix;
	result = 0;
	{
		NimStringDesc* LOC5;
		if (!(gcmd_159123 == ((NU8) 2))) goto LA3;
		LOC5 = 0;
		LOC5 = rawNewString(suffix->Sup.len + 4);
appendString(LOC5, ((NimStringDesc*) &TMP1895));
appendString(LOC5, suffix);
		fullsuffix = LOC5;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC9;
		if (!(gcmd_159123 == ((NU8) 3))) goto LA7;
		LOC9 = 0;
		LOC9 = rawNewString(suffix->Sup.len + 5);
appendString(LOC9, ((NimStringDesc*) &TMP1896));
appendString(LOC9, suffix);
		fullsuffix = LOC9;
	}
	goto LA1;
	LA7: ;
	{
		NimStringDesc* LOC13;
		if (!(gcmd_159123 == ((NU8) 4))) goto LA11;
		LOC13 = 0;
		LOC13 = rawNewString(suffix->Sup.len + 3);
appendString(LOC13, ((NimStringDesc*) &TMP1897));
appendString(LOC13, suffix);
		fullsuffix = LOC13;
	}
	goto LA1;
	LA11: ;
	{
		fullsuffix = suffix;
	}
	LA1: ;
	{
		NIM_BOOL LOC17;
		NIM_BOOL LOC18;
		NimStringDesc* fullccname;
		NimStringDesc* LOC23;
		LOC17 = 0;
		LOC18 = 0;
		LOC18 = !((hostos_166604 == targetos_166603));
		if (LOC18) goto LA19;
		LOC18 = !((hostcpu_166602 == targetcpu_166601));
		LA19: ;
		LOC17 = LOC18;
		if (!(LOC17)) goto LA20;
		LOC17 = !(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 4))&31U)))!=0));
		LA20: ;
		if (!LOC17) goto LA21;
		LOC23 = 0;
		LOC23 = rawNewString(Cpu_166476[(targetcpu_166601)- 1].Field0->Sup.len + Os_166055[(targetos_166603)- 1].Field0->Sup.len + Cc_193413[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 2);
appendString(LOC23, Cpu_166476[(targetcpu_166601)- 1].Field0);
appendChar(LOC23, 46);
appendString(LOC23, Os_166055[(targetos_166603)- 1].Field0);
appendChar(LOC23, 46);
appendString(LOC23, Cc_193413[(c)- 1].Field0);
appendString(LOC23, fullsuffix);
		fullccname = LOC23;
		result = getconfigvar_159282(fullccname);
		{
			NimStringDesc* LOC28;
			if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA26;
			LOC28 = 0;
			LOC28 = rawNewString(Cc_193413[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 0);
appendString(LOC28, Cc_193413[(c)- 1].Field0);
appendString(LOC28, fullsuffix);
			result = getconfigvar_159282(LOC28);
		}
		LA26: ;
	}
	goto LA15;
	LA21: ;
	{
		NimStringDesc* LOC30;
		LOC30 = 0;
		LOC30 = rawNewString(Cc_193413[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 0);
appendString(LOC30, Cc_193413[(c)- 1].Field0);
appendString(LOC30, fullsuffix);
		result = getconfigvar_159282(LOC30);
	}
	LA15: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdebug_193896)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_193622(c, ((NimStringDesc*) &TMP1898));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_193413[(c)- 1].Field15);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptspeed_193892)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_193622(c, ((NimStringDesc*) &TMP1900));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_193413[(c)- 1].Field2);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptsize_193900)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_193622(c, ((NimStringDesc*) &TMP1902));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_193413[(c)- 1].Field3);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, cfilespecificoptions_193945)(NimStringDesc* cfilename) {
	NimStringDesc* result;
	NimStringDesc* trunk;
	TY118906 LOC1;
	NimStringDesc* key;
	NimStringDesc* LOC40;
	result = 0;
	result = copyString(compileoptions_193510);
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	nossplitFile(cfilename, (&LOC1));
	trunk = copyString(LOC1.Field1);
	{
		NimStringDesc* key;
		NimStringDesc* LOC6;
		if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 7))&31U)))!=0)) goto LA4;
		LOC6 = 0;
		LOC6 = rawNewString(trunk->Sup.len + 6);
appendString(LOC6, trunk);
appendString(LOC6, ((NimStringDesc*) &TMP1893));
		key = LOC6;
		{
			NIM_BOOL LOC9;
			NimStringDesc* LOC12;
			LOC9 = 0;
			LOC9 = existsconfigvar_159278(key);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = getconfigvar_159282(key);
			addopt_193821((&result), LOC12);
		}
		goto LA7;
		LA10: ;
		{
			NimStringDesc* LOC14;
			LOC14 = 0;
			LOC14 = getdebug_193896(ccompiler_193431);
			addopt_193821((&result), LOC14);
		}
		LA7: ;
	}
	LA4: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC19;
		if (!((goptions_159119 &(1U<<((NU)(((NU8) 13))&31U)))!=0)) goto LA17;
		LOC19 = 0;
		LOC19 = rawNewString(trunk->Sup.len + 6);
appendString(LOC19, trunk);
appendString(LOC19, ((NimStringDesc*) &TMP1899));
		key = LOC19;
		{
			NIM_BOOL LOC22;
			NimStringDesc* LOC25;
			LOC22 = 0;
			LOC22 = existsconfigvar_159278(key);
			if (!LOC22) goto LA23;
			LOC25 = 0;
			LOC25 = getconfigvar_159282(key);
			addopt_193821((&result), LOC25);
		}
		goto LA20;
		LA23: ;
		{
			NimStringDesc* LOC27;
			LOC27 = 0;
			LOC27 = getoptspeed_193892(ccompiler_193431);
			addopt_193821((&result), LOC27);
		}
		LA20: ;
	}
	goto LA15;
	LA17: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC31;
		if (!((goptions_159119 &(1U<<((NU)(((NU8) 14))&31U)))!=0)) goto LA29;
		LOC31 = 0;
		LOC31 = rawNewString(trunk->Sup.len + 5);
appendString(LOC31, trunk);
appendString(LOC31, ((NimStringDesc*) &TMP1901));
		key = LOC31;
		{
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC34 = 0;
			LOC34 = existsconfigvar_159278(key);
			if (!LOC34) goto LA35;
			LOC37 = 0;
			LOC37 = getconfigvar_159282(key);
			addopt_193821((&result), LOC37);
		}
		goto LA32;
		LA35: ;
		{
			NimStringDesc* LOC39;
			LOC39 = 0;
			LOC39 = getoptsize_193900(ccompiler_193431);
			addopt_193821((&result), LOC39);
		}
		LA32: ;
	}
	goto LA15;
	LA29: ;
	LA15: ;
	LOC40 = 0;
	LOC40 = rawNewString(trunk->Sup.len + 7);
appendString(LOC40, trunk);
appendString(LOC40, ((NimStringDesc*) &TMP1903));
	key = LOC40;
	{
		NIM_BOOL LOC43;
		NimStringDesc* LOC46;
		LOC43 = 0;
		LOC43 = existsconfigvar_159278(key);
		if (!LOC43) goto LA44;
		LOC46 = 0;
		LOC46 = getconfigvar_159282(key);
		addopt_193821((&result), LOC46);
	}
	LA44: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getcompilerexe_194258)(NU8 compiler) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(gcmd_159123 == ((NU8) 2))) goto LA3;
		result = copyString(Cc_193413[(compiler)- 1].Field5);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(Cc_193413[(compiler)- 1].Field4);
	}
	LA1: ;
	{
		if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA8;
		rawmessage_184612(((NU16) 233), Cc_193413[(compiler)- 1].Field0);
	}
	LA8: ;
	return result;
}

static N_INLINE(NIM_BOOL, needsexeext_194227)(void) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((gglobaloptions_159121 &(1U<<((NU)(((NU8) 11))&31U)))!=0);
	if (!(LOC2)) goto LA3;
	LOC2 = (targetos_166603 == ((NU8) 2));
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = (hostos_166604 == ((NU8) 2));
	LA4: ;
	result = LOC1;
	return result;
}

static N_INLINE(NIM_BOOL, noabsolutepaths_193904)(void) {
	NIM_BOOL result;
	result = 0;
	result = !(((gglobaloptions_159121 & 6144) == 0));
	return result;
}

N_NIMCALL(void, add_193939)(NimStringDesc** s, NimStringDesc** many, NI manyLen0) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuJoin(many, manyLen0);
	(*s) = resizeString((*s), LOC1->Sup.len + 0);
appendString((*s), LOC1);
}

N_NIMCALL(NimStringDesc*, toobjfile_193859)(NimStringDesc* filename) {
	NimStringDesc* result;
	result = 0;
	result = noschangeFileExt(filename, Cc_193413[(ccompiler_193431)- 1].Field1);
	return result;
}

N_NIMCALL(NimStringDesc*, completecfilepath_193854)(NimStringDesc* cfile, NIM_BOOL createsubdir) {
	NimStringDesc* result;
	result = 0;
	result = completegeneratedfilepath_160201(cfile, createsubdir);
	return result;
}

N_NIMCALL(NimStringDesc*, getcompilecfilecmd_194284)(NimStringDesc* cfilename, NIM_BOOL isexternal) {
	NimStringDesc* result;
	NU8 c;
	NimStringDesc* options;
	NimStringDesc* exe;
	NimStringDesc* includecmd;
	NimStringDesc* compilepattern;
	NimStringDesc* cfile;
	NimStringDesc* objfile;
	TY199970 LOC67;
	NimStringDesc* LOC68;
	TY199970 LOC69;
	NimStringDesc* LOC70;
	NimStringDesc* LOC71;
	result = 0;
	c = ccompiler_193431;
	{
		NIM_BOOL LOC3;
		NimStringDesc* customassembler;
		LOC3 = 0;
		LOC3 = nsuEndsWith(cfilename, ((NimStringDesc*) &TMP1891));
		if (!LOC3) goto LA4;
		customassembler = getconfigvar_159282(((NimStringDesc*) &TMP1892));
		{
			if (!(((NI) 0) < (customassembler ? customassembler->Sup.len : 0))) goto LA8;
			c = nametocc_193518(customassembler);
		}
		goto LA6;
		LA8: ;
		{
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = (targetcpu_166601 == ((NU8) 1));
				if (LOC13) goto LA14;
				LOC13 = (targetcpu_166601 == ((NU8) 10));
				LA14: ;
				if (!LOC13) goto LA15;
				c = ((NU8) 13);
			}
			goto LA11;
			LA15: ;
			{
				c = ((NU8) 0);
			}
			LA11: ;
		}
		LA6: ;
		{
			if (!(c == ((NU8) 0))) goto LA20;
			rawmessage_184612(((NU16) 234), ((NimStringDesc*) &TMP522));
		}
		goto LA18;
		LA20: ;
		{
			if (!!(((8192 &(1U<<((NU)(c)&15U)))!=0))) goto LA23;
			rawmessage_184612(((NU16) 235), customassembler);
		}
		goto LA18;
		LA23: ;
		LA18: ;
	}
	LA4: ;
	options = cfilespecificoptions_193945(cfilename);
	exe = getconfigvar_193622(c, ((NimStringDesc*) &TMP1904));
	{
		if (!((exe ? exe->Sup.len : 0) == ((NI) 0))) goto LA27;
		exe = getcompilerexe_194258(c);
	}
	LA27: ;
	{
		NIM_BOOL LOC31;
		LOC31 = 0;
		LOC31 = needsexeext_194227();
		if (!LOC31) goto LA32;
		exe = nosaddFileExt(exe, ((NimStringDesc*) &TMP1905));
	}
	LA32: ;
	{
		NIM_BOOL LOC36;
		NimStringDesc* LOC40;
		LOC36 = 0;
		LOC36 = ((gglobaloptions_159121 &(1U<<((NU)(((NU8) 8))&31U)))!=0);
		if (!(LOC36)) goto LA37;
		LOC36 = ((Os_166055[(targetos_166603)- 1].Field12 &(1U<<((NU)(((NU8) 0))&7U)))!=0);
		LA37: ;
		if (!LOC36) goto LA38;
		LOC40 = 0;
		LOC40 = rawNewString(Cc_193413[(c)- 1].Field16->Sup.len + 1);
appendChar(LOC40, 32);
appendString(LOC40, Cc_193413[(c)- 1].Field16);
		options = resizeString(options, LOC40->Sup.len + 0);
appendString(options, LOC40);
	}
	LA38: ;
	includecmd = 0;
	compilepattern = 0;
	{
		NIM_BOOL LOC43;
		NimStringDesc* LOC46;
		NimStringDesc* LOC47;
		LOC43 = 0;
		LOC43 = noabsolutepaths_193904();
		if (!!(LOC43)) goto LA44;
		LOC46 = 0;
		LOC47 = 0;
		LOC47 = nospquoteShell(libpath_159198);
		LOC46 = rawNewString(Cc_193413[(c)- 1].Field12->Sup.len + LOC47->Sup.len + 0);
appendString(LOC46, Cc_193413[(c)- 1].Field12);
appendString(LOC46, LOC47);
		includecmd = LOC46;
		{
			NimStringDesc* includedir_194360;
			NI i_194378;
			NI L_194380;
			includedir_194360 = 0;
			i_194378 = ((NI) 0);
			L_194380 = (cincludes_193451 ? cincludes_193451->Sup.len : 0);
			{
				while (1) {
					TY183169 LOC51;
					if (!(i_194378 < L_194380)) goto LA50;
					includedir_194360 = cincludes_193451->data[i_194378];
					memset((void*)LOC51, 0, sizeof(LOC51));
					LOC51[0] = copyString(Cc_193413[(c)- 1].Field12);
					LOC51[1] = nospquoteShell(includedir_194360);
					add_193939((&includecmd), LOC51, 2);
					i_194378 += ((NI) 1);
				} LA50: ;
			}
		}
		compilepattern = nosjoinPath(ccompilerpath_193511, exe);
	}
	goto LA41;
	LA44: ;
	{
		includecmd = copyString(((NimStringDesc*) &TMP522));
		compilepattern = getcompilerexe_194258(c);
	}
	LA41: ;
	{
		NIM_BOOL LOC55;
		LOC55 = 0;
		LOC55 = noabsolutepaths_193904();
		if (!LOC55) goto LA56;
		cfile = nosextractFilename(cfilename);
	}
	goto LA53;
	LA56: ;
	{
		cfile = copyString(cfilename);
	}
	LA53: ;
	{
		NIM_BOOL LOC61;
		LOC61 = 0;
		LOC61 = !(isexternal);
		if (LOC61) goto LA62;
		LOC61 = noabsolutepaths_193904();
		LA62: ;
		if (!LOC61) goto LA63;
		objfile = toobjfile_193859(cfile);
	}
	goto LA59;
	LA63: ;
	{
		NimStringDesc* LOC66;
		LOC66 = 0;
		LOC66 = toobjfile_193859(cfile);
		objfile = completecfilepath_193854(LOC66, NIM_TRUE);
	}
	LA59: ;
	objfile = nospquoteShell(objfile);
	cfile = nospquoteShell(cfile);
	memset((void*)LOC67, 0, sizeof(LOC67));
	LOC67[0] = copyString(((NimStringDesc*) &TMP1910));
	LOC67[1] = copyString(cfile);
	LOC67[2] = copyString(((NimStringDesc*) &TMP1911));
	LOC67[3] = copyString(objfile);
	LOC67[4] = copyString(((NimStringDesc*) &TMP1912));
	LOC67[5] = copyString(options);
	LOC67[6] = copyString(((NimStringDesc*) &TMP1913));
	LOC67[7] = copyString(includecmd);
	LOC67[8] = copyString(((NimStringDesc*) &TMP1914));
	LOC67[9] = getprefixdir_159295();
	LOC67[10] = copyString(((NimStringDesc*) &TMP1914));
	LOC67[11] = getprefixdir_159295();
	LOC67[12] = copyString(((NimStringDesc*) &TMP1915));
	LOC67[13] = copyString(libpath_159198);
	LOC68 = 0;
	LOC68 = nsuFormatOpenArray(compilepattern, LOC67, 14);
	result = nospquoteShell(LOC68);
	result = addChar(result, 32);
	memset((void*)LOC69, 0, sizeof(LOC69));
	LOC69[0] = copyString(((NimStringDesc*) &TMP1910));
	LOC69[1] = copyString(cfile);
	LOC69[2] = copyString(((NimStringDesc*) &TMP1911));
	LOC69[3] = copyString(objfile);
	LOC69[4] = copyString(((NimStringDesc*) &TMP1912));
	LOC69[5] = copyString(options);
	LOC69[6] = copyString(((NimStringDesc*) &TMP1913));
	LOC69[7] = copyString(includecmd);
	LOC69[8] = copyString(((NimStringDesc*) &TMP1914));
	LOC70 = 0;
	LOC70 = getprefixdir_159295();
	LOC69[9] = nospquoteShell(LOC70);
	LOC69[10] = copyString(((NimStringDesc*) &TMP1914));
	LOC71 = 0;
	LOC71 = getprefixdir_159295();
	LOC69[11] = nospquoteShell(LOC71);
	LOC69[12] = copyString(((NimStringDesc*) &TMP1915));
	LOC69[13] = nospquoteShell(libpath_159198);
	nsuAddf((&result), Cc_193413[(c)- 1].Field6, LOC69, 14);
	return result;
}

N_NIMCALL(void, footprint_194381)(NimStringDesc* filename, Sha1digest191003* Result) {
	NimStringDesc* LOC1;
	Sha1digest191003 LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	LOC1 = 0;
	memset((void*)LOC2, 0, sizeof(LOC2));
	securehashfile_191016(filename, LOC2);
	LOC3 = 0;
	LOC3 = HEX24_191020(LOC2);
	LOC4 = 0;
	LOC4 = getcompilecfilecmd_194284(filename, NIM_TRUE);
	LOC1 = rawNewString(LOC3->Sup.len + Os_166055[(targetos_166603)- 1].Field0->Sup.len + Cpu_166476[(targetcpu_166601)- 1].Field0->Sup.len + Cc_193413[(ccompiler_193431)- 1].Field0->Sup.len + LOC4->Sup.len + 0);
appendString(LOC1, LOC3);
appendString(LOC1, Os_166055[(targetos_166603)- 1].Field0);
appendString(LOC1, Cpu_166476[(targetcpu_166601)- 1].Field0);
appendString(LOC1, Cc_193413[(ccompiler_193431)- 1].Field0);
appendString(LOC1, LOC4);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI191003));
	securehash_191011(LOC1, Result);
}

static N_INLINE(void, writeline_160405)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_160420;
		NI i_160428;
		i_160420 = 0;
		i_160428 = ((NI) 0);
		{
			while (1) {
				if (!(i_160428 < xLen0)) goto LA3;
				i_160420 = x[i_160428];
				write_15689(f, i_160420);
				i_160428 += ((NI) 1);
			} LA3: ;
		}
	}
	write_15689(f, ((NimStringDesc*) &TMP1917));
}

N_NIMCALL(NIM_BOOL, externalfilechanged_194385)(NimStringDesc* filename) {
	NIM_BOOL result;
	NimStringDesc* hashfile;
	NimStringDesc* LOC5;
	Sha1digest191003 currenthash;
	FILE* f;
{	result = 0;
	{
		if (!!(((46 &(1U<<((NU)(gcmd_159123)&31U)))!=0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = withpackagename_160074(filename);
	hashfile = togeneratedfile_160082(LOC5, ((NimStringDesc*) &TMP1796));
	memset((void*)currenthash, 0, sizeof(currenthash));
	chckNil((void*)currenthash);
	memset((void*)currenthash, 0, sizeof(currenthash));
	footprint_194381(filename, currenthash);
	f = 0;
	{
		NIM_BOOL LOC8;
		Sha1digest191003 oldhash;
		NimStringDesc* LOC11;
		NIM_BOOL LOC12;
		LOC8 = 0;
		LOC8 = open_15603(&f, hashfile, ((NU8) 0), ((NI) -1));
		if (!LOC8) goto LA9;
		memset((void*)oldhash, 0, sizeof(oldhash));
		LOC11 = 0;
		LOC11 = readline_15710(f);
		chckNil((void*)oldhash);
		memset((void*)oldhash, 0, sizeof(oldhash));
		parsesecurehash_191058(LOC11, oldhash);
		fclose(f);
		LOC12 = 0;
		LOC12 = HEX3DHEX3D_191087(oldhash, currenthash);
		result = !(LOC12);
	}
	goto LA6;
	LA9: ;
	{
		result = NIM_TRUE;
	}
	LA6: ;
	{
		if (!result) goto LA16;
		{
			NIM_BOOL LOC20;
			TY182752 LOC23;
			LOC20 = 0;
			LOC20 = open_15603(&f, hashfile, ((NU8) 1), ((NI) -1));
			if (!LOC20) goto LA21;
			memset((void*)LOC23, 0, sizeof(LOC23));
			LOC23[0] = HEX24_191020(currenthash);
			writeline_160405(f, LOC23, 1);
			fclose(f);
		}
		LA21: ;
	}
	LA16: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, addexternalfiletocompile_194419)(NimStringDesc* filename) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((gglobaloptions_159121 &(1U<<((NU)(((NU8) 1))&31U)))!=0);
		if (LOC3) goto LA4;
		LOC3 = externalfilechanged_194385(filename);
		LA4: ;
		if (!LOC3) goto LA5;
		appendstr_135244((&externaltocompile_193508), filename);
	}
	LA5: ;
}

N_NIMCALL(void, addfiletolink_193872)(NimStringDesc* filename) {
	prependstr_135413((&tolink_193506), filename);
}

N_NIMCALL(void, addcompileoption_193830)(NimStringDesc* option) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = nsuFindStr(compileoptions_193510, option, ((NI) 0));
		if (!(LOC3 < ((NI) 0))) goto LA4;
		addopt_193821((&compileoptions_193510), option);
	}
	LA4: ;
}

N_NIMCALL(void, addlinkoption_193826)(NimStringDesc* option) {
	addopt_193821((&linkoptions_193509), option);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Cell47704* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_51640(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Cell47704* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_51640((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_53201(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, setcc_193684)(NimStringDesc* ccname) {
	NimStringDesc* LOC5;
	ccompiler_193431 = nametocc_193518(ccname);
	{
		if (!(ccompiler_193431 == ((NU8) 0))) goto LA3;
		rawmessage_184612(((NU16) 50), ccname);
	}
	LA3: ;
	asgnRefNoCycle((void**) (&compileoptions_193510), getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP2013)));
	LOC5 = 0;
	LOC5 = linkoptions_193509; linkoptions_193509 = copyStringRC1(((NimStringDesc*) &TMP522));
	if (LOC5) nimGCunrefNoCycle(LOC5);
	asgnRefNoCycle((void**) (&ccompilerpath_193511), getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP2014)));
	{
		NU8 i_193814;
		NI res_193818;
		i_193814 = 0;
		res_193818 = ((NI) 1);
		{
			while (1) {
				if (!(res_193818 <= ((NI) 13))) goto LA8;
				i_193814 = ((NU8) (res_193818));
				undefsymbol_189007(Cc_193413[(i_193814)- 1].Field0);
				res_193818 += ((NI) 1);
			} LA8: ;
		}
	}
	definesymbol_189004(Cc_193413[(ccompiler_193431)- 1].Field0);
}

N_NIMCALL(void, initvars_193834)(void) {
	NimStringDesc* LOC4;
	{
		NU8 i_193847;
		NI res_193851;
		i_193847 = 0;
		res_193851 = ((NI) 1);
		{
			while (1) {
				if (!(res_193851 <= ((NI) 13))) goto LA3;
				i_193847 = ((NU8) (res_193851));
				undefsymbol_189007(Cc_193413[(i_193847)- 1].Field0);
				res_193851 += ((NI) 1);
			} LA3: ;
		}
	}
	definesymbol_189004(Cc_193413[(ccompiler_193431)- 1].Field0);
	LOC4 = 0;
	LOC4 = getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP2013));
	addcompileoption_193830(LOC4);
	{
		if (!((ccompilerpath_193511 ? ccompilerpath_193511->Sup.len : 0) == ((NI) 0))) goto LA7;
		asgnRefNoCycle((void**) (&ccompilerpath_193511), getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP2014)));
	}
	LA7: ;
}

N_NIMCALL(void, addfiletocompile_193863)(NimStringDesc* filename) {
	appendstr_135244((&tocompile_193507), filename);
}

N_NIMCALL(Ropeobj168006*, genmappingfiles_194748)(Tlinkedlist135016* list) {
	Ropeobj168006* result;
	Tstrentry135012* it;
	result = 0;
	it = ((Tstrentry135012*) ((*list).head));
	{
		while (1) {
			TY168507 LOC3;
			if (!!((it == NIM_NIL))) goto LA2;
			memset((void*)LOC3, 0, sizeof(LOC3));
			LOC3[0] = rope_168277((*it).data);
			addf_169205(&result, ((NimStringDesc*) &TMP4589), LOC3, 1);
			it = ((Tstrentry135012*) ((*it).Sup.next));
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, getcompileoptions_193991)(void) {
	NimStringDesc* result;
	result = 0;
	result = cfilespecificoptions_193945(((NimStringDesc*) &TMP4591));
	return result;
}

N_NIMCALL(NimStringDesc*, getlinkoptions_193994)(void) {
	NimStringDesc* result;
	result = 0;
	result = copyString(linkoptions_193509);
	{
		NimStringDesc* linkedlib_194202;
		NI i_194218;
		NI L_194220;
		linkedlib_194202 = 0;
		i_194218 = ((NI) 0);
		L_194220 = (clinkedlibs_193487 ? clinkedlibs_193487->Sup.len : 0);
		{
			while (1) {
				NimStringDesc* LOC4;
				NimStringDesc* LOC5;
				if (!(i_194218 < L_194220)) goto LA3;
				linkedlib_194202 = clinkedlibs_193487->data[i_194218];
				LOC4 = 0;
				LOC4 = nospquoteShell(linkedlib_194202);
				LOC5 = 0;
				LOC5 = nsuFormatSingleElem(Cc_193413[(ccompiler_193431)- 1].Field14, LOC4);
				result = resizeString(result, LOC5->Sup.len + 0);
appendString(result, LOC5);
				i_194218 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NimStringDesc* libdir_194211;
		NI i_194224;
		NI L_194226;
		libdir_194211 = 0;
		i_194224 = ((NI) 0);
		L_194226 = (clibs_193469 ? clibs_193469->Sup.len : 0);
		{
			while (1) {
				TY183169 LOC9;
				if (!(i_194224 < L_194226)) goto LA8;
				libdir_194211 = clibs_193469->data[i_194224];
				memset((void*)LOC9, 0, sizeof(LOC9));
				LOC9[0] = copyString(Cc_193413[(ccompiler_193431)- 1].Field13);
				LOC9[1] = nospquoteShell(libdir_194211);
				add_193939((&result), LOC9, 2);
				i_194224 += ((NI) 1);
			} LA8: ;
		}
	}
	return result;
}

N_NIMCALL(void, writemapping_194769)(Ropeobj168006* gsymbolmapping) {
	Ropeobj168006* code;
	Ropeobj168006* LOC5;
	Ropeobj168006* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* LOC11;
	NimStringDesc* LOC12;
	NimStringDesc* LOC13;
	TY168507 LOC14;
	NimStringDesc* LOC15;
{	{
		if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 12))&31U)))!=0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	code = rope_168277(((NimStringDesc*) &TMP4588));
	LOC5 = 0;
	LOC5 = genmappingfiles_194748((&tocompile_193507));
	add_168482(&code, LOC5);
	LOC6 = 0;
	LOC6 = genmappingfiles_194748((&externaltocompile_193508));
	add_168482(&code, LOC6);
	add_168487(&code, ((NimStringDesc*) &TMP4590));
	LOC7 = 0;
	LOC7 = getcompileoptions_193991();
	LOC8 = 0;
	LOC8 = nsuEscape(LOC7, ((NimStringDesc*) &TMP4592), ((NimStringDesc*) &TMP4592));
	add_168487(&code, LOC8);
	add_168487(&code, ((NimStringDesc*) &TMP4593));
	LOC9 = 0;
	LOC10 = 0;
	LOC10 = getlinkoptions_193994();
	LOC11 = 0;
	LOC11 = getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP4594));
	LOC9 = rawNewString(LOC10->Sup.len + LOC11->Sup.len + 1);
appendString(LOC9, LOC10);
appendString(LOC9, ((NimStringDesc*) &TMP1894));
appendString(LOC9, LOC11);
	LOC12 = 0;
	LOC12 = nsuEscape(LOC9, ((NimStringDesc*) &TMP4592), ((NimStringDesc*) &TMP4592));
	add_168487(&code, LOC12);
	add_168487(&code, ((NimStringDesc*) &TMP4595));
	LOC13 = 0;
	LOC13 = nsuEscape(libpath_159198, ((NimStringDesc*) &TMP4592), ((NimStringDesc*) &TMP4592));
	add_168487(&code, LOC13);
	memset((void*)LOC14, 0, sizeof(LOC14));
	LOC14[0] = gsymbolmapping;
	addf_169205(&code, ((NimStringDesc*) &TMP4596), LOC14, 1);
	LOC15 = 0;
	LOC15 = nosjoinPath(gprojectpath_159200, ((NimStringDesc*) &TMP4597));
	writerope_168836(code, LOC15, NIM_FALSE);
	}BeforeRet: ;
}
N_NIMCALL(void, TMP4603)(void* p, NI op) {
	TY194724* a;
	a = (TY194724*)p;
	nimGCvisit((void*)(*a).prettycmds194576, op);
	nimGCvisit((void*)(*a).cmds194559, op);
}

N_CLOSURE(void, HEX3Aanonymous_194577)(NI idx, void* ClEnv) {
	TY194724* HEX3Aenvp_194727;
	HEX3Aenvp_194727 = (TY194724*) ClEnv;
	printf("%s\012", (*HEX3Aenvp_194727).prettycmds194576->data[idx]? ((*HEX3Aenvp_194727).prettycmds194576->data[idx])->data:"nil");
	fflush(stdout);
}

N_CLOSURE(void, HEX3Aanonymous_194583)(NI idx, Processobj149404* p, void* ClEnv) {
	TY194724* HEX3Aenvp_194729;
	NI exitcode;
	HEX3Aenvp_194729 = (TY194724*) ClEnv;
	exitcode = peekexitcode_149677(p);
	{
		NimStringDesc* LOC5;
		NimStringDesc* LOC6;
		Streamobj144418* LOC7;
		NimStringDesc* LOC8;
		NimStringDesc* LOC9;
		if (!!((exitcode == ((NI) 0)))) goto LA3;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = nimIntToStr(exitcode);
		LOC7 = 0;
		LOC7 = nospoutputStream(p);
		LOC8 = 0;
		LOC8 = readall_144517(LOC7);
		LOC9 = 0;
		LOC9 = nsuStrip(LOC8, NIM_TRUE, NIM_TRUE, TMP4607);
		LOC5 = rawNewString((*HEX3Aenvp_194729).cmds194559->data[idx]->Sup.len + LOC6->Sup.len + LOC9->Sup.len + 70);
appendString(LOC5, ((NimStringDesc*) &TMP4604));
appendString(LOC5, (*HEX3Aenvp_194729).cmds194559->data[idx]);
appendString(LOC5, ((NimStringDesc*) &TMP4605));
appendString(LOC5, LOC6);
appendString(LOC5, ((NimStringDesc*) &TMP4606));
appendString(LOC5, LOC9);
		rawmessage_184612(((NU16) 4), LOC5);
	}
	LA3: ;
}

N_NIMCALL(void, compilecfile_194433)(Tlinkedlist135016* list, Ropeobj168006** script, TY125402** cmds, TY125402** prettycmds, NIM_BOOL isexternal) {
	Tstrentry135012* it;
	it = ((Tstrentry135012*) ((*list).head));
	{
		while (1) {
			NimStringDesc* compilecmd;
			if (!!((it == NIM_NIL))) goto LA2;
			filecounter_193937 += ((NI) 1);
			compilecmd = getcompilecfilecmd_194284((*it).data, isexternal);
			{
				NimStringDesc* LOC7;
				TY118906 LOC8;
				NimStringDesc* dir;
				NimStringDesc* name;
				NimStringDesc* ext;
				NimStringDesc* LOC9;
				NimStringDesc* LOC10;
				if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 4))&31U)))!=0))) goto LA5;
				(*cmds) = (TY125402*) incrSeqV2(&((*cmds))->Sup, sizeof(NimStringDesc*));
				LOC7 = 0;
				LOC7 = (*cmds)->data[(*cmds)->Sup.len]; (*cmds)->data[(*cmds)->Sup.len] = copyStringRC1(compilecmd);
				if (LOC7) nimGCunrefNoCycle(LOC7);
				++(*cmds)->Sup.len;
				memset((void*)(&LOC8), 0, sizeof(LOC8));
				nossplitFile((*it).data, (&LOC8));
				dir = 0;
				dir = LOC8.Field0;
				name = 0;
				name = LOC8.Field1;
				ext = 0;
				ext = LOC8.Field2;
				LOC9 = 0;
				LOC9 = rawNewString(name->Sup.len + 4);
appendString(LOC9, ((NimStringDesc*) &TMP4608));
appendString(LOC9, name);
				(*prettycmds) = (TY125402*) incrSeqV2(&((*prettycmds))->Sup, sizeof(NimStringDesc*));
				LOC10 = 0;
				LOC10 = (*prettycmds)->data[(*prettycmds)->Sup.len]; (*prettycmds)->data[(*prettycmds)->Sup.len] = copyStringRC1(LOC9);
				if (LOC10) nimGCunrefNoCycle(LOC10);
				++(*prettycmds)->Sup.len;
			}
			LA5: ;
			{
				if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 11))&31U)))!=0)) goto LA13;
				add_168487(script, compilecmd);
				add_168487(script, tnl_166618);
			}
			LA13: ;
			it = ((Tstrentry135012*) ((*it).Sup.next));
		} LA2: ;
	}
}

N_NIMCALL(NI, execwithecho_193876)(NimStringDesc* cmd, NU16 msg) {
	NI result;
	result = 0;
	rawmessage_184612(msg, cmd);
	result = nospexecCmd(cmd);
	return result;
}

static N_INLINE(NimStringDesc*, libnametmpl_193494)(void) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(targetos_166603 == ((NU8) 2))) goto LA3;
		result = copyString(((NimStringDesc*) &TMP4620));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP4621));
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getlinkerexe_194271)(NU8 compiler) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(((NI) 0) < (Cc_193413[(compiler)- 1].Field10 ? Cc_193413[(compiler)- 1].Field10->Sup.len : 0))) goto LA3;
		result = copyString(Cc_193413[(compiler)- 1].Field10);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = gmixedmode_193433;
		if (!(LOC6)) goto LA7;
		LOC6 = !((gcmd_159123 == ((NU8) 2)));
		LA7: ;
		if (!LOC6) goto LA8;
		result = copyString(Cc_193413[(compiler)- 1].Field5);
	}
	goto LA1;
	LA8: ;
	{
		result = getcompilerexe_194258(compiler);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, execexternalprogram_193881)(NimStringDesc* cmd, NU16 msg) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = execwithecho_193876(cmd, msg);
		if (!!((LOC3 == ((NI) 0)))) goto LA4;
		rawmessage_184612(((NU16) 69), cmd);
	}
	LA4: ;
}

N_NIMCALL(void, generatescript_193885)(NimStringDesc* projectfile, Ropeobj168006* script) {
	TY118906 LOC1;
	NimStringDesc* dir;
	NimStringDesc* name;
	NimStringDesc* ext;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	nossplitFile(projectfile, (&LOC1));
	dir = 0;
	dir = LOC1.Field0;
	name = 0;
	name = LOC1.Field1;
	ext = 0;
	ext = LOC1.Field2;
	LOC2 = 0;
	LOC2 = rawNewString(name->Sup.len + 8);
appendString(LOC2, ((NimStringDesc*) &TMP4627));
appendString(LOC2, name);
	LOC3 = 0;
	LOC3 = nosaddFileExt(LOC2, Os_166055[(targetos_166603)- 1].Field8);
	LOC4 = 0;
	LOC4 = HEX2F_118665(dir, LOC3);
	writerope_168836(script, LOC4, NIM_FALSE);
}

N_NIMCALL(void, callccompiler_194510)(NimStringDesc* projectfile) {
	TY194724* HEX3Aenv_194731;
	NimStringDesc* linkcmd;
	NimStringDesc* buildgui;
	NimStringDesc* builddll;
	NU8 c;
	Ropeobj168006* script;
	TY194578 prettycb;
	TY194578 LOC5;
	TY194584 runcb;
	TY194584 LOC6;
{	HEX3Aenv_194731 = 0;
	HEX3Aenv_194731 = (TY194724*) newObj((&NTI194723), sizeof(TY194724));
	linkcmd = 0;
	buildgui = 0;
	builddll = 0;
	{
		if (!((gglobaloptions_159121 & 2064) == 16)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	filecounter_193937 = ((NI) 0);
	c = ccompiler_193431;
	script = NIM_NIL;
	if ((*HEX3Aenv_194731).cmds194559) nimGCunrefNoCycle((*HEX3Aenv_194731).cmds194559);
	(*HEX3Aenv_194731).cmds194559 = (TY125402*) newSeqRC1((&NTI125402), 0);
	if ((*HEX3Aenv_194731).prettycmds194576) nimGCunrefNoCycle((*HEX3Aenv_194731).prettycmds194576);
	(*HEX3Aenv_194731).prettycmds194576 = (TY125402*) newSeqRC1((&NTI125402), 0);
	memset((void*)(&prettycb), 0, sizeof(prettycb));
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	LOC5.ClPrc = HEX3Aanonymous_194577; LOC5.ClEnv = HEX3Aenv_194731;
	prettycb.ClEnv = LOC5.ClEnv;
	prettycb.ClPrc = LOC5.ClPrc;
	memset((void*)(&runcb), 0, sizeof(runcb));
	memset((void*)(&LOC6), 0, sizeof(LOC6));
	LOC6.ClPrc = HEX3Aanonymous_194583; LOC6.ClEnv = HEX3Aenv_194731;
	runcb.ClEnv = LOC6.ClEnv;
	runcb.ClPrc = LOC6.ClPrc;
	compilecfile_194433((&tocompile_193507), &script, (&(*HEX3Aenv_194731).cmds194559), (&(*HEX3Aenv_194731).prettycmds194576), NIM_FALSE);
	compilecfile_194433((&externaltocompile_193508), &script, (&(*HEX3Aenv_194731).cmds194559), (&(*HEX3Aenv_194731).prettycmds194576), NIM_TRUE);
	{
		NI res;
		if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 4))&31U)))!=0))) goto LA9;
		{
			if (!(gnumberofprocessors_159131 == ((NI) 0))) goto LA13;
			gnumberofprocessors_159131 = nospcountProcessors();
		}
		LA13: ;
		res = ((NI) 0);
		{
			if (!(gnumberofprocessors_159131 <= ((NI) 1))) goto LA17;
			{
				NI i_194617;
				NI HEX3Atmp_194739;
				NI res_194742;
				i_194617 = 0;
				HEX3Atmp_194739 = 0;
				HEX3Atmp_194739 = ((*HEX3Aenv_194731).cmds194559 ? ((*HEX3Aenv_194731).cmds194559->Sup.len-1) : -1);
				res_194742 = ((NI) 0);
				{
					while (1) {
						if (!(res_194742 <= HEX3Atmp_194739)) goto LA21;
						i_194617 = res_194742;
						res = execwithecho_193876((*HEX3Aenv_194731).cmds194559->data[i_194617], ((NU16) 284));
						{
							if (!!((res == ((NI) 0)))) goto LA24;
							rawmessage_184612(((NU16) 69), (*HEX3Aenv_194731).cmds194559->data[i_194617]);
						}
						LA24: ;
						res_194742 += ((NI) 1);
					} LA21: ;
				}
			}
		}
		goto LA15;
		LA17: ;
		{
			NIM_BOOL LOC27;
			LOC27 = 0;
			LOC27 = ((gglobaloptions_159121 &(1U<<((NU)(((NU8) 3))&31U)))!=0);
			if (LOC27) goto LA28;
			LOC27 = (((NI) 1) < gverbosity_159130);
			LA28: ;
			if (!LOC27) goto LA29;
			res = nospexecProcesses((*HEX3Aenv_194731).cmds194559->data, (*HEX3Aenv_194731).cmds194559->Sup.len, 27, gnumberofprocessors_159131, TMP4618, runcb);
		}
		goto LA15;
		LA29: ;
		{
			if (!(gverbosity_159130 == ((NI) 1))) goto LA32;
			res = nospexecProcesses((*HEX3Aenv_194731).cmds194559->data, (*HEX3Aenv_194731).cmds194559->Sup.len, 26, gnumberofprocessors_159131, prettycb, runcb);
		}
		goto LA15;
		LA32: ;
		{
			res = nospexecProcesses((*HEX3Aenv_194731).cmds194559->data, (*HEX3Aenv_194731).cmds194559->Sup.len, 26, gnumberofprocessors_159131, TMP4618, runcb);
		}
		LA15: ;
		{
			if (!!((res == ((NI) 0)))) goto LA37;
			{
				NimStringDesc* LOC43;
				if (!(gnumberofprocessors_159131 <= ((NI) 1))) goto LA41;
				LOC43 = 0;
				LOC43 = nsuJoin((*HEX3Aenv_194731).cmds194559->data, (*HEX3Aenv_194731).cmds194559->Sup.len);
				rawmessage_184612(((NU16) 69), LOC43);
			}
			LA41: ;
		}
		LA37: ;
	}
	LA9: ;
	{
		Tstrentry135012* it;
		NimStringDesc* objfiles;
		if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 5))&31U)))!=0))) goto LA46;
		it = ((Tstrentry135012*) (tolink_193506.head));
		objfiles = copyString(((NimStringDesc*) &TMP522));
		{
			while (1) {
				NimStringDesc* objfile;
				NimStringDesc* LOC56;
				NimStringDesc* LOC57;
				if (!!((it == NIM_NIL))) goto LA49;
				{
					NIM_BOOL LOC52;
					LOC52 = 0;
					LOC52 = noabsolutepaths_193904();
					if (!LOC52) goto LA53;
					objfile = nosextractFilename((*it).data);
				}
				goto LA50;
				LA53: ;
				{
					objfile = (*it).data;
				}
				LA50: ;
				objfiles = addChar(objfiles, 32);
				LOC56 = 0;
				LOC56 = nosaddFileExt(objfile, Cc_193413[(ccompiler_193431)- 1].Field1);
				LOC57 = 0;
				LOC57 = nospquoteShell(LOC56);
				objfiles = resizeString(objfiles, LOC57->Sup.len + 0);
appendString(objfiles, LOC57);
				it = ((Tstrentry135012*) ((*it).Sup.next));
			} LA49: ;
		}
		{
			NimStringDesc* name;
			TY118906 LOC62;
			TY184781 LOC63;
			NimStringDesc* LOC64;
			if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 9))&31U)))!=0)) goto LA60;
			memset((void*)(&LOC62), 0, sizeof(LOC62));
			nossplitFile(gprojectname_159199, (&LOC62));
			name = LOC62.Field1;
			memset((void*)LOC63, 0, sizeof(LOC63));
			LOC63[0] = copyString(((NimStringDesc*) &TMP4619));
			LOC64 = 0;
			LOC64 = libnametmpl_193494();
			LOC63[1] = nsuFormatSingleElem(LOC64, name);
			LOC63[2] = copyString(((NimStringDesc*) &TMP4622));
			LOC63[3] = copyString(objfiles);
			linkcmd = nsuFormatOpenArray(Cc_193413[(c)- 1].Field9, LOC63, 4);
		}
		goto LA58;
		LA60: ;
		{
			NimStringDesc* linkerexe;
			NimStringDesc* exefile;
			NimStringDesc* linkoptions;
			NimStringDesc* LOC110;
			NimStringDesc* LOC111;
			NimStringDesc* LOC112;
			TY199970 LOC113;
			NimStringDesc* LOC114;
			TY199970 LOC115;
			NimStringDesc* LOC116;
			linkerexe = getconfigvar_193622(c, ((NimStringDesc*) &TMP4623));
			{
				if (!((linkerexe ? linkerexe->Sup.len : 0) == ((NI) 0))) goto LA68;
				linkerexe = getlinkerexe_194271(c);
			}
			LA68: ;
			{
				NIM_BOOL LOC72;
				LOC72 = 0;
				LOC72 = needsexeext_194227();
				if (!LOC72) goto LA73;
				linkerexe = nosaddFileExt(linkerexe, ((NimStringDesc*) &TMP1905));
			}
			LA73: ;
			{
				NIM_BOOL LOC77;
				LOC77 = 0;
				LOC77 = noabsolutepaths_193904();
				if (!LOC77) goto LA78;
				linkcmd = nospquoteShell(linkerexe);
			}
			goto LA75;
			LA78: ;
			{
				NimStringDesc* LOC81;
				LOC81 = 0;
				LOC81 = nosjoinPath(ccompilerpath_193511, linkerexe);
				linkcmd = nospquoteShell(LOC81);
			}
			LA75: ;
			{
				if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 10))&31U)))!=0)) goto LA84;
				buildgui = copyString(Cc_193413[(c)- 1].Field7);
			}
			goto LA82;
			LA84: ;
			{
				buildgui = copyString(((NimStringDesc*) &TMP522));
			}
			LA82: ;
			exefile = 0;
			{
				TY118906 LOC91;
				if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 8))&31U)))!=0)) goto LA89;
				memset((void*)(&LOC91), 0, sizeof(LOC91));
				nossplitFile(projectfile, (&LOC91));
				exefile = nsuFormatSingleElem(Os_166055[(targetos_166603)- 1].Field2, LOC91.Field1);
				builddll = copyString(Cc_193413[(c)- 1].Field8);
			}
			goto LA87;
			LA89: ;
			{
				NimStringDesc* LOC93;
				TY118906 LOC94;
				LOC93 = 0;
				memset((void*)(&LOC94), 0, sizeof(LOC94));
				nossplitFile(projectfile, (&LOC94));
				LOC93 = rawNewString(LOC94.Field1->Sup.len + Os_166055[(targetos_166603)- 1].Field10->Sup.len + 0);
appendString(LOC93, LOC94.Field1);
appendString(LOC93, Os_166055[(targetos_166603)- 1].Field10);
				exefile = LOC93;
				builddll = copyString(((NimStringDesc*) &TMP522));
			}
			LA87: ;
			{
				if (!(((NI) 0) < (outfile_159127 ? outfile_159127->Sup.len : 0))) goto LA97;
				exefile = expandtilde_130801(outfile_159127);
			}
			LA97: ;
			{
				NIM_BOOL LOC101;
				LOC101 = 0;
				LOC101 = noabsolutepaths_193904();
				if (!!(LOC101)) goto LA102;
				{
					NIM_BOOL LOC106;
					TY118906 LOC109;
					LOC106 = 0;
					LOC106 = nosisAbsolute(exefile);
					if (!!(LOC106)) goto LA107;
					memset((void*)(&LOC109), 0, sizeof(LOC109));
					nossplitFile(projectfile, (&LOC109));
					exefile = nosjoinPath(LOC109.Field0, exefile);
				}
				LA107: ;
			}
			LA102: ;
			exefile = nospquoteShell(exefile);
			LOC110 = 0;
			LOC111 = 0;
			LOC111 = getlinkoptions_193994();
			LOC112 = 0;
			LOC112 = getconfigvar_193622(ccompiler_193431, ((NimStringDesc*) &TMP4594));
			LOC110 = rawNewString(LOC111->Sup.len + LOC112->Sup.len + 1);
appendString(LOC110, LOC111);
appendString(LOC110, ((NimStringDesc*) &TMP1894));
appendString(LOC110, LOC112);
			linkoptions = LOC110;
			memset((void*)LOC113, 0, sizeof(LOC113));
			LOC113[0] = copyString(((NimStringDesc*) &TMP4624));
			LOC113[1] = copyString(builddll);
			LOC113[2] = copyString(((NimStringDesc*) &TMP4625));
			LOC113[3] = copyString(buildgui);
			LOC113[4] = copyString(((NimStringDesc*) &TMP1912));
			LOC113[5] = copyString(linkoptions);
			LOC113[6] = copyString(((NimStringDesc*) &TMP4622));
			LOC113[7] = copyString(objfiles);
			LOC113[8] = copyString(((NimStringDesc*) &TMP4626));
			LOC113[9] = copyString(exefile);
			LOC113[10] = copyString(((NimStringDesc*) &TMP1914));
			LOC113[11] = getprefixdir_159295();
			LOC113[12] = copyString(((NimStringDesc*) &TMP1915));
			LOC113[13] = copyString(libpath_159198);
			LOC114 = 0;
			LOC114 = nsuFormatOpenArray(linkcmd, LOC113, 14);
			linkcmd = nospquoteShell(LOC114);
			linkcmd = addChar(linkcmd, 32);
			memset((void*)LOC115, 0, sizeof(LOC115));
			LOC115[0] = copyString(((NimStringDesc*) &TMP4624));
			LOC115[1] = copyString(builddll);
			LOC115[2] = copyString(((NimStringDesc*) &TMP4625));
			LOC115[3] = copyString(buildgui);
			LOC115[4] = copyString(((NimStringDesc*) &TMP1912));
			LOC115[5] = copyString(linkoptions);
			LOC115[6] = copyString(((NimStringDesc*) &TMP4622));
			LOC115[7] = copyString(objfiles);
			LOC115[8] = copyString(((NimStringDesc*) &TMP4626));
			LOC115[9] = copyString(exefile);
			LOC115[10] = copyString(((NimStringDesc*) &TMP1914));
			LOC116 = 0;
			LOC116 = getprefixdir_159295();
			LOC115[11] = nospquoteShell(LOC116);
			LOC115[12] = copyString(((NimStringDesc*) &TMP1915));
			LOC115[13] = nospquoteShell(libpath_159198);
			nsuAddf((&linkcmd), Cc_193413[(c)- 1].Field11, LOC115, 14);
		}
		LA58: ;
		{
			NU16 LOC121;
			if (!!(((gglobaloptions_159121 &(1U<<((NU)(((NU8) 4))&31U)))!=0))) goto LA119;
			LOC121 = 0;
			{
				if (!(((NI) 1) < gverbosity_159130)) goto LA124;
				LOC121 = ((NU16) 284);
			}
			goto LA122;
			LA124: ;
			{
				LOC121 = ((NU16) 285);
			}
			LA122: ;
			execexternalprogram_193881(linkcmd, LOC121);
		}
		LA119: ;
	}
	goto LA44;
	LA46: ;
	{
		linkcmd = copyString(((NimStringDesc*) &TMP522));
	}
	LA44: ;
	{
		if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 11))&31U)))!=0)) goto LA130;
		add_168487(&script, linkcmd);
		add_168487(&script, tnl_166618);
		generatescript_193885(projectfile, script);
	}
	LA130: ;
	}BeforeRet: ;
}

N_NIMCALL(void, resetcompilationlists_193867)(void) {
	initlinkedlist_135028((&tocompile_193507));
	initlinkedlist_135028((&externaltocompile_193508));
	initlinkedlist_135028((&tolink_193506));
}
NIM_EXTERNC N_NOINLINE(void, compiler_extccompInit000)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	ccompiler_193431 = ((NU8) 1);
	cassembler_193432 = ((NU8) 0);
	if (cincludes_193451) nimGCunrefNoCycle(cincludes_193451);
	cincludes_193451 = (TY125402*) newSeqRC1((&NTI125402), 0);
	if (clibs_193469) nimGCunrefNoCycle(clibs_193469);
	clibs_193469 = (TY125402*) newSeqRC1((&NTI125402), 0);
	if (clinkedlibs_193487) nimGCunrefNoCycle(clinkedlibs_193487);
	clinkedlibs_193487 = (TY125402*) newSeqRC1((&NTI125402), 0);
	LOC1 = 0;
	LOC1 = linkoptions_193509; linkoptions_193509 = copyStringRC1(((NimStringDesc*) &TMP522));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = compileoptions_193510; compileoptions_193510 = copyStringRC1(((NimStringDesc*) &TMP522));
	if (LOC2) nimGCunrefNoCycle(LOC2);
	LOC3 = 0;
	LOC3 = ccompilerpath_193511; ccompilerpath_193511 = copyStringRC1(((NimStringDesc*) &TMP522));
	if (LOC3) nimGCunrefNoCycle(LOC3);
}

NIM_EXTERNC N_NOINLINE(void, compiler_extccompDatInit000)(void) {
static TNimNode* TMP4602[3];
static TNimNode TMP516[4];
NTI194724.size = sizeof(TY194724);
NTI194724.kind = 18;
NTI194724.base = 0;
NTI194724.flags = 2;
TMP4602[0] = &TMP516[1];
TMP516[1].kind = 1;
TMP516[1].offset = offsetof(TY194724, HEX3Astate);
TMP516[1].typ = (&NTI324021);
TMP516[1].name = ":state";
TMP4602[1] = &TMP516[2];
TMP516[2].kind = 1;
TMP516[2].offset = offsetof(TY194724, prettycmds194576);
TMP516[2].typ = (&NTI125402);
TMP516[2].name = "prettyCmds194576";
TMP4602[2] = &TMP516[3];
TMP516[3].kind = 1;
TMP516[3].offset = offsetof(TY194724, cmds194559);
TMP516[3].typ = (&NTI125402);
TMP516[3].name = "cmds194559";
TMP516[0].len = 3; TMP516[0].kind = 2; TMP516[0].sons = &TMP4602[0];
NTI194724.node = &TMP516[0];
NTI194723.size = sizeof(TY194724*);
NTI194723.kind = 22;
NTI194723.base = (&NTI194724);
NTI194723.flags = 2;
NTI194723.marker = TMP4603;
}

