/* Generated by Nim Compiler v0.11.2 */
/*   (c) 2015 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct TY122008 TY122008;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tcell46346 Tcell46346;
typedef struct Tcellseq46362 Tcellseq46362;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellset46358 Tcellset46358;
typedef struct Tpagedesc46354 Tpagedesc46354;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Tlinkedlist130028 Tlinkedlist130028;
typedef struct Tlistentry130022 Tlistentry130022;
typedef struct Tinfoos160049 Tinfoos160049;
typedef struct Tinfocpu160479 Tinfocpu160479;
typedef struct Tinfocc171011 Tinfocc171011;
typedef struct TY119589 TY119589;
typedef struct Ropeobj162009 Ropeobj162009;
typedef struct Tstrentry130024 Tstrentry130024;
typedef struct TNimObject TNimObject;
typedef struct TY172805 TY172805;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Tcell46346  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46362  {
NI len;
NI cap;
Tcell46346** d;
};
struct  Tcellset46358  {
NI counter;
NI max;
Tpagedesc46354* head;
Tpagedesc46354** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46362 zct;
Tcellseq46362 decstack;
Tcellset46358 cycleroots;
Tcellseq46362 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
struct  Tlinkedlist130028  {
Tlistentry130022* head;
Tlistentry130022* tail;
NI counter;
};
struct Tinfoos160049 {
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 Tinfoos160049 TY160071[24];
struct Tinfocpu160479 {
NimStringDesc* Field0;
NI Field1;
NU8 Field2;
NI Field3;
NI Field4;
};
typedef Tinfocpu160479 TY160497[14];
struct Tinfocc171011 {
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 Tinfocc171011 TY171435[12];
struct TY119589 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
typedef NimStringDesc* TY155965[2];
typedef NimStringDesc* TY172383[14];
typedef NimStringDesc* TY165566[1];
typedef Ropeobj162009* TY162572[1];
struct  TNimObject  {
TNimType* m_type;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Tstrentry130024  {
  Tlistentry130022 Sup;
NimStringDesc* data;
};
struct  TY172805  {
NI HEX3Astate;
TY122008* prettycmds172640;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (NI idx, void* ClEnv);
void* ClEnv;
} TY172642;
typedef NimStringDesc* TY219714[1];
typedef NimStringDesc* TY165825[4];
typedef NI TY27420[16];
struct  Tpagedesc46354  {
Tpagedesc46354* next;
NI key;
TY27420 bits;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
typedef Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Ropeobj162009  {
  TNimObject Sup;
Ropeobj162009* left;
Ropeobj162009* right;
NI length;
NimStringDesc* data;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct TY122008 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Tcell46346*, usrtocell_49846)(void* usr);
static N_INLINE(void, rtladdzct_51404)(Tcell46346* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46362* s, Tcell46346* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(NIM_BOOL, externalfilechanged_172421)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, togeneratedfile_155958)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_155944)(NimStringDesc* path);
N_NIMCALL(NI32, footprint_172411)(NimStringDesc* filename);
N_NIMCALL(NI32, HEX3EHEX3C_170540)(NI32 c, NimStringDesc* s);
N_NIMCALL(NI32, crcfromfile_170051)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, getcompilecfilecmd_172336)(NimStringDesc* cfilename, NIM_BOOL isexternal);
N_NIMCALL(NimStringDesc*, cfilespecificoptions_172097)(NimStringDesc* cfilename);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY119589* Result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NIM_BOOL, existsconfigvar_155324)(NimStringDesc* key);
N_NIMCALL(void, addopt_171845)(NimStringDesc** dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, getconfigvar_155334)(NimStringDesc* key);
N_NIMCALL(NimStringDesc*, getdebug_172018)(NU8 c);
N_NIMCALL(NimStringDesc*, getconfigvar_171646)(NU8 c, NimStringDesc* suffix);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, getoptspeed_172008)(NU8 c);
N_NIMCALL(NimStringDesc*, getoptsize_172028)(NU8 c);
N_NIMCALL(NimStringDesc*, getcompilerexe_172298)(NU8 compiler);
N_NIMCALL(void, rawmessage_165960)(NU16 msg, NimStringDesc* arg);
static N_INLINE(NIM_BOOL, needsexeext_172261)(void);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
static N_INLINE(NIM_BOOL, noabsolutepaths_172038)(void);
N_NIMCALL(NimStringDesc*, nospquoteShell)(NimStringDesc* s);
N_NIMCALL(void, add_172085)(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_171923)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, completecfilepath_171912)(NimStringDesc* cfile, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_156001)(NimStringDesc* f, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getprefixdir_155365)(void);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, nsuAddf)(NimStringDesc** s, NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NIM_BOOL, open_13203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_13481)(FILE* f, NimStringDesc** line);
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
static N_INLINE(void, writeln_156205)(FILE* f, NimStringDesc** x, NI xLen0);
N_NIMCALL(void, write_13457)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, appendstr_130268)(Tlinkedlist130028* list, NimStringDesc* data);
N_NIMCALL(void, prependstr_130419)(Tlinkedlist130028* list, NimStringDesc* data);
N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start);
N_NIMCALL(NU8, nametocc_171551)(NimStringDesc* name);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, undefsymbol_169022)(NimStringDesc* symbol);
N_NIMCALL(void, definesymbol_169013)(NimStringDesc* symbol);
N_NIMCALL(void, addcompileoption_171866)(NimStringDesc* option);
N_NIMCALL(Ropeobj162009*, rope_162320)(NimStringDesc* s);
N_NIMCALL(void, add_162534)(Ropeobj162009** a, Ropeobj162009* b);
N_NIMCALL(Ropeobj162009*, genmappingfiles_172834)(Tlinkedlist130028 list);
N_NIMCALL(void, addf_163635)(Ropeobj162009** c, NimStringDesc* frmt, Ropeobj162009** args, NI argsLen0);
N_NIMCALL(void, add_162545)(Ropeobj162009** a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, getcompileoptions_172149)(void);
N_NIMCALL(NimStringDesc*, getlinkoptions_172158)(void);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, writerope_163105)(Ropeobj162009* head, NimStringDesc* filename, NIM_BOOL usewarning);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP4337)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_CLOSURE(void, HEX3Aanonymous_172641)(NI idx, void* ClEnv);
N_NIMCALL(void, compilecfile_172485)(Tlinkedlist130028 list, Ropeobj162009** script, TY122008** cmds, TY122008** prettycmds, NIM_BOOL isexternal);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NI, nospcountProcessors)(void);
N_NIMCALL(NI, execwithecho_171964)(NimStringDesc* cmd, NimStringDesc* prettycmd);
N_NIMCALL(void, msgwriteln_165536)(NimStringDesc* s);
N_NIMCALL(NI, nospexecCmd)(NimStringDesc* command);
N_NIMCALL(void, rawmessage_165888)(NU16 msg, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NI, nospexecProcesses)(NimStringDesc** cmds, NI cmdsLen0, NU8 options_144793, NI n, TY172642 beforerunevent);
static N_INLINE(NimStringDesc*, libnametmpl_171518)(void);
N_NIMCALL(NimStringDesc*, getlinkerexe_172317)(NU8 compiler);
N_NIMCALL(NimStringDesc*, expandtilde_127610)(NimStringDesc* path);
N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringDesc* path);
N_NIMCALL(void, execexternalprogram_171985)(NimStringDesc* cmd, NimStringDesc* prettycmd);
N_NIMCALL(void, generatescript_171995)(NimStringDesc* projectfile, Ropeobj162009* script);
N_NIMCALL(NimStringDesc*, HEX2F_119292)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(void, initlinkedlist_130043)(Tlinkedlist130028* list);
STRING_LITERAL(TMP446, "", 0);
STRING_LITERAL(TMP1663, "crc", 3);
extern NIM_CONST TY160071 Os_160070;
extern NIM_CONST TY160497 Cpu_160496;
STRING_LITERAL(TMP1664, "gcc", 3);
STRING_LITERAL(TMP1665, "o", 1);
STRING_LITERAL(TMP1666, " -O3 -ffast-math ", 17);
STRING_LITERAL(TMP1667, " -Os -ffast-math ", 17);
STRING_LITERAL(TMP1668, "g++", 3);
STRING_LITERAL(TMP1669, "-c $options $include -o $objfile $file", 38);
STRING_LITERAL(TMP1670, " -mwindows", 10);
STRING_LITERAL(TMP1671, " -shared", 8);
STRING_LITERAL(TMP1672, "ar rcs $libfile $objfiles", 25);
STRING_LITERAL(TMP1673, "$buildgui $builddll -o $exefile $objfiles $options", 50);
STRING_LITERAL(TMP1674, " -I", 3);
STRING_LITERAL(TMP1675, " -L", 3);
STRING_LITERAL(TMP1676, " -l$1", 5);
STRING_LITERAL(TMP1677, "-fPIC", 5);
STRING_LITERAL(TMP1678, "asm($1);$n", 10);
STRING_LITERAL(TMP1679, "$1 $3 $2 ", 9);
STRING_LITERAL(TMP1680, "__attribute__((__packed__))", 27);
STRING_LITERAL(TMP1681, "llvm_gcc", 8);
STRING_LITERAL(TMP1682, "llvm-gcc", 8);
STRING_LITERAL(TMP1683, "llvm-g++", 8);
STRING_LITERAL(TMP1684, "llvm-ar rcs $libfile $objfiles", 30);
STRING_LITERAL(TMP1685, "clang", 5);
STRING_LITERAL(TMP1686, "clang++", 7);
STRING_LITERAL(TMP1687, "lcc", 3);
STRING_LITERAL(TMP1688, "obj", 3);
STRING_LITERAL(TMP1689, " -O -p6 ", 8);
STRING_LITERAL(TMP1690, "$options $include -Fo$objfile $file", 35);
STRING_LITERAL(TMP1691, " -subsystem windows", 19);
STRING_LITERAL(TMP1692, " -dll", 5);
STRING_LITERAL(TMP1693, "lcclnk", 6);
STRING_LITERAL(TMP1694, "$options $buildgui $builddll -O $exefile $objfiles", 50);
STRING_LITERAL(TMP1695, " -g5 ", 5);
STRING_LITERAL(TMP1696, "_asm{$n$1$n}$n", 14);
STRING_LITERAL(TMP1697, "$1 $2", 5);
STRING_LITERAL(TMP1698, "bcc", 3);
STRING_LITERAL(TMP1699, " -O2 -6 ", 8);
STRING_LITERAL(TMP1700, " -O1 -6 ", 8);
STRING_LITERAL(TMP1701, "bcc32", 5);
STRING_LITERAL(TMP1702, "-c $options $include -o$objfile $file", 37);
STRING_LITERAL(TMP1703, " -tW", 4);
STRING_LITERAL(TMP1704, " -tWD", 5);
STRING_LITERAL(TMP1705, "$options $buildgui $builddll -e$exefile $objfiles", 49);
STRING_LITERAL(TMP1706, "__asm{$n$1$n}$n", 15);
STRING_LITERAL(TMP1707, "dmc", 3);
STRING_LITERAL(TMP1708, " -ff -o -6 ", 11);
STRING_LITERAL(TMP1709, " -L/exet:nt/su:windows", 22);
STRING_LITERAL(TMP1710, " -WD", 4);
STRING_LITERAL(TMP1711, "$options $buildgui $builddll -o$exefile $objfiles", 49);
STRING_LITERAL(TMP1712, " -g ", 4);
STRING_LITERAL(TMP1713, "$3$n$1 $2", 9);
STRING_LITERAL(TMP1714, "#pragma pack(1)", 15);
STRING_LITERAL(TMP1715, "wcc", 3);
STRING_LITERAL(TMP1716, " -ox -on -6 -d0 -fp6 -zW ", 25);
STRING_LITERAL(TMP1717, "wcl386", 6);
STRING_LITERAL(TMP1718, "-c $options $include -fo=$objfile $file", 39);
STRING_LITERAL(TMP1719, " -bw", 4);
STRING_LITERAL(TMP1720, " -bd", 4);
STRING_LITERAL(TMP1721, "$options $buildgui $builddll -fe=$exefile $objfiles ", 52);
STRING_LITERAL(TMP1722, " -i=", 4);
STRING_LITERAL(TMP1723, " -d2 ", 5);
STRING_LITERAL(TMP1724, "vcc", 3);
STRING_LITERAL(TMP1725, " /Ogityb2 /G7 /arch:SSE2 ", 25);
STRING_LITERAL(TMP1726, " /O1 /G7 ", 9);
STRING_LITERAL(TMP1727, "cl", 2);
STRING_LITERAL(TMP1728, "/c $options $include /Fo$objfile $file", 38);
STRING_LITERAL(TMP1729, " /link /SUBSYSTEM:WINDOWS ", 26);
STRING_LITERAL(TMP1730, " /LD", 4);
STRING_LITERAL(TMP1731, "lib /OUT:$libfile $objfiles", 27);
STRING_LITERAL(TMP1732, "$options $builddll /Fe$exefile $objfiles $buildgui", 50);
STRING_LITERAL(TMP1733, " /I", 3);
STRING_LITERAL(TMP1734, " /LIBPATH:", 10);
STRING_LITERAL(TMP1735, " $1.lib", 7);
STRING_LITERAL(TMP1736, " /GZ /Zi ", 9);
STRING_LITERAL(TMP1737, "tcc", 3);
STRING_LITERAL(TMP1738, "UNAVAILABLE!", 12);
STRING_LITERAL(TMP1739, "-o $exefile $options $buildgui $builddll $objfiles", 50);
STRING_LITERAL(TMP1740, "pcc", 3);
STRING_LITERAL(TMP1741, " -Ox ", 5);
STRING_LITERAL(TMP1742, " -Os ", 5);
STRING_LITERAL(TMP1743, "cc", 2);
STRING_LITERAL(TMP1744, "-c $options $include -Fo$objfile $file", 38);
STRING_LITERAL(TMP1745, " -SUBSYSTEM:WINDOWS", 19);
STRING_LITERAL(TMP1746, " -DLL", 5);
STRING_LITERAL(TMP1747, "$options $buildgui $builddll -OUT:$exefile $objfiles", 52);
STRING_LITERAL(TMP1748, " -Zi ", 5);
STRING_LITERAL(TMP1749, "ucc", 3);
STRING_LITERAL(TMP1750, " -O3 ", 5);
STRING_LITERAL(TMP1751, " -O1 ", 5);
STRING_LITERAL(TMP1752, " -shared ", 9);
STRING_LITERAL(TMP1753, "-o $exefile $buildgui $builddll $objfiles $options", 50);
STRING_LITERAL(TMP1754, "icl", 3);
NIM_CONST TY171435 Cc_171434 = {{((NimStringDesc*) &TMP1664),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP1666),
((NimStringDesc*) &TMP1667),
((NimStringDesc*) &TMP1664),
((NimStringDesc*) &TMP1668),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP1670),
((NimStringDesc*) &TMP1671),
((NimStringDesc*) &TMP1672),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1673),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP1675),
((NimStringDesc*) &TMP1676),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1677),
((NimStringDesc*) &TMP1678),
((NimStringDesc*) &TMP1679),
((NimStringDesc*) &TMP1680),
183}
,
{((NimStringDesc*) &TMP1681),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP1666),
((NimStringDesc*) &TMP1667),
((NimStringDesc*) &TMP1682),
((NimStringDesc*) &TMP1683),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP1670),
((NimStringDesc*) &TMP1671),
((NimStringDesc*) &TMP1684),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1673),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP1675),
((NimStringDesc*) &TMP1676),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1677),
((NimStringDesc*) &TMP1678),
((NimStringDesc*) &TMP1679),
((NimStringDesc*) &TMP1680),
183}
,
{((NimStringDesc*) &TMP1685),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP1666),
((NimStringDesc*) &TMP1667),
((NimStringDesc*) &TMP1685),
((NimStringDesc*) &TMP1686),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP1670),
((NimStringDesc*) &TMP1671),
((NimStringDesc*) &TMP1684),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1673),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP1675),
((NimStringDesc*) &TMP1676),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1677),
((NimStringDesc*) &TMP1678),
((NimStringDesc*) &TMP1679),
((NimStringDesc*) &TMP1680),
183}
,
{((NimStringDesc*) &TMP1687),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1689),
((NimStringDesc*) &TMP1689),
((NimStringDesc*) &TMP1687),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1690),
((NimStringDesc*) &TMP1691),
((NimStringDesc*) &TMP1692),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1693),
((NimStringDesc*) &TMP1694),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1695),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1696),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
0}
,
{((NimStringDesc*) &TMP1698),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1699),
((NimStringDesc*) &TMP1700),
((NimStringDesc*) &TMP1701),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1702),
((NimStringDesc*) &TMP1703),
((NimStringDesc*) &TMP1704),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1701),
((NimStringDesc*) &TMP1705),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
4}
,
{((NimStringDesc*) &TMP1707),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1708),
((NimStringDesc*) &TMP1708),
((NimStringDesc*) &TMP1707),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1702),
((NimStringDesc*) &TMP1709),
((NimStringDesc*) &TMP1710),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1707),
((NimStringDesc*) &TMP1711),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1712),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1713),
((NimStringDesc*) &TMP1714),
4}
,
{((NimStringDesc*) &TMP1715),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1716),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1717),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1718),
((NimStringDesc*) &TMP1719),
((NimStringDesc*) &TMP1720),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1717),
((NimStringDesc*) &TMP1721),
((NimStringDesc*) &TMP1722),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1723),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
4}
,
{((NimStringDesc*) &TMP1724),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1725),
((NimStringDesc*) &TMP1726),
((NimStringDesc*) &TMP1727),
((NimStringDesc*) &TMP1727),
((NimStringDesc*) &TMP1728),
((NimStringDesc*) &TMP1729),
((NimStringDesc*) &TMP1730),
((NimStringDesc*) &TMP1731),
((NimStringDesc*) &TMP1727),
((NimStringDesc*) &TMP1732),
((NimStringDesc*) &TMP1733),
((NimStringDesc*) &TMP1734),
((NimStringDesc*) &TMP1735),
((NimStringDesc*) &TMP1736),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1713),
((NimStringDesc*) &TMP1714),
76}
,
{((NimStringDesc*) &TMP1737),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1737),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP1738),
((NimStringDesc*) &TMP1671),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1737),
((NimStringDesc*) &TMP1739),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1712),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
3}
,
{((NimStringDesc*) &TMP1740),
((NimStringDesc*) &TMP1688),
((NimStringDesc*) &TMP1741),
((NimStringDesc*) &TMP1742),
((NimStringDesc*) &TMP1743),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1744),
((NimStringDesc*) &TMP1745),
((NimStringDesc*) &TMP1746),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1743),
((NimStringDesc*) &TMP1747),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1748),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
0}
,
{((NimStringDesc*) &TMP1749),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP1750),
((NimStringDesc*) &TMP1751),
((NimStringDesc*) &TMP1743),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1752),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1743),
((NimStringDesc*) &TMP1753),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1706),
((NimStringDesc*) &TMP1697),
((NimStringDesc*) &TMP446),
0}
,
{((NimStringDesc*) &TMP1754),
((NimStringDesc*) &TMP1665),
((NimStringDesc*) &TMP1666),
((NimStringDesc*) &TMP1667),
((NimStringDesc*) &TMP1754),
((NimStringDesc*) &TMP1668),
((NimStringDesc*) &TMP1669),
((NimStringDesc*) &TMP1670),
((NimStringDesc*) &TMP1671),
((NimStringDesc*) &TMP1672),
((NimStringDesc*) &TMP1754),
((NimStringDesc*) &TMP1673),
((NimStringDesc*) &TMP1674),
((NimStringDesc*) &TMP1675),
((NimStringDesc*) &TMP1676),
((NimStringDesc*) &TMP446),
((NimStringDesc*) &TMP1677),
((NimStringDesc*) &TMP1678),
((NimStringDesc*) &TMP1679),
((NimStringDesc*) &TMP1680),
183}
}
;
STRING_LITERAL(TMP1755, ".debug", 6);
STRING_LITERAL(TMP1756, " ", 1);
STRING_LITERAL(TMP1757, ".cpp", 4);
STRING_LITERAL(TMP1758, ".objc", 5);
STRING_LITERAL(TMP1759, ".js", 3);
STRING_LITERAL(TMP1760, ".options.debug", 14);
STRING_LITERAL(TMP1761, ".speed", 6);
STRING_LITERAL(TMP1762, ".options.speed", 14);
STRING_LITERAL(TMP1763, ".size", 5);
STRING_LITERAL(TMP1764, ".options.size", 13);
STRING_LITERAL(TMP1765, ".always", 7);
STRING_LITERAL(TMP1766, ".exe", 4);
STRING_LITERAL(TMP1767, "exe", 3);
STRING_LITERAL(TMP1772, "file", 4);
STRING_LITERAL(TMP1773, "objfile", 7);
STRING_LITERAL(TMP1774, "options", 7);
STRING_LITERAL(TMP1775, "include", 7);
STRING_LITERAL(TMP1776, "nim", 3);
STRING_LITERAL(TMP1777, "lib", 3);
STRING_LITERAL(TMP1778, "0", 1);
STRING_LITERAL(TMP1779, "\012", 1);
STRING_LITERAL(TMP1861, ".options.always", 15);
STRING_LITERAL(TMP1862, ".path", 5);
STRING_LITERAL(TMP4322, "[C_Files]\012", 10);
STRING_LITERAL(TMP4323, "--file:r\"$1\"$N", 14);
STRING_LITERAL(TMP4324, "\012[C_Compiler]\012Flags=", 20);
STRING_LITERAL(TMP4325, "__dummy__", 9);
STRING_LITERAL(TMP4326, "\"", 1);
STRING_LITERAL(TMP4327, "\012[Linker]\012Flags=", 16);
STRING_LITERAL(TMP4328, ".options.linker", 15);
STRING_LITERAL(TMP4329, "\012[Environment]\012libpath=", 23);
STRING_LITERAL(TMP4330, "\012[Symbols]$n$1", 14);
STRING_LITERAL(TMP4331, "mapping.txt", 11);
STRING_LITERAL(TMP4338, "CC: ", 4);
static NIM_CONST TY172642 TMP4345 = {NIM_NIL,NIM_NIL};
STRING_LITERAL(TMP4346, " execution of an external program failed; rerun with --parallel"
"Build:1 to see the error message", 95);
STRING_LITERAL(TMP4347, "libfile", 7);
STRING_LITERAL(TMP4348, "$1.lib", 6);
STRING_LITERAL(TMP4349, "lib$1.a", 7);
STRING_LITERAL(TMP4350, "objfiles", 8);
STRING_LITERAL(TMP4351, ".linkerexe", 10);
STRING_LITERAL(TMP4352, "builddll", 8);
STRING_LITERAL(TMP4353, "buildgui", 8);
STRING_LITERAL(TMP4354, "exefile", 7);
STRING_LITERAL(TMP4355, "[Linking]", 9);
STRING_LITERAL(TMP4356, "compile_", 8);
NU8 ccompiler_171455;
NIM_BOOL gmixedmode_171456;
TY122008* cincludes_171474;
extern TNimType NTI122008; /* seq[string] */
extern Tgcheap48216 gch_48244;
TY122008* clibs_171492;
TY122008* clinkedlibs_171510;
Tlinkedlist130028 tolink_171536;
Tlinkedlist130028 tocompile_171537;
Tlinkedlist130028 externaltocompile_171538;
NimStringDesc* linkoptions_171539;
NimStringDesc* compileoptions_171540;
NimStringDesc* ccompilerpath_171541;
NI filecounter_172080;
extern NU32 gglobaloptions_155128;
extern NU8 gcmd_155130;
extern NU8 targetos_160602;
extern NU8 targetcpu_160600;
extern NU8 hostos_160603;
extern NU8 hostcpu_160601;
extern NU32 goptions_155126;
extern NimStringDesc* libpath_155233;
extern NimStringDesc* gprojectpath_155235;
TNimType NTI172805; /* object */
extern TNimType NTI311033; /* range -1..0(int) */
TNimType NTI172830; /* ref object */
extern NimStringDesc* tnl_160626;
extern NI gnumberofprocessors_155138;
extern NI gverbosity_155137;
extern NimStringDesc* gprojectname_155234;
extern NimStringDesc* outfile_155134;

static N_INLINE(Tcell46346*, usrtocell_49846)(void* usr) {
	Tcell46346* result;
	result = 0;
	result = ((Tcell46346*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(Tcell46346))))));
	return result;
}

static N_INLINE(void, rtladdzct_51404)(Tcell46346* c) {
	addzct_49817((&gch_48244.zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Tcell46346* c;
	c = usrtocell_49846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(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(void, addopt_171845)(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*) &TMP1756));
	}
	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_171646)(NU8 c, NimStringDesc* suffix) {
	NimStringDesc* result;
	NimStringDesc* fullsuffix;
	result = 0;
	{
		NimStringDesc* LOC5;
		if (!(gcmd_155130 == ((NU8) 2))) goto LA3;
		LOC5 = 0;
		LOC5 = rawNewString(suffix->Sup.len + 4);
appendString(LOC5, ((NimStringDesc*) &TMP1757));
appendString(LOC5, suffix);
		fullsuffix = LOC5;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC9;
		if (!(gcmd_155130 == ((NU8) 3))) goto LA7;
		LOC9 = 0;
		LOC9 = rawNewString(suffix->Sup.len + 5);
appendString(LOC9, ((NimStringDesc*) &TMP1758));
appendString(LOC9, suffix);
		fullsuffix = LOC9;
	}
	goto LA1;
	LA7: ;
	{
		NimStringDesc* LOC13;
		if (!(gcmd_155130 == ((NU8) 4))) goto LA11;
		LOC13 = 0;
		LOC13 = rawNewString(suffix->Sup.len + 3);
appendString(LOC13, ((NimStringDesc*) &TMP1759));
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_160603 == targetos_160602));
		if (LOC18) goto LA19;
		LOC18 = !((hostcpu_160601 == targetcpu_160600));
		LA19: ;
		LOC17 = LOC18;
		if (!(LOC17)) goto LA20;
		LOC17 = !(((gglobaloptions_155128 &(1<<((((NU8) 4))&31)))!=0));
		LA20: ;
		if (!LOC17) goto LA21;
		LOC23 = 0;
		LOC23 = rawNewString(Cpu_160496[(targetcpu_160600)- 1].Field0->Sup.len + Os_160070[(targetos_160602)- 1].Field0->Sup.len + Cc_171434[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 2);
appendString(LOC23, Cpu_160496[(targetcpu_160600)- 1].Field0);
appendChar(LOC23, 46);
appendString(LOC23, Os_160070[(targetos_160602)- 1].Field0);
appendChar(LOC23, 46);
appendString(LOC23, Cc_171434[(c)- 1].Field0);
appendString(LOC23, fullsuffix);
		fullccname = LOC23;
		result = getconfigvar_155334(fullccname);
		{
			NimStringDesc* LOC28;
			if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA26;
			LOC28 = 0;
			LOC28 = rawNewString(Cc_171434[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 0);
appendString(LOC28, Cc_171434[(c)- 1].Field0);
appendString(LOC28, fullsuffix);
			result = getconfigvar_155334(LOC28);
		}
		LA26: ;
	}
	goto LA15;
	LA21: ;
	{
		NimStringDesc* LOC30;
		LOC30 = 0;
		LOC30 = rawNewString(Cc_171434[(c)- 1].Field0->Sup.len + fullsuffix->Sup.len + 0);
appendString(LOC30, Cc_171434[(c)- 1].Field0);
appendString(LOC30, fullsuffix);
		result = getconfigvar_155334(LOC30);
	}
	LA15: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdebug_172018)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_171646(c, ((NimStringDesc*) &TMP1760));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_171434[(c)- 1].Field15);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptspeed_172008)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_171646(c, ((NimStringDesc*) &TMP1762));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_171434[(c)- 1].Field2);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptsize_172028)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_171646(c, ((NimStringDesc*) &TMP1764));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(Cc_171434[(c)- 1].Field3);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, cfilespecificoptions_172097)(NimStringDesc* cfilename) {
	NimStringDesc* result;
	NimStringDesc* trunk;
	TY119589 LOC1;
	NimStringDesc* key;
	NimStringDesc* LOC40;
	result = 0;
	result = copyString(compileoptions_171540);
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	nossplitFile(cfilename, (&LOC1));
	trunk = copyString(LOC1.Field1);
	{
		NimStringDesc* key;
		NimStringDesc* LOC6;
		if (!((gglobaloptions_155128 &(1<<((((NU8) 7))&31)))!=0)) goto LA4;
		LOC6 = 0;
		LOC6 = rawNewString(trunk->Sup.len + 6);
appendString(LOC6, trunk);
appendString(LOC6, ((NimStringDesc*) &TMP1755));
		key = LOC6;
		{
			NIM_BOOL LOC9;
			NimStringDesc* LOC12;
			LOC9 = 0;
			LOC9 = existsconfigvar_155324(key);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = getconfigvar_155334(key);
			addopt_171845((&result), LOC12);
		}
		goto LA7;
		LA10: ;
		{
			NimStringDesc* LOC14;
			LOC14 = 0;
			LOC14 = getdebug_172018(ccompiler_171455);
			addopt_171845((&result), LOC14);
		}
		LA7: ;
	}
	LA4: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC19;
		if (!((goptions_155126 &(1<<((((NU8) 13))&31)))!=0)) goto LA17;
		LOC19 = 0;
		LOC19 = rawNewString(trunk->Sup.len + 6);
appendString(LOC19, trunk);
appendString(LOC19, ((NimStringDesc*) &TMP1761));
		key = LOC19;
		{
			NIM_BOOL LOC22;
			NimStringDesc* LOC25;
			LOC22 = 0;
			LOC22 = existsconfigvar_155324(key);
			if (!LOC22) goto LA23;
			LOC25 = 0;
			LOC25 = getconfigvar_155334(key);
			addopt_171845((&result), LOC25);
		}
		goto LA20;
		LA23: ;
		{
			NimStringDesc* LOC27;
			LOC27 = 0;
			LOC27 = getoptspeed_172008(ccompiler_171455);
			addopt_171845((&result), LOC27);
		}
		LA20: ;
	}
	goto LA15;
	LA17: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC31;
		if (!((goptions_155126 &(1<<((((NU8) 14))&31)))!=0)) goto LA29;
		LOC31 = 0;
		LOC31 = rawNewString(trunk->Sup.len + 5);
appendString(LOC31, trunk);
appendString(LOC31, ((NimStringDesc*) &TMP1763));
		key = LOC31;
		{
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC34 = 0;
			LOC34 = existsconfigvar_155324(key);
			if (!LOC34) goto LA35;
			LOC37 = 0;
			LOC37 = getconfigvar_155334(key);
			addopt_171845((&result), LOC37);
		}
		goto LA32;
		LA35: ;
		{
			NimStringDesc* LOC39;
			LOC39 = 0;
			LOC39 = getoptsize_172028(ccompiler_171455);
			addopt_171845((&result), LOC39);
		}
		LA32: ;
	}
	goto LA15;
	LA29: ;
	LA15: ;
	LOC40 = 0;
	LOC40 = rawNewString(trunk->Sup.len + 7);
appendString(LOC40, trunk);
appendString(LOC40, ((NimStringDesc*) &TMP1765));
	key = LOC40;
	{
		NIM_BOOL LOC43;
		NimStringDesc* LOC46;
		LOC43 = 0;
		LOC43 = existsconfigvar_155324(key);
		if (!LOC43) goto LA44;
		LOC46 = 0;
		LOC46 = getconfigvar_155334(key);
		addopt_171845((&result), LOC46);
	}
	LA44: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getcompilerexe_172298)(NU8 compiler) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(gcmd_155130 == ((NU8) 2))) goto LA3;
		result = copyString(Cc_171434[(compiler)- 1].Field5);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(Cc_171434[(compiler)- 1].Field4);
	}
	LA1: ;
	{
		if (!((result ? result->Sup.len : 0) == ((NI) 0))) goto LA8;
		rawmessage_165960(((NU16) 228), Cc_171434[(compiler)- 1].Field0);
	}
	LA8: ;
	return result;
}

static N_INLINE(NIM_BOOL, needsexeext_172261)(void) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((gglobaloptions_155128 &(1<<((((NU8) 11))&31)))!=0);
	if (!(LOC2)) goto LA3;
	LOC2 = (targetos_160602 == ((NU8) 2));
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = (hostos_160603 == ((NU8) 2));
	LA4: ;
	result = LOC1;
	return result;
}

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

N_NIMCALL(void, add_172085)(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_171923)(NimStringDesc* filename) {
	NimStringDesc* result;
	result = 0;
	result = noschangeFileExt(filename, Cc_171434[(ccompiler_171455)- 1].Field1);
	return result;
}

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

N_NIMCALL(NimStringDesc*, getcompilecfilecmd_172336)(NimStringDesc* cfilename, NIM_BOOL isexternal) {
	NimStringDesc* result;
	NU8 c;
	NimStringDesc* options;
	NimStringDesc* exe;
	NimStringDesc* includecmd;
	NimStringDesc* compilepattern;
	NimStringDesc* cfile;
	NimStringDesc* objfile;
	TY172383 LOC43;
	NimStringDesc* LOC44;
	TY172383 LOC45;
	NimStringDesc* LOC46;
	NimStringDesc* LOC47;
	result = 0;
	c = ccompiler_171455;
	options = cfilespecificoptions_172097(cfilename);
	exe = getconfigvar_171646(c, ((NimStringDesc*) &TMP1766));
	{
		if (!((exe ? exe->Sup.len : 0) == ((NI) 0))) goto LA3;
		exe = getcompilerexe_172298(c);
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = needsexeext_172261();
		if (!LOC7) goto LA8;
		exe = nosaddFileExt(exe, ((NimStringDesc*) &TMP1767));
	}
	LA8: ;
	{
		NIM_BOOL LOC12;
		NimStringDesc* LOC16;
		LOC12 = 0;
		LOC12 = ((gglobaloptions_155128 &(1<<((((NU8) 8))&31)))!=0);
		if (!(LOC12)) goto LA13;
		LOC12 = ((Os_160070[(targetos_160602)- 1].Field12 &(1<<((((NU8) 0))&7)))!=0);
		LA13: ;
		if (!LOC12) goto LA14;
		LOC16 = 0;
		LOC16 = rawNewString(Cc_171434[(c)- 1].Field16->Sup.len + 1);
appendChar(LOC16, 32);
appendString(LOC16, Cc_171434[(c)- 1].Field16);
		options = resizeString(options, LOC16->Sup.len + 0);
appendString(options, LOC16);
	}
	LA14: ;
	includecmd = 0;
	compilepattern = 0;
	{
		NIM_BOOL LOC19;
		NimStringDesc* LOC22;
		NimStringDesc* LOC23;
		LOC19 = 0;
		LOC19 = noabsolutepaths_172038();
		if (!!(LOC19)) goto LA20;
		LOC22 = 0;
		LOC23 = 0;
		LOC23 = nospquoteShell(libpath_155233);
		LOC22 = rawNewString(Cc_171434[(c)- 1].Field12->Sup.len + LOC23->Sup.len + 0);
appendString(LOC22, Cc_171434[(c)- 1].Field12);
appendString(LOC22, LOC23);
		includecmd = LOC22;
		{
			NimStringDesc* includedir_172375;
			NI i_172393;
			NI L_172395;
			includedir_172375 = 0;
			i_172393 = ((NI) 0);
			L_172395 = (cincludes_171474 ? cincludes_171474->Sup.len : 0);
			{
				while (1) {
					TY155965 LOC27;
					if (!(i_172393 < L_172395)) goto LA26;
					includedir_172375 = cincludes_171474->data[i_172393];
					memset((void*)LOC27, 0, sizeof(LOC27));
					LOC27[0] = copyString(Cc_171434[(c)- 1].Field12);
					LOC27[1] = nospquoteShell(includedir_172375);
					add_172085((&includecmd), LOC27, 2);
					i_172393 += ((NI) 1);
				} LA26: ;
			}
		}
		compilepattern = nosjoinPath(ccompilerpath_171541, exe);
	}
	goto LA17;
	LA20: ;
	{
		includecmd = copyString(((NimStringDesc*) &TMP446));
		compilepattern = getcompilerexe_172298(c);
	}
	LA17: ;
	{
		NIM_BOOL LOC31;
		LOC31 = 0;
		LOC31 = noabsolutepaths_172038();
		if (!LOC31) goto LA32;
		cfile = nosextractFilename(cfilename);
	}
	goto LA29;
	LA32: ;
	{
		cfile = copyString(cfilename);
	}
	LA29: ;
	{
		NIM_BOOL LOC37;
		LOC37 = 0;
		LOC37 = !(isexternal);
		if (LOC37) goto LA38;
		LOC37 = noabsolutepaths_172038();
		LA38: ;
		if (!LOC37) goto LA39;
		objfile = toobjfile_171923(cfile);
	}
	goto LA35;
	LA39: ;
	{
		NimStringDesc* LOC42;
		LOC42 = 0;
		LOC42 = toobjfile_171923(cfile);
		objfile = completecfilepath_171912(LOC42, NIM_TRUE);
	}
	LA35: ;
	objfile = nospquoteShell(objfile);
	cfile = nospquoteShell(cfile);
	memset((void*)LOC43, 0, sizeof(LOC43));
	LOC43[0] = copyString(((NimStringDesc*) &TMP1772));
	LOC43[1] = copyString(cfile);
	LOC43[2] = copyString(((NimStringDesc*) &TMP1773));
	LOC43[3] = copyString(objfile);
	LOC43[4] = copyString(((NimStringDesc*) &TMP1774));
	LOC43[5] = copyString(options);
	LOC43[6] = copyString(((NimStringDesc*) &TMP1775));
	LOC43[7] = copyString(includecmd);
	LOC43[8] = copyString(((NimStringDesc*) &TMP1776));
	LOC43[9] = getprefixdir_155365();
	LOC43[10] = copyString(((NimStringDesc*) &TMP1776));
	LOC43[11] = getprefixdir_155365();
	LOC43[12] = copyString(((NimStringDesc*) &TMP1777));
	LOC43[13] = copyString(libpath_155233);
	LOC44 = 0;
	LOC44 = nsuFormatOpenArray(compilepattern, LOC43, 14);
	result = nospquoteShell(LOC44);
	result = addChar(result, 32);
	memset((void*)LOC45, 0, sizeof(LOC45));
	LOC45[0] = copyString(((NimStringDesc*) &TMP1772));
	LOC45[1] = copyString(cfile);
	LOC45[2] = copyString(((NimStringDesc*) &TMP1773));
	LOC45[3] = copyString(objfile);
	LOC45[4] = copyString(((NimStringDesc*) &TMP1774));
	LOC45[5] = copyString(options);
	LOC45[6] = copyString(((NimStringDesc*) &TMP1775));
	LOC45[7] = copyString(includecmd);
	LOC45[8] = copyString(((NimStringDesc*) &TMP1776));
	LOC46 = 0;
	LOC46 = getprefixdir_155365();
	LOC45[9] = nospquoteShell(LOC46);
	LOC45[10] = copyString(((NimStringDesc*) &TMP1776));
	LOC47 = 0;
	LOC47 = getprefixdir_155365();
	LOC45[11] = nospquoteShell(LOC47);
	LOC45[12] = copyString(((NimStringDesc*) &TMP1777));
	LOC45[13] = nospquoteShell(libpath_155233);
	nsuAddf((&result), Cc_171434[(c)- 1].Field6, LOC45, 14);
	return result;
}

N_NIMCALL(NI32, footprint_172411)(NimStringDesc* filename) {
	NI32 result;
	NI32 LOC1;
	NI32 LOC2;
	NI32 LOC3;
	NI32 LOC4;
	NimStringDesc* LOC5;
	result = 0;
	LOC1 = 0;
	LOC1 = crcfromfile_170051(filename);
	LOC2 = 0;
	LOC2 = HEX3EHEX3C_170540(LOC1, Os_160070[(targetos_160602)- 1].Field0);
	LOC3 = 0;
	LOC3 = HEX3EHEX3C_170540(LOC2, Cpu_160496[(targetcpu_160600)- 1].Field0);
	LOC4 = 0;
	LOC4 = HEX3EHEX3C_170540(LOC3, Cc_171434[(ccompiler_171455)- 1].Field0);
	LOC5 = 0;
	LOC5 = getcompilecfilecmd_172336(filename, NIM_TRUE);
	result = HEX3EHEX3C_170540(LOC4, LOC5);
	return result;
}

static N_INLINE(void, writeln_156205)(FILE* f, NimStringDesc** x, NI xLen0) {
	{
		NimStringDesc* i_156221;
		NI i_156229;
		i_156221 = 0;
		i_156229 = ((NI) 0);
		{
			while (1) {
				if (!(i_156229 < xLen0)) goto LA3;
				i_156221 = x[i_156229];
				write_13457(f, i_156221);
				i_156229 += ((NI) 1);
			} LA3: ;
		}
	}
	write_13457(f, ((NimStringDesc*) &TMP1779));
}

N_NIMCALL(NIM_BOOL, externalfilechanged_172421)(NimStringDesc* filename) {
	NIM_BOOL result;
	NimStringDesc* crcfile;
	NimStringDesc* LOC5;
	NI currentcrc;
	NI32 LOC6;
	FILE* f;
{	result = 0;
	{
		if (!!(((46 &(1<<((gcmd_155130)&31)))!=0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = withpackagename_155944(filename);
	crcfile = togeneratedfile_155958(LOC5, ((NimStringDesc*) &TMP1663));
	LOC6 = 0;
	LOC6 = footprint_172411(filename);
	currentcrc = ((NI) (LOC6));
	f = 0;
	{
		NIM_BOOL LOC9;
		NimStringDesc* line;
		NI oldcrc;
		LOC9 = 0;
		LOC9 = open_13203(&f, crcfile, ((NU8) 0), ((NI) -1));
		if (!LOC9) goto LA10;
		line = rawNewString(((NI) 40));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = readline_13481(f, (&line));
			if (!!(LOC14)) goto LA15;
			line = copyString(((NimStringDesc*) &TMP1778));
		}
		LA15: ;
		fclose(f);
		oldcrc = nsuParseInt(line);
		result = !((oldcrc == currentcrc));
	}
	goto LA7;
	LA10: ;
	{
		result = NIM_TRUE;
	}
	LA7: ;
	{
		if (!result) goto LA20;
		{
			NIM_BOOL LOC24;
			TY165566 LOC27;
			LOC24 = 0;
			LOC24 = open_13203(&f, crcfile, ((NU8) 1), ((NI) -1));
			if (!LOC24) goto LA25;
			memset((void*)LOC27, 0, sizeof(LOC27));
			LOC27[0] = nimIntToStr(currentcrc);
			writeln_156205(f, LOC27, 1);
			fclose(f);
		}
		LA25: ;
	}
	LA20: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, addexternalfiletocompile_172465)(NimStringDesc* filename) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((gglobaloptions_155128 &(1<<((((NU8) 1))&31)))!=0);
		if (LOC3) goto LA4;
		LOC3 = externalfilechanged_172421(filename);
		LA4: ;
		if (!LOC3) goto LA5;
		appendstr_130268((&externaltocompile_171538), filename);
	}
	LA5: ;
}

N_NIMCALL(void, addfiletolink_171954)(NimStringDesc* filename) {
	prependstr_130419((&tolink_171536), filename);
}

N_NIMCALL(void, addcompileoption_171866)(NimStringDesc* option) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = nsuFindStr(compileoptions_171540, option, ((NI) 0));
		if (!(LOC3 < ((NI) 0))) goto LA4;
		addopt_171845((&compileoptions_171540), option);
	}
	LA4: ;
}

N_NIMCALL(void, addlinkoption_171856)(NimStringDesc* option) {
	addopt_171845((&linkoptions_171539), option);
}

N_NIMCALL(NU8, nametocc_171551)(NimStringDesc* name) {
	NU8 result;
{	result = 0;
	{
		NU8 i_171623;
		NI res_171628;
		i_171623 = 0;
		res_171628 = ((NI) 1);
		{
			while (1) {
				if (!(res_171628 <= ((NI) 12))) goto LA3;
				i_171623 = ((NU8) (res_171628));
				{
					NI LOC6;
					LOC6 = 0;
					LOC6 = nsuCmpIgnoreStyle(name, Cc_171434[(i_171623)- 1].Field0);
					if (!(LOC6 == ((NI) 0))) goto LA7;
					result = i_171623;
					goto BeforeRet;
				}
				LA7: ;
				res_171628 += ((NI) 1);
			} LA3: ;
		}
	}
	result = ((NU8) 0);
	}BeforeRet: ;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Tcell46346* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_49846(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46346* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_49846((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_51404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, setcc_171714)(NimStringDesc* ccname) {
	NimStringDesc* LOC5;
	ccompiler_171455 = nametocc_171551(ccname);
	{
		if (!(ccompiler_171455 == ((NU8) 0))) goto LA3;
		rawmessage_165960(((NU16) 49), ccname);
	}
	LA3: ;
	asgnRefNoCycle((void**) (&compileoptions_171540), getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP1861)));
	LOC5 = 0;
	LOC5 = linkoptions_171539; linkoptions_171539 = copyStringRC1(((NimStringDesc*) &TMP446));
	if (LOC5) nimGCunrefNoCycle(LOC5);
	asgnRefNoCycle((void**) (&ccompilerpath_171541), getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP1862)));
	{
		NU8 i_171823;
		NI res_171827;
		i_171823 = 0;
		res_171827 = ((NI) 1);
		{
			while (1) {
				if (!(res_171827 <= ((NI) 12))) goto LA8;
				i_171823 = ((NU8) (res_171827));
				undefsymbol_169022(Cc_171434[(i_171823)- 1].Field0);
				res_171827 += ((NI) 1);
			} LA8: ;
		}
	}
	definesymbol_169013(Cc_171434[(ccompiler_171455)- 1].Field0);
}

N_NIMCALL(void, initvars_171876)(void) {
	NimStringDesc* LOC4;
	{
		NU8 i_171890;
		NI res_171894;
		i_171890 = 0;
		res_171894 = ((NI) 1);
		{
			while (1) {
				if (!(res_171894 <= ((NI) 12))) goto LA3;
				i_171890 = ((NU8) (res_171894));
				undefsymbol_169022(Cc_171434[(i_171890)- 1].Field0);
				res_171894 += ((NI) 1);
			} LA3: ;
		}
	}
	definesymbol_169013(Cc_171434[(ccompiler_171455)- 1].Field0);
	LOC4 = 0;
	LOC4 = getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP1861));
	addcompileoption_171866(LOC4);
	{
		if (!((ccompilerpath_171541 ? ccompilerpath_171541->Sup.len : 0) == ((NI) 0))) goto LA7;
		asgnRefNoCycle((void**) (&ccompilerpath_171541), getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP1862)));
	}
	LA7: ;
}

N_NIMCALL(void, addfiletocompile_171933)(NimStringDesc* filename) {
	appendstr_130268((&tocompile_171537), filename);
}

N_NIMCALL(Ropeobj162009*, genmappingfiles_172834)(Tlinkedlist130028 list) {
	Ropeobj162009* result;
	Tstrentry130024* it;
	result = 0;
	it = ((Tstrentry130024*) (list.head));
	{
		while (1) {
			TY162572 LOC3;
			if (!!((it == NIM_NIL))) goto LA2;
			memset((void*)LOC3, 0, sizeof(LOC3));
			LOC3[0] = rope_162320((*it).data);
			addf_163635(&result, ((NimStringDesc*) &TMP4323), LOC3, 1);
			it = ((Tstrentry130024*) ((*it).Sup.next));
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NimStringDesc*, getcompileoptions_172149)(void) {
	NimStringDesc* result;
	result = 0;
	result = cfilespecificoptions_172097(((NimStringDesc*) &TMP4325));
	return result;
}

N_NIMCALL(NimStringDesc*, getlinkoptions_172158)(void) {
	NimStringDesc* result;
	result = 0;
	result = copyString(linkoptions_171539);
	{
		NimStringDesc* linkedlib_172211;
		NI i_172228;
		NI L_172230;
		linkedlib_172211 = 0;
		i_172228 = ((NI) 0);
		L_172230 = (clinkedlibs_171510 ? clinkedlibs_171510->Sup.len : 0);
		{
			while (1) {
				NimStringDesc* LOC4;
				NimStringDesc* LOC5;
				if (!(i_172228 < L_172230)) goto LA3;
				linkedlib_172211 = clinkedlibs_171510->data[i_172228];
				LOC4 = 0;
				LOC4 = nospquoteShell(linkedlib_172211);
				LOC5 = 0;
				LOC5 = nsuFormatSingleElem(Cc_171434[(ccompiler_171455)- 1].Field14, LOC4);
				result = resizeString(result, LOC5->Sup.len + 0);
appendString(result, LOC5);
				i_172228 += ((NI) 1);
			} LA3: ;
		}
	}
	{
		NimStringDesc* libdir_172221;
		NI i_172234;
		NI L_172236;
		libdir_172221 = 0;
		i_172234 = ((NI) 0);
		L_172236 = (clibs_171492 ? clibs_171492->Sup.len : 0);
		{
			while (1) {
				TY155965 LOC9;
				if (!(i_172234 < L_172236)) goto LA8;
				libdir_172221 = clibs_171492->data[i_172234];
				memset((void*)LOC9, 0, sizeof(LOC9));
				LOC9[0] = copyString(Cc_171434[(ccompiler_171455)- 1].Field13);
				LOC9[1] = nospquoteShell(libdir_172221);
				add_172085((&result), LOC9, 2);
				i_172234 += ((NI) 1);
			} LA8: ;
		}
	}
	return result;
}

N_NIMCALL(void, writemapping_172867)(Ropeobj162009* gsymbolmapping) {
	Ropeobj162009* code;
	Ropeobj162009* LOC5;
	Ropeobj162009* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* LOC11;
	NimStringDesc* LOC12;
	NimStringDesc* LOC13;
	TY162572 LOC14;
	NimStringDesc* LOC15;
{	{
		if (!!(((gglobaloptions_155128 &(1<<((((NU8) 12))&31)))!=0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	code = rope_162320(((NimStringDesc*) &TMP4322));
	LOC5 = 0;
	LOC5 = genmappingfiles_172834(tocompile_171537);
	add_162534(&code, LOC5);
	LOC6 = 0;
	LOC6 = genmappingfiles_172834(externaltocompile_171538);
	add_162534(&code, LOC6);
	add_162545(&code, ((NimStringDesc*) &TMP4324));
	LOC7 = 0;
	LOC7 = getcompileoptions_172149();
	LOC8 = 0;
	LOC8 = nsuEscape(LOC7, ((NimStringDesc*) &TMP4326), ((NimStringDesc*) &TMP4326));
	add_162545(&code, LOC8);
	add_162545(&code, ((NimStringDesc*) &TMP4327));
	LOC9 = 0;
	LOC10 = 0;
	LOC10 = getlinkoptions_172158();
	LOC11 = 0;
	LOC11 = getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP4328));
	LOC9 = rawNewString(LOC10->Sup.len + LOC11->Sup.len + 1);
appendString(LOC9, LOC10);
appendString(LOC9, ((NimStringDesc*) &TMP1756));
appendString(LOC9, LOC11);
	LOC12 = 0;
	LOC12 = nsuEscape(LOC9, ((NimStringDesc*) &TMP4326), ((NimStringDesc*) &TMP4326));
	add_162545(&code, LOC12);
	add_162545(&code, ((NimStringDesc*) &TMP4329));
	LOC13 = 0;
	LOC13 = nsuEscape(libpath_155233, ((NimStringDesc*) &TMP4326), ((NimStringDesc*) &TMP4326));
	add_162545(&code, LOC13);
	memset((void*)LOC14, 0, sizeof(LOC14));
	LOC14[0] = gsymbolmapping;
	addf_163635(&code, ((NimStringDesc*) &TMP4330), LOC14, 1);
	LOC15 = 0;
	LOC15 = nosjoinPath(gprojectpath_155235, ((NimStringDesc*) &TMP4331));
	writerope_163105(code, LOC15, NIM_FALSE);
	}BeforeRet: ;
}
N_NIMCALL(void, TMP4337)(void* p, NI op) {
	TY172805* a;
	a = (TY172805*)p;
	nimGCvisit((void*)(*a).prettycmds172640, op);
}

N_CLOSURE(void, HEX3Aanonymous_172641)(NI idx, void* ClEnv) {
	TY172805* HEX3Aenvp_172811;
	HEX3Aenvp_172811 = (TY172805*) ClEnv;
	printf("%s\012", (*HEX3Aenvp_172811).prettycmds172640->data[idx]? ((*HEX3Aenvp_172811).prettycmds172640->data[idx])->data:"nil");
}

N_NIMCALL(void, compilecfile_172485)(Tlinkedlist130028 list, Ropeobj162009** script, TY122008** cmds, TY122008** prettycmds, NIM_BOOL isexternal) {
	Tstrentry130024* it;
	it = ((Tstrentry130024*) (list.head));
	{
		while (1) {
			NimStringDesc* compilecmd;
			if (!!((it == NIM_NIL))) goto LA2;
			filecounter_172080 += ((NI) 1);
			compilecmd = getcompilecfilecmd_172336((*it).data, isexternal);
			{
				NimStringDesc* LOC7;
				TY119589 LOC8;
				NimStringDesc* dir;
				NimStringDesc* name;
				NimStringDesc* ext;
				NimStringDesc* LOC9;
				NimStringDesc* LOC10;
				if (!!(((gglobaloptions_155128 &(1<<((((NU8) 4))&31)))!=0))) goto LA5;
				(*cmds) = (TY122008*) incrSeq(&((*cmds))->Sup, sizeof(NimStringDesc*));
				LOC7 = 0;
				LOC7 = (*cmds)->data[(*cmds)->Sup.len-1]; (*cmds)->data[(*cmds)->Sup.len-1] = copyStringRC1(compilecmd);
				if (LOC7) nimGCunrefNoCycle(LOC7);
				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*) &TMP4338));
appendString(LOC9, name);
				(*prettycmds) = (TY122008*) incrSeq(&((*prettycmds))->Sup, sizeof(NimStringDesc*));
				LOC10 = 0;
				LOC10 = (*prettycmds)->data[(*prettycmds)->Sup.len-1]; (*prettycmds)->data[(*prettycmds)->Sup.len-1] = copyStringRC1(LOC9);
				if (LOC10) nimGCunrefNoCycle(LOC10);
			}
			LA5: ;
			{
				if (!((gglobaloptions_155128 &(1<<((((NU8) 11))&31)))!=0)) goto LA13;
				add_162545(script, compilecmd);
				add_162545(script, tnl_160626);
			}
			LA13: ;
			it = ((Tstrentry130024*) ((*it).Sup.next));
		} LA2: ;
	}
}

N_NIMCALL(NI, execwithecho_171964)(NimStringDesc* cmd, NimStringDesc* prettycmd) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((gglobaloptions_155128 &(1<<((((NU8) 3))&31)))!=0);
		if (LOC3) goto LA4;
		LOC3 = (((NI) 0) < gverbosity_155137);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			if (!!(((prettycmd) && (prettycmd)->Sup.len == 0))) goto LA9;
			msgwriteln_165536(prettycmd);
		}
		goto LA7;
		LA9: ;
		{
			msgwriteln_165536(cmd);
		}
		LA7: ;
	}
	LA5: ;
	result = nospexecCmd(cmd);
	return result;
}

static N_INLINE(NimStringDesc*, libnametmpl_171518)(void) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(targetos_160602 == ((NU8) 2))) goto LA3;
		result = copyString(((NimStringDesc*) &TMP4348));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP4349));
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(void, execexternalprogram_171985)(NimStringDesc* cmd, NimStringDesc* prettycmd) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = execwithecho_171964(cmd, prettycmd);
		if (!!((LOC3 == ((NI) 0)))) goto LA4;
		rawmessage_165960(((NU16) 65), ((NimStringDesc*) &TMP446));
	}
	LA4: ;
}

N_NIMCALL(void, generatescript_171995)(NimStringDesc* projectfile, Ropeobj162009* script) {
	TY119589 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*) &TMP4356));
appendString(LOC2, name);
	LOC3 = 0;
	LOC3 = nosaddFileExt(LOC2, Os_160070[(targetos_160602)- 1].Field8);
	LOC4 = 0;
	LOC4 = HEX2F_119292(dir, LOC3);
	writerope_163105(script, LOC4, NIM_FALSE);
}

N_NIMCALL(void, callccompiler_172574)(NimStringDesc* projectfile) {
	TY172805* HEX3Aenv_172829;
	NimStringDesc* linkcmd;
	NimStringDesc* buildgui;
	NimStringDesc* builddll;
	NU8 c;
	Ropeobj162009* script;
	TY122008* cmds;
	TY172642 prettycb;
	TY172642 LOC5;
{	HEX3Aenv_172829 = 0;
	HEX3Aenv_172829 = (TY172805*) newObj((&NTI172830), sizeof(TY172805));
	linkcmd = 0;
	buildgui = 0;
	builddll = 0;
	{
		if (!((gglobaloptions_155128 & 2064) == 16)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	filecounter_172080 = ((NI) 0);
	c = ccompiler_171455;
	script = NIM_NIL;
	cmds = (TY122008*) newSeq((&NTI122008), 0);
	if ((*HEX3Aenv_172829).prettycmds172640) nimGCunrefNoCycle((*HEX3Aenv_172829).prettycmds172640);
	(*HEX3Aenv_172829).prettycmds172640 = (TY122008*) newSeqRC1((&NTI122008), 0);
	memset((void*)(&prettycb), 0, sizeof(prettycb));
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	LOC5.ClPrc = HEX3Aanonymous_172641; LOC5.ClEnv = HEX3Aenv_172829;
	prettycb.ClEnv = LOC5.ClEnv;
	prettycb.ClPrc = LOC5.ClPrc;
	compilecfile_172485(tocompile_171537, &script, (&cmds), (&(*HEX3Aenv_172829).prettycmds172640), NIM_FALSE);
	compilecfile_172485(externaltocompile_171538, &script, (&cmds), (&(*HEX3Aenv_172829).prettycmds172640), NIM_TRUE);
	{
		NI res;
		if (!!(((gglobaloptions_155128 &(1<<((((NU8) 4))&31)))!=0))) goto LA8;
		{
			if (!(gnumberofprocessors_155138 == ((NI) 0))) goto LA12;
			gnumberofprocessors_155138 = nospcountProcessors();
		}
		LA12: ;
		res = ((NI) 0);
		{
			if (!(gnumberofprocessors_155138 <= ((NI) 1))) goto LA16;
			{
				NI i_172676;
				NI HEX3Atmp_172795;
				NI res_172798;
				i_172676 = 0;
				HEX3Atmp_172795 = 0;
				HEX3Atmp_172795 = (cmds ? (cmds->Sup.len-1) : -1);
				res_172798 = ((NI) 0);
				{
					while (1) {
						if (!(res_172798 <= HEX3Atmp_172795)) goto LA20;
						i_172676 = res_172798;
						res = execwithecho_171964(cmds->data[i_172676], ((NimStringDesc*) &TMP446));
						{
							TY219714 LOC25;
							if (!!((res == ((NI) 0)))) goto LA23;
							memset((void*)LOC25, 0, sizeof(LOC25));
							rawmessage_165888(((NU16) 65), LOC25, 0);
						}
						LA23: ;
						res_172798 += ((NI) 1);
					} LA20: ;
				}
			}
		}
		goto LA14;
		LA16: ;
		{
			NIM_BOOL LOC27;
			LOC27 = 0;
			LOC27 = ((gglobaloptions_155128 &(1<<((((NU8) 3))&31)))!=0);
			if (LOC27) goto LA28;
			LOC27 = (((NI) 1) < gverbosity_155137);
			LA28: ;
			if (!LOC27) goto LA29;
			res = nospexecProcesses(cmds->data, cmds->Sup.len, 19, gnumberofprocessors_155138, TMP4345);
		}
		goto LA14;
		LA29: ;
		{
			if (!(gverbosity_155137 == ((NI) 1))) goto LA32;
			res = nospexecProcesses(cmds->data, cmds->Sup.len, 18, gnumberofprocessors_155138, prettycb);
		}
		goto LA14;
		LA32: ;
		{
			res = nospexecProcesses(cmds->data, cmds->Sup.len, 18, gnumberofprocessors_155138, TMP4345);
		}
		LA14: ;
		{
			if (!!((res == ((NI) 0)))) goto LA37;
			{
				TY219714 LOC43;
				if (!(gnumberofprocessors_155138 <= ((NI) 1))) goto LA41;
				memset((void*)LOC43, 0, sizeof(LOC43));
				rawmessage_165888(((NU16) 65), LOC43, 0);
			}
			goto LA39;
			LA41: ;
			{
				rawmessage_165960(((NU16) 4), ((NimStringDesc*) &TMP4346));
			}
			LA39: ;
		}
		LA37: ;
	}
	LA8: ;
	{
		Tstrentry130024* it;
		NimStringDesc* objfiles;
		if (!!(((gglobaloptions_155128 &(1<<((((NU8) 5))&31)))!=0))) goto LA47;
		it = ((Tstrentry130024*) (tolink_171536.head));
		objfiles = copyString(((NimStringDesc*) &TMP446));
		{
			while (1) {
				NimStringDesc* objfile;
				NimStringDesc* LOC57;
				NimStringDesc* LOC58;
				if (!!((it == NIM_NIL))) goto LA50;
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = noabsolutepaths_172038();
					if (!LOC53) goto LA54;
					objfile = nosextractFilename((*it).data);
				}
				goto LA51;
				LA54: ;
				{
					objfile = (*it).data;
				}
				LA51: ;
				objfiles = addChar(objfiles, 32);
				LOC57 = 0;
				LOC57 = nosaddFileExt(objfile, Cc_171434[(ccompiler_171455)- 1].Field1);
				LOC58 = 0;
				LOC58 = nospquoteShell(LOC57);
				objfiles = resizeString(objfiles, LOC58->Sup.len + 0);
appendString(objfiles, LOC58);
				it = ((Tstrentry130024*) ((*it).Sup.next));
			} LA50: ;
		}
		{
			TY165825 LOC63;
			NimStringDesc* LOC64;
			if (!((gglobaloptions_155128 &(1<<((((NU8) 9))&31)))!=0)) goto LA61;
			memset((void*)LOC63, 0, sizeof(LOC63));
			LOC63[0] = copyString(((NimStringDesc*) &TMP4347));
			LOC64 = 0;
			LOC64 = libnametmpl_171518();
			LOC63[1] = nsuFormatSingleElem(LOC64, gprojectname_155234);
			LOC63[2] = copyString(((NimStringDesc*) &TMP4350));
			LOC63[3] = copyString(objfiles);
			linkcmd = nsuFormatOpenArray(Cc_171434[(c)- 1].Field9, LOC63, 4);
		}
		goto LA59;
		LA61: ;
		{
			NimStringDesc* linkerexe;
			NimStringDesc* exefile;
			NimStringDesc* linkoptions;
			NimStringDesc* LOC110;
			NimStringDesc* LOC111;
			NimStringDesc* LOC112;
			TY172383 LOC113;
			NimStringDesc* LOC114;
			TY172383 LOC115;
			NimStringDesc* LOC116;
			linkerexe = getconfigvar_171646(c, ((NimStringDesc*) &TMP4351));
			{
				if (!((linkerexe ? linkerexe->Sup.len : 0) == ((NI) 0))) goto LA68;
				linkerexe = getlinkerexe_172317(c);
			}
			LA68: ;
			{
				NIM_BOOL LOC72;
				LOC72 = 0;
				LOC72 = needsexeext_172261();
				if (!LOC72) goto LA73;
				linkerexe = nosaddFileExt(linkerexe, ((NimStringDesc*) &TMP1767));
			}
			LA73: ;
			{
				NIM_BOOL LOC77;
				LOC77 = 0;
				LOC77 = noabsolutepaths_172038();
				if (!LOC77) goto LA78;
				linkcmd = nospquoteShell(linkerexe);
			}
			goto LA75;
			LA78: ;
			{
				NimStringDesc* LOC81;
				LOC81 = 0;
				LOC81 = nosjoinPath(ccompilerpath_171541, linkerexe);
				linkcmd = nospquoteShell(LOC81);
			}
			LA75: ;
			{
				if (!((gglobaloptions_155128 &(1<<((((NU8) 10))&31)))!=0)) goto LA84;
				buildgui = copyString(Cc_171434[(c)- 1].Field7);
			}
			goto LA82;
			LA84: ;
			{
				buildgui = copyString(((NimStringDesc*) &TMP446));
			}
			LA82: ;
			exefile = 0;
			{
				TY119589 LOC91;
				if (!((gglobaloptions_155128 &(1<<((((NU8) 8))&31)))!=0)) goto LA89;
				memset((void*)(&LOC91), 0, sizeof(LOC91));
				nossplitFile(projectfile, (&LOC91));
				exefile = nsuFormatSingleElem(Os_160070[(targetos_160602)- 1].Field2, LOC91.Field1);
				builddll = copyString(Cc_171434[(c)- 1].Field8);
			}
			goto LA87;
			LA89: ;
			{
				NimStringDesc* LOC93;
				TY119589 LOC94;
				LOC93 = 0;
				memset((void*)(&LOC94), 0, sizeof(LOC94));
				nossplitFile(projectfile, (&LOC94));
				LOC93 = rawNewString(LOC94.Field1->Sup.len + Os_160070[(targetos_160602)- 1].Field10->Sup.len + 0);
appendString(LOC93, LOC94.Field1);
appendString(LOC93, Os_160070[(targetos_160602)- 1].Field10);
				exefile = LOC93;
				builddll = copyString(((NimStringDesc*) &TMP446));
			}
			LA87: ;
			{
				if (!(((NI) 0) < (outfile_155134 ? outfile_155134->Sup.len : 0))) goto LA97;
				exefile = expandtilde_127610(outfile_155134);
			}
			LA97: ;
			{
				NIM_BOOL LOC101;
				LOC101 = 0;
				LOC101 = noabsolutepaths_172038();
				if (!!(LOC101)) goto LA102;
				{
					NIM_BOOL LOC106;
					TY119589 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_172158();
			LOC112 = 0;
			LOC112 = getconfigvar_171646(ccompiler_171455, ((NimStringDesc*) &TMP4328));
			LOC110 = rawNewString(LOC111->Sup.len + LOC112->Sup.len + 1);
appendString(LOC110, LOC111);
appendString(LOC110, ((NimStringDesc*) &TMP1756));
appendString(LOC110, LOC112);
			linkoptions = LOC110;
			memset((void*)LOC113, 0, sizeof(LOC113));
			LOC113[0] = copyString(((NimStringDesc*) &TMP4352));
			LOC113[1] = copyString(builddll);
			LOC113[2] = copyString(((NimStringDesc*) &TMP4353));
			LOC113[3] = copyString(buildgui);
			LOC113[4] = copyString(((NimStringDesc*) &TMP1774));
			LOC113[5] = copyString(linkoptions);
			LOC113[6] = copyString(((NimStringDesc*) &TMP4350));
			LOC113[7] = copyString(objfiles);
			LOC113[8] = copyString(((NimStringDesc*) &TMP4354));
			LOC113[9] = copyString(exefile);
			LOC113[10] = copyString(((NimStringDesc*) &TMP1776));
			LOC113[11] = getprefixdir_155365();
			LOC113[12] = copyString(((NimStringDesc*) &TMP1777));
			LOC113[13] = copyString(libpath_155233);
			LOC114 = 0;
			LOC114 = nsuFormatOpenArray(linkcmd, LOC113, 14);
			linkcmd = nospquoteShell(LOC114);
			linkcmd = addChar(linkcmd, 32);
			memset((void*)LOC115, 0, sizeof(LOC115));
			LOC115[0] = copyString(((NimStringDesc*) &TMP4352));
			LOC115[1] = copyString(builddll);
			LOC115[2] = copyString(((NimStringDesc*) &TMP4353));
			LOC115[3] = copyString(buildgui);
			LOC115[4] = copyString(((NimStringDesc*) &TMP1774));
			LOC115[5] = copyString(linkoptions);
			LOC115[6] = copyString(((NimStringDesc*) &TMP4350));
			LOC115[7] = copyString(objfiles);
			LOC115[8] = copyString(((NimStringDesc*) &TMP4354));
			LOC115[9] = copyString(exefile);
			LOC115[10] = copyString(((NimStringDesc*) &TMP1776));
			LOC116 = 0;
			LOC116 = getprefixdir_155365();
			LOC115[11] = nospquoteShell(LOC116);
			LOC115[12] = copyString(((NimStringDesc*) &TMP1777));
			LOC115[13] = nospquoteShell(libpath_155233);
			nsuAddf((&linkcmd), Cc_171434[(c)- 1].Field11, LOC115, 14);
		}
		LA59: ;
		{
			if (!!(((gglobaloptions_155128 &(1<<((((NU8) 4))&31)))!=0))) goto LA119;
			{
				if (!(gverbosity_155137 == ((NI) 1))) goto LA123;
				execexternalprogram_171985(linkcmd, ((NimStringDesc*) &TMP4355));
			}
			goto LA121;
			LA123: ;
			{
				execexternalprogram_171985(linkcmd, ((NimStringDesc*) &TMP446));
			}
			LA121: ;
		}
		LA119: ;
	}
	goto LA45;
	LA47: ;
	{
		linkcmd = copyString(((NimStringDesc*) &TMP446));
	}
	LA45: ;
	{
		if (!((gglobaloptions_155128 &(1<<((((NU8) 11))&31)))!=0)) goto LA129;
		add_162545(&script, linkcmd);
		add_162545(&script, tnl_160626);
		generatescript_171995(projectfile, script);
	}
	LA129: ;
	}BeforeRet: ;
}

N_NIMCALL(void, resetcompilationlists_171943)(void) {
	initlinkedlist_130043((&tocompile_171537));
	initlinkedlist_130043((&externaltocompile_171538));
	initlinkedlist_130043((&tolink_171536));
}
NIM_EXTERNC N_NOINLINE(void, nimsrc_extccompInit)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	ccompiler_171455 = ((NU8) 1);
	if (cincludes_171474) nimGCunrefNoCycle(cincludes_171474);
	cincludes_171474 = (TY122008*) newSeqRC1((&NTI122008), 0);
	if (clibs_171492) nimGCunrefNoCycle(clibs_171492);
	clibs_171492 = (TY122008*) newSeqRC1((&NTI122008), 0);
	if (clinkedlibs_171510) nimGCunrefNoCycle(clinkedlibs_171510);
	clinkedlibs_171510 = (TY122008*) newSeqRC1((&NTI122008), 0);
	LOC1 = 0;
	LOC1 = linkoptions_171539; linkoptions_171539 = copyStringRC1(((NimStringDesc*) &TMP446));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = compileoptions_171540; compileoptions_171540 = copyStringRC1(((NimStringDesc*) &TMP446));
	if (LOC2) nimGCunrefNoCycle(LOC2);
	LOC3 = 0;
	LOC3 = ccompilerpath_171541; ccompilerpath_171541 = copyStringRC1(((NimStringDesc*) &TMP446));
	if (LOC3) nimGCunrefNoCycle(LOC3);
}

NIM_EXTERNC N_NOINLINE(void, nimsrc_extccompDatInit)(void) {
static TNimNode* TMP4336[2];
static TNimNode TMP442[3];
NTI172805.size = sizeof(TY172805);
NTI172805.kind = 18;
NTI172805.base = 0;
NTI172805.flags = 2;
TMP4336[0] = &TMP442[1];
TMP442[1].kind = 1;
TMP442[1].offset = offsetof(TY172805, HEX3Astate);
TMP442[1].typ = (&NTI311033);
TMP442[1].name = ":state";
TMP4336[1] = &TMP442[2];
TMP442[2].kind = 1;
TMP442[2].offset = offsetof(TY172805, prettycmds172640);
TMP442[2].typ = (&NTI122008);
TMP442[2].name = "prettyCmds172640";
TMP442[0].len = 2; TMP442[0].kind = 2; TMP442[0].sons = &TMP4336[0];
NTI172805.node = &TMP442[0];
NTI172830.size = sizeof(TY172805*);
NTI172830.kind = 22;
NTI172830.base = (&NTI172805);
NTI172830.flags = 2;
NTI172830.marker = TMP4337;
}

