/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/extccomp.o compiler/nimcache/extccomp.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <string.h>

#include <stdio.h>
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tcell41090 tcell41090;
typedef struct TNimType TNimType;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct TY110805 TY110805;
typedef struct TNimNode TNimNode;
typedef struct tlinkedlist118023 tlinkedlist118023;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tinfoos142044 tinfoos142044;
typedef struct tinfocpu142453 tinfocpu142453;
typedef struct tinfocc169014 tinfocc169014;
typedef struct TY108700 TY108700;
typedef struct trope145007 trope145007;
typedef struct tstrentry118019 tstrentry118019;
typedef struct TNimObject TNimObject;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tlinkedlist118023  {
tlistentry118017* Head;
tlistentry118017* Tail;
NI Counter;
};
struct tinfoos142044 {
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 tinfoos142044 TY142064[23];
struct tinfocpu142453 {
NimStringDesc* Field0;
NI Field1;
NU8 Field2;
NI Field3;
NI Field4;
};
typedef tinfocpu142453 TY142469[14];
struct tinfocc169014 {
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 tinfocc169014 TY169403[12];
struct TY108700 {
NimStringDesc* Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
typedef NimStringDesc* TY137892[2];
typedef NimStringDesc* TY170352[12];
typedef NimStringDesc* TY165002[1];
typedef trope145007* TY145497[1];
struct  TNimObject  {
TNimType* m_type;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tstrentry118019  {
  tlistentry118017 Sup;
NimStringDesc* Data;
};
typedef NimStringDesc* TY523288[1];
typedef NimStringDesc* TY165283[4];
typedef NimStringDesc* TY170736[14];
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(NIM_BOOL, externalfilechanged_170374)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, togeneratedfile_137883)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_137873)(NimStringDesc* path);
N_NIMCALL(NI32, footprint_170368)(NimStringDesc* filename);
N_NIMCALL(NI32, HEX3EHEX3C_144489)(NI32 c, NimStringDesc* s);
N_NIMCALL(NI32, crcfromfile_144031)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, getcompilecfilecmd_170292)(NimStringDesc* cfilename, NIM_BOOL isexternal);
N_NIMCALL(NimStringDesc*, cfilespecificoptions_169888)(NimStringDesc* cfilename);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, nossplitFile)(NimStringDesc* path, TY108700* Result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NIM_BOOL, existsconfigvar_137305)(NimStringDesc* key);
N_NIMCALL(void, addopt_169693)(NimStringDesc** dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, getconfigvar_137311)(NimStringDesc* key);
N_NIMCALL(NimStringDesc*, getdebug_169819)(NU8 c);
N_NIMCALL(NimStringDesc*, getconfigvar_169593)(NU8 c, NimStringDesc* suffix);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, getoptspeed_169813)(NU8 c);
N_NIMCALL(NimStringDesc*, getoptsize_169825)(NU8 c);
N_NIMCALL(NimStringDesc*, getcompilerexe_170270)(NU8 compiler);
N_NIMCALL(void, rawmessage_165386)(NU16 msg, NimStringDesc* arg);
static N_INLINE(NIM_BOOL, needsexeext_170234)(void);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
static N_INLINE(NIM_BOOL, noabsolutepaths_169831)(void);
N_NIMCALL(NimStringDesc*, nospquoteShell)(NimStringDesc* s);
N_NIMCALL(void, add_169880)(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_169760)(NimStringDesc* filenamewithoutext);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, completecfilepath_169753)(NimStringDesc* cfile, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_138001)(NimStringDesc* f, NIM_BOOL createsubdir);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, getprefixdir_137330)(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_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line);
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
static N_INLINE(void, writeln_138205)(FILE* f_138209, NimStringDesc** x_138213, NI x_138213Len0);
N_NIMCALL(void, write_10463)(FILE* f, NimStringDesc* s);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, appendstr_118268)(tlinkedlist118023* list, NimStringDesc* data);
N_NIMCALL(void, prependstr_118420)(tlinkedlist118023* list, NimStringDesc* data);
N_NIMCALL(NI, nsuFindStr)(NimStringDesc* s, NimStringDesc* sub, NI start);
N_NIMCALL(NU8, nametocc_169525)(NimStringDesc* name);
N_NIMCALL(NI, nsuCmpIgnoreStyle)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, undefsymbol_168011)(NimStringDesc* symbol);
N_NIMCALL(void, definesymbol_168006)(NimStringDesc* symbol);
N_NIMCALL(void, addcompileoption_169707)(NimStringDesc* option);
N_NIMCALL(void, addlinkoption_169700)(NimStringDesc* option);
N_NIMCALL(trope145007*, torope_145058)(NimStringDesc* s);
N_NIMCALL(void, app_145040)(trope145007** a, trope145007* b);
N_NIMCALL(trope145007*, genmappingfiles_170785)(tlinkedlist118023 list);
N_NIMCALL(void, appf_145085)(trope145007** c, NimStringDesc* frmt, trope145007** args, NI argsLen0);
N_NIMCALL(void, app_145046)(trope145007** a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, getcompileoptions_169945)(void);
N_NIMCALL(NimStringDesc*, getlinkoptions_169950)(void);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, writerope_146407)(trope145007* head, NimStringDesc* filename, NIM_BOOL usewarning);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, compilecfile_170426)(tlinkedlist118023 list, trope145007** script, TY110805** cmds, NIM_BOOL isexternal);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NI, nospcountProcessors)(void);
N_NIMCALL(NI, nospexecCmd)(NimStringDesc* command);
N_NIMCALL(NI, nospexecProcesses)(NimStringDesc** cmds, NI cmdsLen0, NU8 options_127808, NI n);
N_NIMCALL(void, rawmessage_165292)(NU16 msg, NimStringDesc** args, NI argsLen0);
static N_INLINE(NimStringDesc*, libnametmpl_169498)(void);
N_NIMCALL(void, execexternalprogram_169785)(NimStringDesc* cmd);
N_NIMCALL(void, msgwriteln_164937)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, getlinkerexe_170285)(NU8 compiler);
N_NIMCALL(NimStringDesc*, expandtilde_116022)(NimStringDesc* path);
N_NIMCALL(NIM_BOOL, nosisAbsolute)(NimStringDesc* path);
N_NIMCALL(void, generatescript_169804)(NimStringDesc* projectfile, trope145007* script);
N_NIMCALL(NimStringDesc*, HEX2F_108477)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(void, initlinkedlist_118036)(tlinkedlist118023* list);
STRING_LITERAL(TMP443, ".c", 2);
STRING_LITERAL(TMP444, "", 0);
STRING_LITERAL(TMP1177, "crc", 3);
extern NIM_CONST TY142064 os_142063;
extern NIM_CONST TY142469 cpu_142468;
STRING_LITERAL(TMP1178, "gcc", 3);
STRING_LITERAL(TMP1179, "o", 1);
STRING_LITERAL(TMP1180, " -O3 -ffast-math ", 17);
STRING_LITERAL(TMP1181, " -Os -ffast-math ", 17);
STRING_LITERAL(TMP1182, "g++", 3);
STRING_LITERAL(TMP1183, "-c $options $include -o $objfile $file", 38);
STRING_LITERAL(TMP1184, " -mwindows", 10);
STRING_LITERAL(TMP1185, " -shared", 8);
STRING_LITERAL(TMP1186, "ar rcs $libfile $objfiles", 25);
STRING_LITERAL(TMP1187, "$buildgui $builddll -o $exefile $objfiles $options", 50);
STRING_LITERAL(TMP1188, " -I", 3);
STRING_LITERAL(TMP1189, " -L", 3);
STRING_LITERAL(TMP1190, " -l$1", 5);
STRING_LITERAL(TMP1191, "-fPIC", 5);
STRING_LITERAL(TMP1192, "asm($1);$n", 10);
STRING_LITERAL(TMP1193, "$1 $3 $2 ", 9);
STRING_LITERAL(TMP1194, "__attribute__((__packed__))", 27);
STRING_LITERAL(TMP1195, "llvm_gcc", 8);
STRING_LITERAL(TMP1196, "llvm-gcc", 8);
STRING_LITERAL(TMP1197, "llvm-g++", 8);
STRING_LITERAL(TMP1198, "llvm-ar rcs $libfile $objfiles", 30);
STRING_LITERAL(TMP1199, "clang", 5);
STRING_LITERAL(TMP1200, "clang++", 7);
STRING_LITERAL(TMP1201, "lcc", 3);
STRING_LITERAL(TMP1202, "obj", 3);
STRING_LITERAL(TMP1203, " -O -p6 ", 8);
STRING_LITERAL(TMP1204, "$options $include -Fo$objfile $file", 35);
STRING_LITERAL(TMP1205, " -subsystem windows", 19);
STRING_LITERAL(TMP1206, " -dll", 5);
STRING_LITERAL(TMP1207, "lcclnk", 6);
STRING_LITERAL(TMP1208, "$options $buildgui $builddll -O $exefile $objfiles", 50);
STRING_LITERAL(TMP1209, " -g5 ", 5);
STRING_LITERAL(TMP1210, "_asm{$n$1$n}$n", 14);
STRING_LITERAL(TMP1211, "$1 $2", 5);
STRING_LITERAL(TMP1212, "bcc", 3);
STRING_LITERAL(TMP1213, " -O2 -6 ", 8);
STRING_LITERAL(TMP1214, " -O1 -6 ", 8);
STRING_LITERAL(TMP1215, "bcc32", 5);
STRING_LITERAL(TMP1216, "-c $options $include -o$objfile $file", 37);
STRING_LITERAL(TMP1217, " -tW", 4);
STRING_LITERAL(TMP1218, " -tWD", 5);
STRING_LITERAL(TMP1219, "$options $buildgui $builddll -e$exefile $objfiles", 49);
STRING_LITERAL(TMP1220, "__asm{$n$1$n}$n", 15);
STRING_LITERAL(TMP1221, "dmc", 3);
STRING_LITERAL(TMP1222, " -ff -o -6 ", 11);
STRING_LITERAL(TMP1223, " -L/exet:nt/su:windows", 22);
STRING_LITERAL(TMP1224, " -WD", 4);
STRING_LITERAL(TMP1225, "$options $buildgui $builddll -o$exefile $objfiles", 49);
STRING_LITERAL(TMP1226, " -g ", 4);
STRING_LITERAL(TMP1227, "$3$n$1 $2", 9);
STRING_LITERAL(TMP1228, "#pragma pack(1)", 15);
STRING_LITERAL(TMP1229, "wcc", 3);
STRING_LITERAL(TMP1230, " -ox -on -6 -d0 -fp6 -zW ", 25);
STRING_LITERAL(TMP1231, "wcl386", 6);
STRING_LITERAL(TMP1232, "-c $options $include -fo=$objfile $file", 39);
STRING_LITERAL(TMP1233, " -bw", 4);
STRING_LITERAL(TMP1234, " -bd", 4);
STRING_LITERAL(TMP1235, "$options $buildgui $builddll -fe=$exefile $objfiles ", 52);
STRING_LITERAL(TMP1236, " -i=", 4);
STRING_LITERAL(TMP1237, " -d2 ", 5);
STRING_LITERAL(TMP1238, "vcc", 3);
STRING_LITERAL(TMP1239, " /Ogityb2 /G7 /arch:SSE2 ", 25);
STRING_LITERAL(TMP1240, " /O1 /G7 ", 9);
STRING_LITERAL(TMP1241, "cl", 2);
STRING_LITERAL(TMP1242, "/c $options $include /Fo$objfile $file", 38);
STRING_LITERAL(TMP1243, " /link /SUBSYSTEM:WINDOWS ", 26);
STRING_LITERAL(TMP1244, " /LD", 4);
STRING_LITERAL(TMP1245, "lib /OUT:$libfile $objfiles", 27);
STRING_LITERAL(TMP1246, "$options $builddll /Fe$exefile $objfiles $buildgui", 50);
STRING_LITERAL(TMP1247, " /I", 3);
STRING_LITERAL(TMP1248, " /LIBPATH:", 10);
STRING_LITERAL(TMP1249, " $1.lib", 7);
STRING_LITERAL(TMP1250, " /GZ /Zi ", 9);
STRING_LITERAL(TMP1251, "tcc", 3);
STRING_LITERAL(TMP1252, "UNAVAILABLE!", 12);
STRING_LITERAL(TMP1253, "-o $exefile $options $buildgui $builddll $objfiles", 50);
STRING_LITERAL(TMP1254, "pcc", 3);
STRING_LITERAL(TMP1255, " -Ox ", 5);
STRING_LITERAL(TMP1256, " -Os ", 5);
STRING_LITERAL(TMP1257, "cc", 2);
STRING_LITERAL(TMP1258, "-c $options $include -Fo$objfile $file", 38);
STRING_LITERAL(TMP1259, " -SUBSYSTEM:WINDOWS", 19);
STRING_LITERAL(TMP1260, " -DLL", 5);
STRING_LITERAL(TMP1261, "$options $buildgui $builddll -OUT:$exefile $objfiles", 52);
STRING_LITERAL(TMP1262, " -Zi ", 5);
STRING_LITERAL(TMP1263, "ucc", 3);
STRING_LITERAL(TMP1264, " -O3 ", 5);
STRING_LITERAL(TMP1265, " -O1 ", 5);
STRING_LITERAL(TMP1266, " -shared ", 9);
STRING_LITERAL(TMP1267, "-o $exefile $buildgui $builddll $objfiles $options", 50);
STRING_LITERAL(TMP1268, "icl", 3);
NIM_CONST TY169403 cc_169402 = {{((NimStringDesc*) &TMP1178),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP1180),
((NimStringDesc*) &TMP1181),
((NimStringDesc*) &TMP1178),
((NimStringDesc*) &TMP1182),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP1184),
((NimStringDesc*) &TMP1185),
((NimStringDesc*) &TMP1186),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1187),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP1189),
((NimStringDesc*) &TMP1190),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1191),
((NimStringDesc*) &TMP1192),
((NimStringDesc*) &TMP1193),
((NimStringDesc*) &TMP1194),
183}
,
{((NimStringDesc*) &TMP1195),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP1180),
((NimStringDesc*) &TMP1181),
((NimStringDesc*) &TMP1196),
((NimStringDesc*) &TMP1197),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP1184),
((NimStringDesc*) &TMP1185),
((NimStringDesc*) &TMP1198),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1187),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP1189),
((NimStringDesc*) &TMP1190),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1191),
((NimStringDesc*) &TMP1192),
((NimStringDesc*) &TMP1193),
((NimStringDesc*) &TMP1194),
183}
,
{((NimStringDesc*) &TMP1199),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP1180),
((NimStringDesc*) &TMP1181),
((NimStringDesc*) &TMP1199),
((NimStringDesc*) &TMP1200),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP1184),
((NimStringDesc*) &TMP1185),
((NimStringDesc*) &TMP1198),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1187),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP1189),
((NimStringDesc*) &TMP1190),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1191),
((NimStringDesc*) &TMP1192),
((NimStringDesc*) &TMP1193),
((NimStringDesc*) &TMP1194),
183}
,
{((NimStringDesc*) &TMP1201),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1203),
((NimStringDesc*) &TMP1203),
((NimStringDesc*) &TMP1201),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1204),
((NimStringDesc*) &TMP1205),
((NimStringDesc*) &TMP1206),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1207),
((NimStringDesc*) &TMP1208),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1209),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1210),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
0}
,
{((NimStringDesc*) &TMP1212),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1213),
((NimStringDesc*) &TMP1214),
((NimStringDesc*) &TMP1215),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1216),
((NimStringDesc*) &TMP1217),
((NimStringDesc*) &TMP1218),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1215),
((NimStringDesc*) &TMP1219),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
4}
,
{((NimStringDesc*) &TMP1221),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1222),
((NimStringDesc*) &TMP1222),
((NimStringDesc*) &TMP1221),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1216),
((NimStringDesc*) &TMP1223),
((NimStringDesc*) &TMP1224),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1221),
((NimStringDesc*) &TMP1225),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1226),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1227),
((NimStringDesc*) &TMP1228),
4}
,
{((NimStringDesc*) &TMP1229),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1230),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1231),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1232),
((NimStringDesc*) &TMP1233),
((NimStringDesc*) &TMP1234),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1231),
((NimStringDesc*) &TMP1235),
((NimStringDesc*) &TMP1236),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1237),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
4}
,
{((NimStringDesc*) &TMP1238),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1239),
((NimStringDesc*) &TMP1240),
((NimStringDesc*) &TMP1241),
((NimStringDesc*) &TMP1241),
((NimStringDesc*) &TMP1242),
((NimStringDesc*) &TMP1243),
((NimStringDesc*) &TMP1244),
((NimStringDesc*) &TMP1245),
((NimStringDesc*) &TMP1241),
((NimStringDesc*) &TMP1246),
((NimStringDesc*) &TMP1247),
((NimStringDesc*) &TMP1248),
((NimStringDesc*) &TMP1249),
((NimStringDesc*) &TMP1250),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1227),
((NimStringDesc*) &TMP1228),
76}
,
{((NimStringDesc*) &TMP1251),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1251),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP1252),
((NimStringDesc*) &TMP1185),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1251),
((NimStringDesc*) &TMP1253),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1226),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
3}
,
{((NimStringDesc*) &TMP1254),
((NimStringDesc*) &TMP1202),
((NimStringDesc*) &TMP1255),
((NimStringDesc*) &TMP1256),
((NimStringDesc*) &TMP1257),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1258),
((NimStringDesc*) &TMP1259),
((NimStringDesc*) &TMP1260),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1257),
((NimStringDesc*) &TMP1261),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1262),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
0}
,
{((NimStringDesc*) &TMP1263),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP1264),
((NimStringDesc*) &TMP1265),
((NimStringDesc*) &TMP1257),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1266),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1257),
((NimStringDesc*) &TMP1267),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1220),
((NimStringDesc*) &TMP1211),
((NimStringDesc*) &TMP444),
0}
,
{((NimStringDesc*) &TMP1268),
((NimStringDesc*) &TMP1179),
((NimStringDesc*) &TMP1180),
((NimStringDesc*) &TMP1181),
((NimStringDesc*) &TMP1268),
((NimStringDesc*) &TMP1182),
((NimStringDesc*) &TMP1183),
((NimStringDesc*) &TMP1184),
((NimStringDesc*) &TMP1185),
((NimStringDesc*) &TMP1186),
((NimStringDesc*) &TMP1268),
((NimStringDesc*) &TMP1187),
((NimStringDesc*) &TMP1188),
((NimStringDesc*) &TMP1189),
((NimStringDesc*) &TMP1190),
((NimStringDesc*) &TMP444),
((NimStringDesc*) &TMP1191),
((NimStringDesc*) &TMP1192),
((NimStringDesc*) &TMP1193),
((NimStringDesc*) &TMP1194),
183}
}
;
STRING_LITERAL(TMP1269, ".debug", 6);
STRING_LITERAL(TMP1270, " ", 1);
STRING_LITERAL(TMP1271, ".options.debug", 14);
STRING_LITERAL(TMP1272, ".speed", 6);
STRING_LITERAL(TMP1273, ".options.speed", 14);
STRING_LITERAL(TMP1274, ".size", 5);
STRING_LITERAL(TMP1275, ".options.size", 13);
STRING_LITERAL(TMP1276, ".always", 7);
STRING_LITERAL(TMP1277, ".exe", 4);
STRING_LITERAL(TMP1278, "exe", 3);
STRING_LITERAL(TMP1287, "file", 4);
STRING_LITERAL(TMP1288, "objfile", 7);
STRING_LITERAL(TMP1289, "options", 7);
STRING_LITERAL(TMP1290, "include", 7);
STRING_LITERAL(TMP1291, "nimrod", 6);
STRING_LITERAL(TMP1292, "lib", 3);
STRING_LITERAL(TMP1293, "0", 1);
STRING_LITERAL(TMP1295, "\012", 1);
STRING_LITERAL(TMP1364, ".options.always", 15);
STRING_LITERAL(TMP1365, ".options.linker", 15);
STRING_LITERAL(TMP1366, ".path", 5);
STRING_LITERAL(TMP1544, ".cpp", 4);
STRING_LITERAL(TMP1545, ".m", 2);
STRING_LITERAL(TMP3897, "[C_Files]\012", 10);
STRING_LITERAL(TMP3898, "--file:r\"$1\"$N", 14);
STRING_LITERAL(TMP3899, "\012[C_Compiler]\012Flags=", 20);
STRING_LITERAL(TMP3900, "__dummy__", 9);
STRING_LITERAL(TMP3901, "\"", 1);
STRING_LITERAL(TMP3902, "\012[Linker]\012Flags=", 16);
STRING_LITERAL(TMP3903, "\012[Environment]\012libpath=", 23);
STRING_LITERAL(TMP3904, "\012[Symbols]$n$1", 14);
STRING_LITERAL(TMP3905, "mapping.txt", 11);
STRING_LITERAL(TMP3911, " execution of an external program failed; rerun with --parallel"
"Build:1 to see the error message", 95);
STRING_LITERAL(TMP3912, "libfile", 7);
STRING_LITERAL(TMP3913, "$1.lib", 6);
STRING_LITERAL(TMP3914, "lib$1.a", 7);
STRING_LITERAL(TMP3915, "objfiles", 8);
STRING_LITERAL(TMP3916, ".linkerexe", 10);
STRING_LITERAL(TMP3917, "builddll", 8);
STRING_LITERAL(TMP3918, "buildgui", 8);
STRING_LITERAL(TMP3919, "exefile", 7);
STRING_LITERAL(TMP3920, "compile_", 8);
NU8 ccompiler_169425;
NimStringDesc* cext_169426;
extern tgcheap43016 gch_43044;
TY110805* cincludes_169448;
extern TNimType NTI110805; /* seq[string] */
TY110805* clibs_169470;
TY110805* clinkedlibs_169492;
tlinkedlist118023 tolink_169512;
tlinkedlist118023 tocompile_169513;
tlinkedlist118023 externaltocompile_169514;
NimStringDesc* linkoptions_169515;
NimStringDesc* compileoptions_169516;
NimStringDesc* ccompilerpath_169517;
NI filecounter_169877;
extern NU32 gglobaloptions_137111;
extern NU8 targetos_142575;
extern NU8 targetcpu_142573;
extern NU8 hostos_142576;
extern NU8 hostcpu_142574;
extern NU32 goptions_137108;
extern NU8 gcmd_137113;
extern NimStringDesc* libpath_137205;
extern NimStringDesc* gprojectpath_137207;
extern NimStringDesc* tnl_142593;
extern NI gnumberofprocessors_137121;
extern NI gverbosity_137120;
extern NimStringDesc* gprojectname_137206;
extern NimStringDesc* outfile_137117;

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

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

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

N_NIMCALL(void, addopt_169693)(NimStringDesc** dest, NimStringDesc* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*dest)->Sup.len == 0);
		if (LOC3) goto LA4;
		LOC3 = !(((NU8)((*dest)->data[(NI32)((*dest)->Sup.len - 1)]) == (NU8)(32)));
		LA4: ;
		if (!LOC3) goto LA5;
		(*dest) = resizeString((*dest), 1);
appendString((*dest), ((NimStringDesc*) &TMP1270));
	}
	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[((NI32)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

N_NIMCALL(NimStringDesc*, getconfigvar_169593)(NU8 c, NimStringDesc* suffix) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NimStringDesc* fullccname;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = !((hostos_142576 == targetos_142575));
		if (LOC4) goto LA5;
		LOC4 = !((hostcpu_142574 == targetcpu_142573));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = !(((gglobaloptions_137111 &(1<<((((NU8) 4))&31)))!=0));
		LA6: ;
		if (!LOC3) goto LA7;
		LOC9 = 0;
		LOC9 = rawNewString(cpu_142468[(targetcpu_142573)- 1].Field0->Sup.len + os_142063[(targetos_142575)- 1].Field0->Sup.len + cc_169402[(c)- 1].Field0->Sup.len + suffix->Sup.len + 2);
appendString(LOC9, cpu_142468[(targetcpu_142573)- 1].Field0);
appendChar(LOC9, 46);
appendString(LOC9, os_142063[(targetos_142575)- 1].Field0);
appendChar(LOC9, 46);
appendString(LOC9, cc_169402[(c)- 1].Field0);
appendString(LOC9, suffix);
		fullccname = LOC9;
		result = getconfigvar_137311(fullccname);
		{
			NimStringDesc* LOC14;
			if (!(result->Sup.len == 0)) goto LA12;
			LOC14 = 0;
			LOC14 = rawNewString(cc_169402[(c)- 1].Field0->Sup.len + suffix->Sup.len + 0);
appendString(LOC14, cc_169402[(c)- 1].Field0);
appendString(LOC14, suffix);
			result = getconfigvar_137311(LOC14);
		}
		LA12: ;
	}
	goto LA1;
	LA7: ;
	{
		NimStringDesc* LOC16;
		LOC16 = 0;
		LOC16 = rawNewString(cc_169402[(c)- 1].Field0->Sup.len + suffix->Sup.len + 0);
appendString(LOC16, cc_169402[(c)- 1].Field0);
appendString(LOC16, suffix);
		result = getconfigvar_137311(LOC16);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getdebug_169819)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_169593(c, ((NimStringDesc*) &TMP1271));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(cc_169402[(c)- 1].Field15);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptspeed_169813)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_169593(c, ((NimStringDesc*) &TMP1273));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(cc_169402[(c)- 1].Field2);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getoptsize_169825)(NU8 c) {
	NimStringDesc* result;
	result = 0;
	result = getconfigvar_169593(c, ((NimStringDesc*) &TMP1275));
	{
		if (!((result) && (result)->Sup.len == 0)) goto LA3;
		result = copyString(cc_169402[(c)- 1].Field3);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, cfilespecificoptions_169888)(NimStringDesc* cfilename) {
	NimStringDesc* result;
	NimStringDesc* trunk;
	TY108700 LOC1;
	NimStringDesc* key;
	NimStringDesc* LOC40;
	result = 0;
	result = copyString(compileoptions_169516);
	memset((void*)&LOC1, 0, sizeof(LOC1));
	nossplitFile(cfilename, &LOC1);
	trunk = copyString(LOC1.Field1);
	{
		NimStringDesc* key;
		NimStringDesc* LOC6;
		if (!((gglobaloptions_137111 &(1<<((((NU8) 7))&31)))!=0)) goto LA4;
		LOC6 = 0;
		LOC6 = rawNewString(trunk->Sup.len + 6);
appendString(LOC6, trunk);
appendString(LOC6, ((NimStringDesc*) &TMP1269));
		key = LOC6;
		{
			NIM_BOOL LOC9;
			NimStringDesc* LOC12;
			LOC9 = 0;
			LOC9 = existsconfigvar_137305(key);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = getconfigvar_137311(key);
			addopt_169693(&result, LOC12);
		}
		goto LA7;
		LA10: ;
		{
			NimStringDesc* LOC14;
			LOC14 = 0;
			LOC14 = getdebug_169819(ccompiler_169425);
			addopt_169693(&result, LOC14);
		}
		LA7: ;
	}
	LA4: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC19;
		if (!((goptions_137108 &(1<<((((NU8) 13))&31)))!=0)) goto LA17;
		LOC19 = 0;
		LOC19 = rawNewString(trunk->Sup.len + 6);
appendString(LOC19, trunk);
appendString(LOC19, ((NimStringDesc*) &TMP1272));
		key = LOC19;
		{
			NIM_BOOL LOC22;
			NimStringDesc* LOC25;
			LOC22 = 0;
			LOC22 = existsconfigvar_137305(key);
			if (!LOC22) goto LA23;
			LOC25 = 0;
			LOC25 = getconfigvar_137311(key);
			addopt_169693(&result, LOC25);
		}
		goto LA20;
		LA23: ;
		{
			NimStringDesc* LOC27;
			LOC27 = 0;
			LOC27 = getoptspeed_169813(ccompiler_169425);
			addopt_169693(&result, LOC27);
		}
		LA20: ;
	}
	goto LA15;
	LA17: ;
	{
		NimStringDesc* key;
		NimStringDesc* LOC31;
		if (!((goptions_137108 &(1<<((((NU8) 14))&31)))!=0)) goto LA29;
		LOC31 = 0;
		LOC31 = rawNewString(trunk->Sup.len + 5);
appendString(LOC31, trunk);
appendString(LOC31, ((NimStringDesc*) &TMP1274));
		key = LOC31;
		{
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC34 = 0;
			LOC34 = existsconfigvar_137305(key);
			if (!LOC34) goto LA35;
			LOC37 = 0;
			LOC37 = getconfigvar_137311(key);
			addopt_169693(&result, LOC37);
		}
		goto LA32;
		LA35: ;
		{
			NimStringDesc* LOC39;
			LOC39 = 0;
			LOC39 = getoptsize_169825(ccompiler_169425);
			addopt_169693(&result, LOC39);
		}
		LA32: ;
	}
	goto LA15;
	LA29: ;
	LA15: ;
	LOC40 = 0;
	LOC40 = rawNewString(trunk->Sup.len + 7);
appendString(LOC40, trunk);
appendString(LOC40, ((NimStringDesc*) &TMP1276));
	key = LOC40;
	{
		NIM_BOOL LOC43;
		NimStringDesc* LOC46;
		LOC43 = 0;
		LOC43 = existsconfigvar_137305(key);
		if (!LOC43) goto LA44;
		LOC46 = 0;
		LOC46 = getconfigvar_137311(key);
		addopt_169693(&result, LOC46);
	}
	LA44: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getcompilerexe_170270)(NU8 compiler) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(gcmd_137113 == ((NU8) 2))) goto LA3;
		result = copyString(cc_169402[(compiler)- 1].Field5);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(cc_169402[(compiler)- 1].Field4);
	}
	LA1: ;
	{
		if (!(result->Sup.len == 0)) goto LA8;
		rawmessage_165386(((NU16) 228), cc_169402[(compiler)- 1].Field0);
	}
	LA8: ;
	return result;
}

static N_INLINE(NIM_BOOL, needsexeext_170234)(void) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((gglobaloptions_137111 &(1<<((((NU8) 11))&31)))!=0);
	if (!(LOC2)) goto LA3;
	LOC2 = (targetos_142575 == ((NU8) 2));
	LA3: ;
	LOC1 = LOC2;
	if (LOC1) goto LA4;
	LOC1 = (hostos_142576 == ((NU8) 2));
	LA4: ;
	result = LOC1;
	return result;
}

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

N_NIMCALL(void, add_169880)(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_169760)(NimStringDesc* filenamewithoutext) {
	NimStringDesc* result;
	result = 0;
	result = noschangeFileExt(filenamewithoutext, cc_169402[(ccompiler_169425)- 1].Field1);
	return result;
}

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

N_NIMCALL(NimStringDesc*, getcompilecfilecmd_170292)(NimStringDesc* cfilename, NIM_BOOL isexternal) {
	NimStringDesc* result;
	NU8 c;
	NimStringDesc* options;
	NimStringDesc* exe;
	NimStringDesc* includecmd;
	NimStringDesc* compilepattern;
	NimStringDesc* cfile;
	NimStringDesc* objfile;
	NimStringDesc* LOC41;
	TY170352 LOC42;
	NimStringDesc* LOC43;
	TY170352 LOC44;
	NimStringDesc* LOC45;
	result = 0;
	c = ccompiler_169425;
	options = cfilespecificoptions_169888(cfilename);
	exe = getconfigvar_169593(c, ((NimStringDesc*) &TMP1277));
	{
		if (!(exe->Sup.len == 0)) goto LA3;
		exe = getcompilerexe_170270(c);
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = needsexeext_170234();
		if (!LOC7) goto LA8;
		exe = nosaddFileExt(exe, ((NimStringDesc*) &TMP1278));
	}
	LA8: ;
	{
		NIM_BOOL LOC12;
		NimStringDesc* LOC16;
		LOC12 = 0;
		LOC12 = ((gglobaloptions_137111 &(1<<((((NU8) 8))&31)))!=0);
		if (!(LOC12)) goto LA13;
		LOC12 = ((os_142063[(targetos_142575)- 1].Field12 &(1<<((((NU8) 0))&7)))!=0);
		LA13: ;
		if (!LOC12) goto LA14;
		LOC16 = 0;
		LOC16 = rawNewString(cc_169402[(c)- 1].Field16->Sup.len + 1);
appendChar(LOC16, 32);
appendString(LOC16, cc_169402[(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;
		NimStringDesc* includedir_170340;
		NI i_170362;
		NI l_170364;
		LOC19 = 0;
		LOC19 = noabsolutepaths_169831();
		if (!!(LOC19)) goto LA20;
		LOC22 = 0;
		LOC23 = 0;
		LOC23 = nospquoteShell(libpath_137205);
		LOC22 = rawNewString(cc_169402[(c)- 1].Field12->Sup.len + LOC23->Sup.len + 0);
appendString(LOC22, cc_169402[(c)- 1].Field12);
appendString(LOC22, LOC23);
		includecmd = LOC22;
		includedir_170340 = 0;
		i_170362 = 0;
		l_170364 = cincludes_169448->Sup.len;
		while (1) {
			TY137892 LOC25;
			if (!(i_170362 < l_170364)) goto LA24;
			includedir_170340 = cincludes_169448->data[i_170362];
			memset((void*)LOC25, 0, sizeof(LOC25));
			LOC25[0] = copyString(cc_169402[(c)- 1].Field12);
			LOC25[1] = nospquoteShell(includedir_170340);
			add_169880(&includecmd, LOC25, 2);
			i_170362 += 1;
		} LA24: ;
		compilepattern = nosjoinPath(ccompilerpath_169517, exe);
	}
	goto LA17;
	LA20: ;
	{
		includecmd = copyString(((NimStringDesc*) &TMP444));
		compilepattern = getcompilerexe_170270(c);
	}
	LA17: ;
	{
		NIM_BOOL LOC29;
		LOC29 = 0;
		LOC29 = noabsolutepaths_169831();
		if (!LOC29) goto LA30;
		cfile = nosextractFilename(cfilename);
	}
	goto LA27;
	LA30: ;
	{
		cfile = copyString(cfilename);
	}
	LA27: ;
	{
		NIM_BOOL LOC35;
		LOC35 = 0;
		LOC35 = !(isexternal);
		if (LOC35) goto LA36;
		LOC35 = noabsolutepaths_169831();
		LA36: ;
		if (!LOC35) goto LA37;
		objfile = toobjfile_169760(cfile);
	}
	goto LA33;
	LA37: ;
	{
		NimStringDesc* LOC40;
		LOC40 = 0;
		LOC40 = toobjfile_169760(cfile);
		objfile = completecfilepath_169753(LOC40, NIM_TRUE);
	}
	LA33: ;
	LOC41 = 0;
	LOC41 = nosaddFileExt(cfile, cext_169426);
	cfile = nospquoteShell(LOC41);
	objfile = nospquoteShell(objfile);
	memset((void*)LOC42, 0, sizeof(LOC42));
	LOC42[0] = copyString(((NimStringDesc*) &TMP1287));
	LOC42[1] = copyString(cfile);
	LOC42[2] = copyString(((NimStringDesc*) &TMP1288));
	LOC42[3] = copyString(objfile);
	LOC42[4] = copyString(((NimStringDesc*) &TMP1289));
	LOC42[5] = copyString(options);
	LOC42[6] = copyString(((NimStringDesc*) &TMP1290));
	LOC42[7] = copyString(includecmd);
	LOC42[8] = copyString(((NimStringDesc*) &TMP1291));
	LOC42[9] = getprefixdir_137330();
	LOC42[10] = copyString(((NimStringDesc*) &TMP1292));
	LOC42[11] = copyString(libpath_137205);
	LOC43 = 0;
	LOC43 = nsuFormatOpenArray(compilepattern, LOC42, 12);
	result = nospquoteShell(LOC43);
	result = addChar(result, 32);
	memset((void*)LOC44, 0, sizeof(LOC44));
	LOC44[0] = copyString(((NimStringDesc*) &TMP1287));
	LOC44[1] = copyString(cfile);
	LOC44[2] = copyString(((NimStringDesc*) &TMP1288));
	LOC44[3] = copyString(objfile);
	LOC44[4] = copyString(((NimStringDesc*) &TMP1289));
	LOC44[5] = copyString(options);
	LOC44[6] = copyString(((NimStringDesc*) &TMP1290));
	LOC44[7] = copyString(includecmd);
	LOC44[8] = copyString(((NimStringDesc*) &TMP1291));
	LOC45 = 0;
	LOC45 = getprefixdir_137330();
	LOC44[9] = nospquoteShell(LOC45);
	LOC44[10] = copyString(((NimStringDesc*) &TMP1292));
	LOC44[11] = nospquoteShell(libpath_137205);
	nsuAddf(&result, cc_169402[(c)- 1].Field6, LOC44, 12);
	return result;
}

N_NIMCALL(NI32, footprint_170368)(NimStringDesc* filename) {
	NI32 result;
	NI32 LOC1;
	NI32 LOC2;
	NI32 LOC3;
	NI32 LOC4;
	NimStringDesc* LOC5;
	result = 0;
	LOC1 = 0;
	LOC1 = crcfromfile_144031(filename);
	LOC2 = 0;
	LOC2 = HEX3EHEX3C_144489(LOC1, os_142063[(targetos_142575)- 1].Field0);
	LOC3 = 0;
	LOC3 = HEX3EHEX3C_144489(LOC2, cpu_142468[(targetcpu_142573)- 1].Field0);
	LOC4 = 0;
	LOC4 = HEX3EHEX3C_144489(LOC3, cc_169402[(ccompiler_169425)- 1].Field0);
	LOC5 = 0;
	LOC5 = getcompilecfilecmd_170292(filename, NIM_TRUE);
	result = HEX3EHEX3C_144489(LOC4, LOC5);
	return result;
}

static N_INLINE(void, writeln_138205)(FILE* f_138209, NimStringDesc** x_138213, NI x_138213Len0) {
	NimStringDesc* i_138226;
	NI i_138232;
	i_138226 = 0;
	i_138232 = 0;
	while (1) {
		if (!(i_138232 < x_138213Len0)) goto LA1;
		i_138226 = x_138213[i_138232];
		write_10463(f_138209, i_138226);
		i_138232 += 1;
	} LA1: ;
	write_10463(f_138209, ((NimStringDesc*) &TMP1295));
}

N_NIMCALL(NIM_BOOL, externalfilechanged_170374)(NimStringDesc* filename) {
	NIM_BOOL result;
	NimStringDesc* crcfile;
	NimStringDesc* LOC1;
	NI currentcrc;
	NI32 LOC2;
	FILE* f;
	result = 0;
	LOC1 = 0;
	LOC1 = withpackagename_137873(filename);
	crcfile = togeneratedfile_137883(LOC1, ((NimStringDesc*) &TMP1177));
	LOC2 = 0;
	LOC2 = footprint_170368(filename);
	currentcrc = ((NI) (LOC2));
	f = 0;
	{
		NIM_BOOL LOC5;
		NimStringDesc* line;
		NI oldcrc;
		LOC5 = 0;
		LOC5 = open_10203(&f, crcfile, ((NU8) 0), -1);
		if (!LOC5) goto LA6;
		line = rawNewString(40);
		{
			NIM_BOOL LOC10;
			LOC10 = 0;
			LOC10 = readline_10487(f, &line);
			if (!!(LOC10)) goto LA11;
			line = copyString(((NimStringDesc*) &TMP1293));
		}
		LA11: ;
		fclose(f);
		oldcrc = nsuParseInt(line);
		result = !((oldcrc == currentcrc));
	}
	goto LA3;
	LA6: ;
	{
		result = NIM_TRUE;
	}
	LA3: ;
	{
		if (!result) goto LA16;
		{
			NIM_BOOL LOC20;
			TY165002 LOC23;
			LOC20 = 0;
			LOC20 = open_10203(&f, crcfile, ((NU8) 1), -1);
			if (!LOC20) goto LA21;
			memset((void*)LOC23, 0, sizeof(LOC23));
			LOC23[0] = nimIntToStr(currentcrc);
			writeln_138205(f, LOC23, 1);
			fclose(f);
		}
		LA21: ;
	}
	LA16: ;
	return result;
}

N_NIMCALL(void, addexternalfiletocompile_170407)(NimStringDesc* filename) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((gglobaloptions_137111 &(1<<((((NU8) 1))&31)))!=0);
		if (LOC3) goto LA4;
		LOC3 = externalfilechanged_170374(filename);
		LA4: ;
		if (!LOC3) goto LA5;
		appendstr_118268(&externaltocompile_169514, filename);
	}
	LA5: ;
}

N_NIMCALL(void, addfiletolink_169779)(NimStringDesc* filename) {
	prependstr_118420(&tolink_169512, filename);
}

N_NIMCALL(void, addcompileoption_169707)(NimStringDesc* option) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = nsuFindStr(compileoptions_169516, option, 0);
		if (!(LOC3 < 0)) goto LA4;
		addopt_169693(&compileoptions_169516, option);
	}
	LA4: ;
}

N_NIMCALL(void, addlinkoption_169700)(NimStringDesc* option) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = nsuFindStr(linkoptions_169515, option, 0);
		if (!(LOC3 < 0)) goto LA4;
		addopt_169693(&linkoptions_169515, option);
	}
	LA4: ;
}

N_NIMCALL(NU8, nametocc_169525)(NimStringDesc* name) {
	NU8 result;
	NU8 i_169585;
	NU8 res_169588;
	result = 0;
	i_169585 = 0;
	res_169588 = ((NU8) 1);
	while (1) {
		if (!(res_169588 <= ((NU8) 12))) goto LA1;
		i_169585 = res_169588;
		{
			NI LOC4;
			LOC4 = 0;
			LOC4 = nsuCmpIgnoreStyle(name, cc_169402[(i_169585)- 1].Field0);
			if (!(LOC4 == 0)) goto LA5;
			result = i_169585;
			goto BeforeRet;
		}
		LA5: ;
		res_169588 += 1;
	} LA1: ;
	result = ((NU8) 0);
	BeforeRet: ;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell41090* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_44443(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell41090* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_44443((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_46002(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, setcc_169632)(NimStringDesc* ccname) {
	NU8 i_169686;
	NU8 res_169688;
	ccompiler_169425 = nametocc_169525(ccname);
	{
		if (!(ccompiler_169425 == ((NU8) 0))) goto LA3;
		rawmessage_165386(((NU16) 49), ccname);
	}
	LA3: ;
	asgnRefNoCycle((void**) &compileoptions_169516, getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1364)));
	asgnRefNoCycle((void**) &linkoptions_169515, getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1365)));
	asgnRefNoCycle((void**) &ccompilerpath_169517, getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1366)));
	i_169686 = 0;
	res_169688 = ((NU8) 1);
	while (1) {
		if (!(res_169688 <= ((NU8) 12))) goto LA5;
		i_169686 = res_169688;
		undefsymbol_168011(cc_169402[(i_169686)- 1].Field0);
		res_169688 += 1;
	} LA5: ;
	definesymbol_168006(cc_169402[(ccompiler_169425)- 1].Field0);
}

N_NIMCALL(void, initvars_169714)(void) {
	NU8 i_169728;
	NU8 res_169748;
	NimStringDesc* LOC11;
	NimStringDesc* LOC12;
	i_169728 = 0;
	res_169748 = ((NU8) 1);
	while (1) {
		if (!(res_169748 <= ((NU8) 12))) goto LA1;
		i_169728 = res_169748;
		undefsymbol_168011(cc_169402[(i_169728)- 1].Field0);
		res_169748 += 1;
	} LA1: ;
	definesymbol_168006(cc_169402[(ccompiler_169425)- 1].Field0);
	{
		NimStringDesc* LOC6;
		if (!(gcmd_137113 == ((NU8) 2))) goto LA4;
		LOC6 = 0;
		LOC6 = cext_169426; cext_169426 = copyStringRC1(((NimStringDesc*) &TMP1544));
		if (LOC6) nimGCunrefNoCycle(LOC6);
	}
	goto LA2;
	LA4: ;
	{
		NimStringDesc* LOC10;
		if (!(gcmd_137113 == ((NU8) 3))) goto LA8;
		LOC10 = 0;
		LOC10 = cext_169426; cext_169426 = copyStringRC1(((NimStringDesc*) &TMP1545));
		if (LOC10) nimGCunrefNoCycle(LOC10);
	}
	goto LA2;
	LA8: ;
	LA2: ;
	LOC11 = 0;
	LOC11 = getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1364));
	addcompileoption_169707(LOC11);
	LOC12 = 0;
	LOC12 = getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1365));
	addlinkoption_169700(LOC12);
	{
		if (!(ccompilerpath_169517->Sup.len == 0)) goto LA15;
		asgnRefNoCycle((void**) &ccompilerpath_169517, getconfigvar_169593(ccompiler_169425, ((NimStringDesc*) &TMP1366)));
	}
	LA15: ;
}

N_NIMCALL(void, addfiletocompile_169766)(NimStringDesc* filename) {
	appendstr_118268(&tocompile_169513, filename);
}

N_NIMCALL(trope145007*, genmappingfiles_170785)(tlinkedlist118023 list) {
	trope145007* result;
	tstrentry118019* it;
	result = 0;
	it = ((tstrentry118019*) (list.Head));
	while (1) {
		TY145497 LOC2;
		NimStringDesc* LOC3;
		if (!!((it == NIM_NIL))) goto LA1;
		memset((void*)LOC2, 0, sizeof(LOC2));
		LOC3 = 0;
		LOC3 = nosaddFileExt((*it).Data, cext_169426);
		LOC2[0] = torope_145058(LOC3);
		appf_145085(&result, ((NimStringDesc*) &TMP3898), LOC2, 1);
		it = ((tstrentry118019*) ((*it).Sup.Next));
	} LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, getcompileoptions_169945)(void) {
	NimStringDesc* result;
	result = 0;
	result = cfilespecificoptions_169888(((NimStringDesc*) &TMP3900));
	return result;
}

N_NIMCALL(NimStringDesc*, getlinkoptions_169950)(void) {
	NimStringDesc* result;
	NimStringDesc* linkedlib_170203;
	NI i_170223;
	NI l_170225;
	NimStringDesc* libdir_170216;
	NI i_170227;
	NI l_170229;
	result = 0;
	result = copyString(linkoptions_169515);
	linkedlib_170203 = 0;
	i_170223 = 0;
	l_170225 = clinkedlibs_169492->Sup.len;
	while (1) {
		NimStringDesc* LOC2;
		NimStringDesc* LOC3;
		if (!(i_170223 < l_170225)) goto LA1;
		linkedlib_170203 = clinkedlibs_169492->data[i_170223];
		LOC2 = 0;
		LOC2 = nospquoteShell(linkedlib_170203);
		LOC3 = 0;
		LOC3 = nsuFormatSingleElem(cc_169402[(ccompiler_169425)- 1].Field14, LOC2);
		result = resizeString(result, LOC3->Sup.len + 0);
appendString(result, LOC3);
		i_170223 += 1;
	} LA1: ;
	libdir_170216 = 0;
	i_170227 = 0;
	l_170229 = clibs_169470->Sup.len;
	while (1) {
		TY137892 LOC5;
		if (!(i_170227 < l_170229)) goto LA4;
		libdir_170216 = clibs_169470->data[i_170227];
		memset((void*)LOC5, 0, sizeof(LOC5));
		LOC5[0] = copyString(cc_169402[(ccompiler_169425)- 1].Field13);
		LOC5[1] = nospquoteShell(libdir_170216);
		add_169880(&result, LOC5, 2);
		i_170227 += 1;
	} LA4: ;
	return result;
}

N_NIMCALL(void, writemapping_170815)(trope145007* gsymbolmapping) {
	trope145007* code;
	trope145007* LOC5;
	trope145007* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* LOC11;
	TY145497 LOC12;
	NimStringDesc* LOC13;
	{
		if (!!(((gglobaloptions_137111 &(1<<((((NU8) 12))&31)))!=0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	code = torope_145058(((NimStringDesc*) &TMP3897));
	LOC5 = 0;
	LOC5 = genmappingfiles_170785(tocompile_169513);
	app_145040(&code, LOC5);
	LOC6 = 0;
	LOC6 = genmappingfiles_170785(externaltocompile_169514);
	app_145040(&code, LOC6);
	app_145046(&code, ((NimStringDesc*) &TMP3899));
	LOC7 = 0;
	LOC7 = getcompileoptions_169945();
	LOC8 = 0;
	LOC8 = nsuEscape(LOC7, ((NimStringDesc*) &TMP3901), ((NimStringDesc*) &TMP3901));
	app_145046(&code, LOC8);
	app_145046(&code, ((NimStringDesc*) &TMP3902));
	LOC9 = 0;
	LOC9 = getlinkoptions_169950();
	LOC10 = 0;
	LOC10 = nsuEscape(LOC9, ((NimStringDesc*) &TMP3901), ((NimStringDesc*) &TMP3901));
	app_145046(&code, LOC10);
	app_145046(&code, ((NimStringDesc*) &TMP3903));
	LOC11 = 0;
	LOC11 = nsuEscape(libpath_137205, ((NimStringDesc*) &TMP3901), ((NimStringDesc*) &TMP3901));
	app_145046(&code, LOC11);
	memset((void*)LOC12, 0, sizeof(LOC12));
	LOC12[0] = gsymbolmapping;
	appf_145085(&code, ((NimStringDesc*) &TMP3904), LOC12, 1);
	LOC13 = 0;
	LOC13 = nosjoinPath(gprojectpath_137207, ((NimStringDesc*) &TMP3905));
	writerope_146407(code, LOC13, NIM_FALSE);
	BeforeRet: ;
}

N_NIMCALL(void, compilecfile_170426)(tlinkedlist118023 list, trope145007** script, TY110805** cmds, NIM_BOOL isexternal) {
	tstrentry118019* it;
	it = ((tstrentry118019*) (list.Head));
	while (1) {
		NimStringDesc* compilecmd;
		if (!!((it == NIM_NIL))) goto LA1;
		filecounter_169877 += 1;
		compilecmd = getcompilecfilecmd_170292((*it).Data, isexternal);
		{
			NimStringDesc* LOC6;
			if (!!(((gglobaloptions_137111 &(1<<((((NU8) 4))&31)))!=0))) goto LA4;
			(*cmds) = (TY110805*) incrSeq(&((*cmds))->Sup, sizeof(NimStringDesc*));
			LOC6 = 0;
			LOC6 = (*cmds)->data[(*cmds)->Sup.len-1]; (*cmds)->data[(*cmds)->Sup.len-1] = copyStringRC1(compilecmd);
			if (LOC6) nimGCunrefNoCycle(LOC6);
		}
		LA4: ;
		{
			if (!((gglobaloptions_137111 &(1<<((((NU8) 11))&31)))!=0)) goto LA9;
			app_145046(script, compilecmd);
			app_145046(script, tnl_142593);
		}
		LA9: ;
		it = ((tstrentry118019*) ((*it).Sup.Next));
	} LA1: ;
}

static N_INLINE(NimStringDesc*, libnametmpl_169498)(void) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(targetos_142575 == ((NU8) 2))) goto LA3;
		result = copyString(((NimStringDesc*) &TMP3913));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP3914));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, execexternalprogram_169785)(NimStringDesc* cmd) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((gglobaloptions_137111 &(1<<((((NU8) 3))&31)))!=0);
		if (LOC3) goto LA4;
		LOC3 = (0 < gverbosity_137120);
		LA4: ;
		if (!LOC3) goto LA5;
		msgwriteln_164937(cmd);
	}
	LA5: ;
	{
		NI LOC9;
		LOC9 = 0;
		LOC9 = nospexecCmd(cmd);
		if (!!((LOC9 == 0))) goto LA10;
		rawmessage_165386(((NU16) 65), ((NimStringDesc*) &TMP444));
	}
	LA10: ;
}

N_NIMCALL(NimStringDesc*, getlinkerexe_170285)(NU8 compiler) {
	NimStringDesc* result;
	result = 0;
	{
		if (!(0 < cc_169402[(compiler)- 1].Field10->Sup.len)) goto LA3;
		result = copyString(cc_169402[(compiler)- 1].Field10);
	}
	goto LA1;
	LA3: ;
	{
		result = getcompilerexe_170270(compiler);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, generatescript_169804)(NimStringDesc* projectfile, trope145007* script) {
	TY108700 LOC1;
	NimStringDesc* dir;
	NimStringDesc* name;
	NimStringDesc* ext;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	memset((void*)&LOC1, 0, sizeof(LOC1));
	nossplitFile(projectfile, &LOC1);
	dir = LOC1.Field0;
	name = LOC1.Field1;
	ext = LOC1.Field2;
	LOC2 = 0;
	LOC2 = rawNewString(name->Sup.len + 8);
appendString(LOC2, ((NimStringDesc*) &TMP3920));
appendString(LOC2, name);
	LOC3 = 0;
	LOC3 = nosaddFileExt(LOC2, os_142063[(targetos_142575)- 1].Field8);
	LOC4 = 0;
	LOC4 = HEX2F_108477(dir, LOC3);
	writerope_146407(script, LOC4, NIM_FALSE);
}

N_NIMCALL(void, callccompiler_170516)(NimStringDesc* projectfile) {
	NimStringDesc* linkcmd;
	NimStringDesc* buildgui;
	NimStringDesc* builddll;
	NU8 c;
	trope145007* script;
	TY110805* cmds;
	linkcmd = 0;
	buildgui = 0;
	builddll = 0;
	{
		if (!((gglobaloptions_137111 & 2064) == 16)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	filecounter_169877 = 0;
	c = ccompiler_169425;
	script = NIM_NIL;
	cmds = (TY110805*) newSeq((&NTI110805), 0);
	compilecfile_170426(tocompile_169513, &script, &cmds, NIM_FALSE);
	compilecfile_170426(externaltocompile_169514, &script, &cmds, NIM_TRUE);
	{
		NI res;
		if (!!(((gglobaloptions_137111 &(1<<((((NU8) 4))&31)))!=0))) goto LA7;
		{
			if (!(gnumberofprocessors_137121 == 0)) goto LA11;
			gnumberofprocessors_137121 = nospcountProcessors();
		}
		LA11: ;
		res = 0;
		{
			NI i_170610;
			NI HEX3Atmp_170776;
			NI res_170778;
			if (!(gnumberofprocessors_137121 <= 1)) goto LA15;
			i_170610 = 0;
			HEX3Atmp_170776 = 0;
			HEX3Atmp_170776 = (cmds->Sup.len-1);
			res_170778 = 0;
			while (1) {
				NI LOC18;
				if (!(res_170778 <= HEX3Atmp_170776)) goto LA17;
				i_170610 = res_170778;
				LOC18 = 0;
				LOC18 = nospexecCmd(cmds->data[i_170610]);
				res = ((LOC18 >= res) ? LOC18 : res);
				res_170778 += 1;
			} LA17: ;
		}
		goto LA13;
		LA15: ;
		{
			NIM_BOOL LOC20;
			LOC20 = 0;
			LOC20 = ((gglobaloptions_137111 &(1<<((((NU8) 3))&31)))!=0);
			if (LOC20) goto LA21;
			LOC20 = (0 < gverbosity_137120);
			LA21: ;
			if (!LOC20) goto LA22;
			res = nospexecProcesses(cmds->data, cmds->Sup.len, 19, gnumberofprocessors_137121);
		}
		goto LA13;
		LA22: ;
		{
			res = nospexecProcesses(cmds->data, cmds->Sup.len, 18, gnumberofprocessors_137121);
		}
		LA13: ;
		{
			if (!!((res == 0))) goto LA27;
			{
				TY523288 LOC33;
				if (!(gnumberofprocessors_137121 <= 1)) goto LA31;
				memset((void*)LOC33, 0, sizeof(LOC33));
				rawmessage_165292(((NU16) 65), LOC33, 0);
			}
			goto LA29;
			LA31: ;
			{
				rawmessage_165386(((NU16) 4), ((NimStringDesc*) &TMP3911));
			}
			LA29: ;
		}
		LA27: ;
	}
	LA7: ;
	{
		tstrentry118019* it;
		NimStringDesc* objfiles;
		if (!!(((gglobaloptions_137111 &(1<<((((NU8) 5))&31)))!=0))) goto LA37;
		it = ((tstrentry118019*) (tolink_169512.Head));
		objfiles = copyString(((NimStringDesc*) &TMP444));
		while (1) {
			NimStringDesc* objfile;
			NimStringDesc* LOC46;
			NimStringDesc* LOC47;
			if (!!((it == NIM_NIL))) goto LA39;
			{
				NIM_BOOL LOC42;
				LOC42 = 0;
				LOC42 = noabsolutepaths_169831();
				if (!LOC42) goto LA43;
				objfile = nosextractFilename((*it).Data);
			}
			goto LA40;
			LA43: ;
			{
				objfile = (*it).Data;
			}
			LA40: ;
			objfiles = addChar(objfiles, 32);
			LOC46 = 0;
			LOC46 = nosaddFileExt(objfile, cc_169402[(ccompiler_169425)- 1].Field1);
			LOC47 = 0;
			LOC47 = nospquoteShell(LOC46);
			objfiles = resizeString(objfiles, LOC47->Sup.len + 0);
appendString(objfiles, LOC47);
			it = ((tstrentry118019*) ((*it).Sup.Next));
		} LA39: ;
		{
			TY165283 LOC52;
			NimStringDesc* LOC53;
			if (!((gglobaloptions_137111 &(1<<((((NU8) 9))&31)))!=0)) goto LA50;
			memset((void*)LOC52, 0, sizeof(LOC52));
			LOC52[0] = copyString(((NimStringDesc*) &TMP3912));
			LOC53 = 0;
			LOC53 = libnametmpl_169498();
			LOC52[1] = nsuFormatSingleElem(LOC53, gprojectname_137206);
			LOC52[2] = copyString(((NimStringDesc*) &TMP3915));
			LOC52[3] = copyString(objfiles);
			linkcmd = nsuFormatOpenArray(cc_169402[(c)- 1].Field9, LOC52, 4);
			{
				if (!!(((gglobaloptions_137111 &(1<<((((NU8) 4))&31)))!=0))) goto LA56;
				execexternalprogram_169785(linkcmd);
			}
			LA56: ;
		}
		goto LA48;
		LA50: ;
		{
			NimStringDesc* linkerexe;
			NimStringDesc* exefile;
			NimStringDesc* linkoptions;
			TY170736 LOC103;
			NimStringDesc* LOC104;
			TY170736 LOC105;
			NimStringDesc* LOC106;
			linkerexe = getconfigvar_169593(c, ((NimStringDesc*) &TMP3916));
			{
				if (!(linkerexe->Sup.len == 0)) goto LA61;
				linkerexe = getlinkerexe_170285(c);
			}
			LA61: ;
			{
				NIM_BOOL LOC65;
				LOC65 = 0;
				LOC65 = needsexeext_170234();
				if (!LOC65) goto LA66;
				linkerexe = nosaddFileExt(linkerexe, ((NimStringDesc*) &TMP1278));
			}
			LA66: ;
			{
				NIM_BOOL LOC70;
				LOC70 = 0;
				LOC70 = noabsolutepaths_169831();
				if (!LOC70) goto LA71;
				linkcmd = nospquoteShell(linkerexe);
			}
			goto LA68;
			LA71: ;
			{
				NimStringDesc* LOC74;
				LOC74 = 0;
				LOC74 = nosjoinPath(ccompilerpath_169517, linkerexe);
				linkcmd = nospquoteShell(LOC74);
			}
			LA68: ;
			{
				if (!((gglobaloptions_137111 &(1<<((((NU8) 10))&31)))!=0)) goto LA77;
				buildgui = copyString(cc_169402[(c)- 1].Field7);
			}
			goto LA75;
			LA77: ;
			{
				buildgui = copyString(((NimStringDesc*) &TMP444));
			}
			LA75: ;
			exefile = 0;
			{
				TY108700 LOC84;
				if (!((gglobaloptions_137111 &(1<<((((NU8) 8))&31)))!=0)) goto LA82;
				memset((void*)&LOC84, 0, sizeof(LOC84));
				nossplitFile(projectfile, &LOC84);
				exefile = nsuFormatSingleElem(os_142063[(targetos_142575)- 1].Field2, LOC84.Field1);
				builddll = copyString(cc_169402[(c)- 1].Field8);
			}
			goto LA80;
			LA82: ;
			{
				NimStringDesc* LOC86;
				TY108700 LOC87;
				LOC86 = 0;
				memset((void*)&LOC87, 0, sizeof(LOC87));
				nossplitFile(projectfile, &LOC87);
				LOC86 = rawNewString(LOC87.Field1->Sup.len + os_142063[(targetos_142575)- 1].Field10->Sup.len + 0);
appendString(LOC86, LOC87.Field1);
appendString(LOC86, os_142063[(targetos_142575)- 1].Field10);
				exefile = LOC86;
				builddll = copyString(((NimStringDesc*) &TMP444));
			}
			LA80: ;
			{
				if (!(0 < outfile_137117->Sup.len)) goto LA90;
				exefile = expandtilde_116022(outfile_137117);
			}
			LA90: ;
			{
				NIM_BOOL LOC94;
				LOC94 = 0;
				LOC94 = noabsolutepaths_169831();
				if (!!(LOC94)) goto LA95;
				{
					NIM_BOOL LOC99;
					TY108700 LOC102;
					LOC99 = 0;
					LOC99 = nosisAbsolute(exefile);
					if (!!(LOC99)) goto LA100;
					memset((void*)&LOC102, 0, sizeof(LOC102));
					nossplitFile(projectfile, &LOC102);
					exefile = nosjoinPath(LOC102.Field0, exefile);
				}
				LA100: ;
			}
			LA95: ;
			exefile = nospquoteShell(exefile);
			linkoptions = getlinkoptions_169950();
			memset((void*)LOC103, 0, sizeof(LOC103));
			LOC103[0] = copyString(((NimStringDesc*) &TMP3917));
			LOC103[1] = copyString(builddll);
			LOC103[2] = copyString(((NimStringDesc*) &TMP3918));
			LOC103[3] = copyString(buildgui);
			LOC103[4] = copyString(((NimStringDesc*) &TMP1289));
			LOC103[5] = copyString(linkoptions);
			LOC103[6] = copyString(((NimStringDesc*) &TMP3915));
			LOC103[7] = copyString(objfiles);
			LOC103[8] = copyString(((NimStringDesc*) &TMP3919));
			LOC103[9] = copyString(exefile);
			LOC103[10] = copyString(((NimStringDesc*) &TMP1291));
			LOC103[11] = getprefixdir_137330();
			LOC103[12] = copyString(((NimStringDesc*) &TMP1292));
			LOC103[13] = copyString(libpath_137205);
			LOC104 = 0;
			LOC104 = nsuFormatOpenArray(linkcmd, LOC103, 14);
			linkcmd = nospquoteShell(LOC104);
			linkcmd = addChar(linkcmd, 32);
			memset((void*)LOC105, 0, sizeof(LOC105));
			LOC105[0] = copyString(((NimStringDesc*) &TMP3917));
			LOC105[1] = copyString(builddll);
			LOC105[2] = copyString(((NimStringDesc*) &TMP3918));
			LOC105[3] = copyString(buildgui);
			LOC105[4] = copyString(((NimStringDesc*) &TMP1289));
			LOC105[5] = copyString(linkoptions);
			LOC105[6] = copyString(((NimStringDesc*) &TMP3915));
			LOC105[7] = copyString(objfiles);
			LOC105[8] = copyString(((NimStringDesc*) &TMP3919));
			LOC105[9] = copyString(exefile);
			LOC105[10] = copyString(((NimStringDesc*) &TMP1291));
			LOC106 = 0;
			LOC106 = getprefixdir_137330();
			LOC105[11] = nospquoteShell(LOC106);
			LOC105[12] = copyString(((NimStringDesc*) &TMP1292));
			LOC105[13] = nospquoteShell(libpath_137205);
			nsuAddf(&linkcmd, cc_169402[(c)- 1].Field11, LOC105, 14);
			{
				if (!!(((gglobaloptions_137111 &(1<<((((NU8) 4))&31)))!=0))) goto LA109;
				execexternalprogram_169785(linkcmd);
			}
			LA109: ;
		}
		LA48: ;
	}
	goto LA35;
	LA37: ;
	{
		linkcmd = copyString(((NimStringDesc*) &TMP444));
	}
	LA35: ;
	{
		if (!((gglobaloptions_137111 &(1<<((((NU8) 11))&31)))!=0)) goto LA114;
		app_145046(&script, linkcmd);
		app_145046(&script, tnl_142593);
		generatescript_169804(projectfile, script);
	}
	LA114: ;
	BeforeRet: ;
}

N_NIMCALL(void, resetcompilationlists_169772)(void) {
	initlinkedlist_118036(&tocompile_169513);
	initlinkedlist_118036(&externaltocompile_169514);
	initlinkedlist_118036(&tolink_169512);
}
N_NOINLINE(void, extccompInit)(void) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	ccompiler_169425 = ((NU8) 1);
	LOC1 = 0;
	LOC1 = cext_169426; cext_169426 = copyStringRC1(((NimStringDesc*) &TMP443));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	if (cincludes_169448) nimGCunrefNoCycle(cincludes_169448);
	cincludes_169448 = (TY110805*) newSeqRC1((&NTI110805), 0);
	if (clibs_169470) nimGCunrefNoCycle(clibs_169470);
	clibs_169470 = (TY110805*) newSeqRC1((&NTI110805), 0);
	if (clinkedlibs_169492) nimGCunrefNoCycle(clinkedlibs_169492);
	clinkedlibs_169492 = (TY110805*) newSeqRC1((&NTI110805), 0);
	LOC2 = 0;
	LOC2 = linkoptions_169515; linkoptions_169515 = copyStringRC1(((NimStringDesc*) &TMP444));
	if (LOC2) nimGCunrefNoCycle(LOC2);
	LOC3 = 0;
	LOC3 = compileoptions_169516; compileoptions_169516 = copyStringRC1(((NimStringDesc*) &TMP444));
	if (LOC3) nimGCunrefNoCycle(LOC3);
	LOC4 = 0;
	LOC4 = ccompilerpath_169517; ccompilerpath_169517 = copyStringRC1(((NimStringDesc*) &TMP444));
	if (LOC4) nimGCunrefNoCycle(LOC4);
}

N_NOINLINE(void, extccompDatInit)(void) {
}

