/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 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 tlinkedlist126028 tlinkedlist126028;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tlistentry126022 tlistentry126022;
typedef struct tpass285017 tpass285017;
typedef struct tpasscontext285005 tpasscontext285005;
typedef struct tsym224846 tsym224846;
typedef struct trodreader275030 trodreader275030;
typedef struct tnode224816 tnode224816;
typedef struct tcell44935 tcell44935;
typedef struct TNimType TNimType;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct TY610058 TY610058;
typedef struct tmoduleinmemory610017 tmoduleinmemory610017;
typedef struct TY224936 TY224936;
typedef struct jsonnodeobj335042 jsonnodeobj335042;
typedef struct stringtableobj130012 stringtableobj130012;
typedef struct TNimObject TNimObject;
typedef struct TNimNode TNimNode;
typedef struct keyvaluepairseq130010 keyvaluepairseq130010;
typedef struct keyvaluepair130008 keyvaluepair130008;
typedef struct TY335057 TY335057;
typedef struct TY335611 TY335611;
typedef struct TY335062 TY335062;
typedef struct tstrentry126024 tstrentry126024;
typedef struct tllstream210204 tllstream210204;
typedef struct tlexer214190 tlexer214190;
typedef struct tbaselexer212024 tbaselexer212024;
typedef struct tlineinfo194539 tlineinfo194539;
typedef struct ttoken214186 ttoken214186;
typedef struct tident199021 tident199021;
typedef struct TY118808 TY118808;
typedef struct tidobj199015 tidobj199015;
typedef struct ttypeseq224848 ttypeseq224848;
typedef struct ttype224852 ttype224852;
typedef struct tscope224840 tscope224840;
typedef struct TY224947 TY224947;
typedef struct tinstantiation224836 tinstantiation224836;
typedef struct tstrtable224820 tstrtable224820;
typedef struct tsymseq224818 tsymseq224818;
typedef struct tloc224830 tloc224830;
typedef struct trope176009 trope176009;
typedef struct tlib224834 tlib224834;
typedef struct tindex275028 tindex275028;
typedef struct tiitable234274 tiitable234274;
typedef struct tiipairseq234272 tiipairseq234272;
typedef struct tiipair234270 tiipair234270;
typedef struct tidtable224864 tidtable224864;
typedef struct tidpairseq224862 tidpairseq224862;
typedef struct tidpair224860 tidpair224860;
typedef struct memfile273208 memfile273208;
typedef struct tnodeseq224810 tnodeseq224810;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tlinkedlist126028  {
tlistentry126022* Head;
tlistentry126022* Tail;
NI Counter;
};
typedef N_NIMCALL_PTR(tpasscontext285005*, tpassopen285009) (tsym224846* module);
typedef N_NIMCALL_PTR(tpasscontext285005*, tpassopencached285011) (tsym224846* module, trodreader275030* rd);
typedef N_NIMCALL_PTR(tnode224816*, tpassprocess285015) (tpasscontext285005* p, tnode224816* toplevelstmt);
typedef N_NIMCALL_PTR(tnode224816*, tpassclose285013) (tpasscontext285005* p, tnode224816* n);
struct tpass285017 {
tpassopen285009 Field0;
tpassopencached285011 Field1;
tpassprocess285015 Field2;
tpassclose285013 Field3;
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  tmoduleinmemory610017  {
NF Compiledat;
NI32 Crc;
TY224936* Deps;
NU8 Needsrecompile;
NU8 Crcstatus;
};
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct keyvaluepair130008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  stringtableobj130012  {
  TNimObject Sup;
NI Counter;
keyvaluepairseq130010* Data;
NU8 Mode;
};
struct TY335611 {
NimStringDesc* Field0;
jsonnodeobj335042* Field1;
};
struct  jsonnodeobj335042  {
NU8 Kind;
union {
struct {NimStringDesc* Str;
} S1;
struct {NI64 Num;
} S2;
struct {NF Fnum;
} S3;
struct {NIM_BOOL Bval;
} S4;
struct {TY335057* Fields;
} S6;
struct {TY335062* Elems;
} S7;
} kindU;
};
struct  tlistentry126022  {
  TNimObject Sup;
tlistentry126022* Prev;
tlistentry126022* Next;
};
struct  tstrentry126024  {
  tlistentry126022 Sup;
NimStringDesc* Data;
};
typedef TY335611 TY613683[4];
struct  tbaselexer212024  {
  TNimObject Sup;
NI Bufpos;
NCSTRING Buf;
NI Buflen;
tllstream210204* Stream;
NI Linenumber;
NI Sentinel;
NI Linestart;
};
struct  tlineinfo194539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (tlineinfo194539 info, NU16 msg, NimStringDesc* arg, void* ClEnv);
void* ClEnv;
} terrorhandler214188;
struct  tlexer214190  {
  tbaselexer212024 Sup;
NI32 Fileidx;
NI Indentahead;
NI Currlineindent;
NIM_BOOL Strongspaces;
terrorhandler214188 Errorhandler;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  ttoken214186  {
NU8 Toktype;
NI Indent;
tident199021* Ident;
NI64 Inumber;
NF Fnumber;
NU8 Base;
NI8 Strongspacea;
NI8 Strongspaceb;
NimStringDesc* Literal;
NI Line;
NI Col;
};
struct  tidobj199015  {
  TNimObject Sup;
NI Id;
};
struct  tstrtable224820  {
NI Counter;
tsymseq224818* Data;
};
struct  tloc224830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype224852* T;
trope176009* R;
trope176009* Heaproot;
};
struct  tsym224846  {
  tidobj199015 Sup;
NU8 Kind;
union {
struct {ttypeseq224848* Typeinstcache;
tscope224840* Typscope;
} S1;
struct {TY224947* Procinstcache;
tscope224840* Scope;
} S2;
struct {TY224947* Usedgenerics;
tstrtable224820 Tab;
} S3;
struct {tsym224846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype224852* Typ;
tident199021* Name;
tlineinfo194539 Info;
tsym224846* Owner;
NU32 Flags;
tnode224816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc224830 Loc;
tlib224834* Annex;
tnode224816* Constraint;
};
typedef tpass285017 TY612650[3];
typedef tident199021* TY199034[8192];
typedef N_NIMCALL_PTR(void, TY609261) (void);
typedef NimStringDesc* TY207063[3];
struct  tpasscontext285005  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  tiipair234270  {
NI Key;
NI Val;
};
struct  tiitable234274  {
NI Counter;
tiipairseq234272* Data;
};
struct  tindex275028  {
NI Lastidxkey;
NI Lastidxval;
tiitable234274 Tab;
NimStringDesc* R;
NI Offset;
};
struct  tidpair224860  {
tidobj199015* Key;
TNimObject* Val;
};
struct  tidtable224864  {
NI Counter;
tidpairseq224862* Data;
};
struct  memfile273208  {
void* Mem;
NI Size;
int Handle;
};
struct  trodreader275030  {
  TNimObject Sup;
NI Pos;
NCSTRING S;
NU32 Options;
NU8 Reason;
TY224936* Moddeps;
TY224936* Files;
NI Dataidx;
NI Convertersidx;
NI Initidx;
NI Interfidx;
NI Compilerprocsidx;
NI Methodsidx;
NimStringDesc* Filename;
tindex275028 Index;
tindex275028 Imports;
NI Readerindex;
NI Line;
NI Moduleid;
tidtable224864 Syms;
memfile273208 Memfile;
tsymseq224818* Methods;
NimStringDesc* Origfile;
NIM_BOOL Inviewmode;
};
struct  tnode224816  {
ttype224852* Typ;
tlineinfo194539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym224846* Sym;
} S4;
struct {tident199021* Ident;
} S5;
struct {tnodeseq224810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
typedef NI TY26420[16];
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tllstream210204  {
  TNimObject Sup;
NU8 Kind;
FILE* F;
NimStringDesc* S;
NI Rd;
NI Wr;
NI Lineoffset;
};
struct  tident199021  {
  tidobj199015 Sup;
NimStringDesc* S;
tident199021* Next;
NI H;
};
struct  ttype224852  {
  tidobj199015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq224848* Sons;
tnode224816* N;
tsym224846* Owner;
tsym224846* Sym;
tsym224846* Destructor;
tsym224846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc224830 Loc;
};
struct  tscope224840  {
NI Depthlevel;
tstrtable224820 Symbols;
tnodeseq224810* Usingsyms;
tscope224840* Parent;
};
struct  tinstantiation224836  {
tsym224846* Sym;
ttypeseq224848* Concretetypes;
TY224936* Usedby;
};
struct  trope176009  {
  TNimObject Sup;
trope176009* Left;
trope176009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlib224834  {
  tlistentry126022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope176009* Name;
tnode224816* Path;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct TY224936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY610058 {
  TGenericSeq Sup;
  tmoduleinmemory610017 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq130010 {
  TGenericSeq Sup;
  keyvaluepair130008 data[SEQ_DECL_SIZE];
};
struct TY335057 {
  TGenericSeq Sup;
  TY335611 data[SEQ_DECL_SIZE];
};
struct TY335062 {
  TGenericSeq Sup;
  jsonnodeobj335042* data[SEQ_DECL_SIZE];
};
struct TY118808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct ttypeseq224848 {
  TGenericSeq Sup;
  ttype224852* data[SEQ_DECL_SIZE];
};
struct TY224947 {
  TGenericSeq Sup;
  tinstantiation224836* data[SEQ_DECL_SIZE];
};
struct tsymseq224818 {
  TGenericSeq Sup;
  tsym224846* data[SEQ_DECL_SIZE];
};
struct tiipairseq234272 {
  TGenericSeq Sup;
  tiipair234270 data[SEQ_DECL_SIZE];
};
struct tidpairseq224862 {
  TGenericSeq Sup;
  tidpair224860 data[SEQ_DECL_SIZE];
};
struct tnodeseq224810 {
  TGenericSeq Sup;
  tnode224816* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, clearpasses_285206)(void);
N_NIMCALL(NF, ntepochTime)(void);
N_NIMCALL(void, appendstr_126286)(tlinkedlist126028* list, NimStringDesc* data);
N_NIMCALL(void, prependstr_126424)(tlinkedlist126028* list, NimStringDesc* data);
static N_INLINE(void, setid_223446)(NI id);
N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(void, commandcompiletoc_612268)(void);
N_NIMCALL(void, semanticpasses_612230)(void);
N_NIMCALL(void, registerpass_285214)(tpass285017 p);
N_NIMCALL(tpasscontext285005*, verboseopen_606012)(tsym224846* s);
N_NIMCALL(tnode224816*, verboseprocess_606023)(tpasscontext285005* context, tnode224816* n);
N_NIMCALL(tpasscontext285005*, myopen_543456)(tsym224846* module);
N_NIMCALL(tpasscontext285005*, myopencached_543499)(tsym224846* module, trodreader275030* rd);
N_NIMCALL(tnode224816*, myprocess_543640)(tpasscontext285005* context, tnode224816* n);
N_NIMCALL(tnode224816*, myclose_543656)(tpasscontext285005* context, tnode224816* n);
N_NIMCALL(tpasscontext285005*, myopen_590544)(tsym224846* module);
N_NIMCALL(tpasscontext285005*, myopencached_590720)(tsym224846* module, trodreader275030* rd);
N_NIMCALL(tnode224816*, myprocess_590808)(tpasscontext285005* b, tnode224816* n);
N_NIMCALL(tnode224816*, myclose_591246)(tpasscontext285005* b, tnode224816* n);
N_NIMCALL(void, rodpass_612201)(void);
N_NIMCALL(tpasscontext285005*, myopen_301688)(tsym224846* module);
N_NIMCALL(tnode224816*, process_301205)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(tnode224816*, myclose_301701)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(void, compileproject_611077)(NI32 projectfileidx);
N_NIMCALL(void, cgenwritemodules_591360)(void);
N_NIMCALL(void, callccompiler_202541)(NimStringDesc* projectfile);
N_NIMCALL(NimStringDesc*, noschangeFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(void, resetcgenmodules_590397)(void);
N_NIMCALL(void, resetcompilationlists_201886)(void);
N_NIMCALL(void, resetcaches_547365)(void);
N_NIMCALL(void, gcfullcollect_8005)(void);
N_NIMCALL(void, setcc_201708)(NimStringDesc* ccname);
N_NIMCALL(void, definesymbol_200009)(NimStringDesc* symbol);
N_NIMCALL(void, rawmessage_196733)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(void, commandcompiletojs_612401)(void);
N_NIMCALL(void, settarget_173621)(NU8 o, NU8 c);
N_NIMCALL(tpasscontext285005*, myopen_605239)(tsym224846* s);
N_NIMCALL(tpasscontext285005*, myopencached_605228)(tsym224846* s, trodreader275030* rd);
N_NIMCALL(tnode224816*, myprocess_605062)(tpasscontext285005* b, tnode224816* n);
N_NIMCALL(tnode224816*, myclose_605197)(tpasscontext285005* b, tnode224816* n);
N_NIMCALL(void, wantmainmodule_611014)(void);
N_NIMCALL(void, loadconfigs_219811)(NimStringDesc* cfg);
N_NIMCALL(void, commanddoc_402946)(void);
N_NIMCALL(void, commanddoc2_612257)(void);
N_NIMCALL(tpasscontext285005*, myopen_608070)(tsym224846* module);
N_NIMCALL(tnode224816*, processnode_608058)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(tnode224816*, close_608018)(tpasscontext285005* p, tnode224816* n);
N_NIMCALL(void, finishdoc2pass_608114)(NimStringDesc* project);
N_NIMCALL(void, commandrst2html_402992)(void);
N_NIMCALL(void, commandrst2tex_403000)(void);
N_NIMCALL(void, commandjson_403008)(void);
N_NIMCALL(void, commandbuildindex_403054)(void);
N_NIMCALL(void, commandgendepend_612238)(void);
N_NIMCALL(tpasscontext285005*, myopen_607168)(tsym224846* module);
N_NIMCALL(tnode224816*, adddotdependency_607043)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(tnode224816*, cleanup_606077)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(void, generatedot_607009)(NimStringDesc* project);
N_NIMCALL(void, execexternalprogram_201907)(NimStringDesc* cmd, NimStringDesc* prettycmd);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, getconfigvar_168350)(NimStringDesc* key);
N_NIMCALL(jsonnodeobj335042*, newjarray_335389)(void);
N_NIMCALL(jsonnodeobj335042*, HEX25_335448)(NimStringDesc* s);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(jsonnodeobj335042*, HEX25_335608)(TY335611* keyvals, NI keyvalsLen0);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, outwriteln_196198)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, HEX24_339633)(jsonnodeobj335042* node);
N_NIMCALL(void, msgwriteln_196236)(NimStringDesc* s);
N_NIMCALL(void, commandcheck_612246)(void);
N_NIMCALL(tnode224816*, parsefile_259041)(NI32 fileidx);
N_NIMCALL(void, commandscan_612692)(void);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, maincommandarg_168319)(void);
N_NIMCALL(tllstream210204*, llstreamopen_210233)(NimStringDesc* filename, NU8 mode);
N_NIMCALL(void, inittoken_214482)(ttoken214186* l);
N_NIMCALL(void, openlexer_214277)(tlexer214190* lex, NimStringDesc* filename, tllstream210204* inputstream);
N_NIMCALL(void, rawgettok_214238)(tlexer214190* l, ttoken214186* tok);
N_NIMCALL(void, printtok_214265)(ttoken214186* tok);
N_NIMCALL(void, closelexer_214258)(tlexer214190* lex);
N_NIMCALL(void, commandinteractive_612607)(void);
N_NIMCALL(void, interactivepasses_612409)(void);
N_NIMCALL(void, initdefines_200146)(void);
N_NIMCALL(tpasscontext285005*, myopen_475283)(tsym224846* module);
N_NIMCALL(tnode224816*, myprocess_475412)(tpasscontext285005* c, tnode224816* n);
N_NIMCALL(void, compilesystemmodule_610988)(void);
N_NIMCALL(tsym224846*, compilemodule_610776)(NI32 fileidx, NU32 flags);
N_NIMCALL(NI32, fileinfoidx_194747)(NimStringDesc* filename);
N_NIMCALL(tsym224846*, makestdinmodule_611097)(void);
N_NIMCALL(void, processmodule_285056)(tsym224846* module, tllstream210204* stream, trodreader275030* rd);
N_NIMCALL(tllstream210204*, llstreamopenstdin_210245)(void);
N_NIMCALL(void, commandeval_612665)(NimStringDesc* exp);
N_NIMCALL(void, evalnim_612655)(tnode224816* nodes, tsym224846* module);
N_NIMCALL(void, carrypasses_285257)(tnode224816* nodes, tsym224846* module, tpass285017* passes, NI passesLen0);
N_NIMCALL(tnode224816*, parsestring_247539)(NimStringDesc* s, NimStringDesc* filename, NI line, terrorhandler214188 errorhandler);
N_NIMCALL(void, resetmemory_612770)(void);
N_NIMCALL(void, resetallmodules_610411)(void);
N_NIMCALL(void, resetropecache_176247)(void);
N_NIMCALL(void, resetsystypes_281359)(void);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, commandsuggest_612744)(void);
N_NIMCALL(void, resetmodule_610402)(NI32 fileidx);
N_NIMCALL(void, deffromsourcemap_419834)(tlineinfo194539 i);
N_NIMCALL(void, serve_609259)(TY609261 action);
N_NIMCALL(void, maincommand_613027)(void);
N_NIMCALL(void, rawmessage_196643)(NU16 msg, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f, NU8 format, NI precision);
N_NIMCALL(NimStringDesc*, formatsize_98604)(NI64 bytes, NIM_CHAR decimalsep);
N_NIMCALL(NI, gettotalmem_6499)(void);
STRING_LITERAL(TMP1915, "c", 1);
STRING_LITERAL(TMP1916, "cc", 2);
STRING_LITERAL(TMP1917, "compile", 7);
STRING_LITERAL(TMP1918, "compiletoc", 10);
STRING_LITERAL(TMP1919, "cpp", 3);
STRING_LITERAL(TMP1920, "compiletocpp", 12);
STRING_LITERAL(TMP1921, "objc", 4);
STRING_LITERAL(TMP1922, "compiletooc", 11);
STRING_LITERAL(TMP1923, "run", 3);
STRING_LITERAL(TMP1924, "js", 2);
STRING_LITERAL(TMP1925, "compiletojs", 11);
STRING_LITERAL(TMP1926, "compiletollvm", 13);
STRING_LITERAL(TMP1927, "doc", 3);
STRING_LITERAL(TMP1928, "doc2", 4);
STRING_LITERAL(TMP1929, "rst2html", 8);
STRING_LITERAL(TMP1930, "rst2tex", 7);
STRING_LITERAL(TMP1931, "jsondoc", 7);
STRING_LITERAL(TMP1932, "buildindex", 10);
STRING_LITERAL(TMP1933, "gendepend", 9);
STRING_LITERAL(TMP1934, "dump", 4);
STRING_LITERAL(TMP1935, "check", 5);
STRING_LITERAL(TMP1936, "parse", 5);
STRING_LITERAL(TMP1937, "scan", 4);
STRING_LITERAL(TMP1938, "i", 1);
STRING_LITERAL(TMP1939, "e", 1);
STRING_LITERAL(TMP1940, "reset", 5);
STRING_LITERAL(TMP1941, "idetools", 8);
STRING_LITERAL(TMP1942, "serve", 5);
STRING_LITERAL(TMP4228, "", 0);
STRING_LITERAL(TMP4229, "gcc", 3);
STRING_LITERAL(TMP4230, "nimrod", 6);
STRING_LITERAL(TMP4231, "ecmascript", 10);
STRING_LITERAL(TMP4622, "nimdoc.cfg", 10);
STRING_LITERAL(TMP4746, "nimdoc", 6);
STRING_LITERAL(TMP4752, "nimdoc.tex.cfg", 14);
STRING_LITERAL(TMP4830, "dot -Tpng -o", 12);
STRING_LITERAL(TMP4831, "png", 3);
STRING_LITERAL(TMP4832, "dot", 3);
STRING_LITERAL(TMP4833, "dump.format", 11);
STRING_LITERAL(TMP4834, "json", 4);
STRING_LITERAL(TMP4835, "true", 4);
STRING_LITERAL(TMP4836, "version", 7);
STRING_LITERAL(TMP4837, "0.10.2", 6);
STRING_LITERAL(TMP4838, "project_path", 12);
STRING_LITERAL(TMP4839, "defined_symbols", 15);
STRING_LITERAL(TMP4840, "lib_paths", 9);
STRING_LITERAL(TMP4841, "-- list of currently defined symbols --", 39);
STRING_LITERAL(TMP4842, "-- end of list --", 17);
STRING_LITERAL(TMP4843, "nim", 3);
STRING_LITERAL(TMP4846, "Beware: Indentation tokens depend on the parser\'s state!", 56);
STRING_LITERAL(TMP4847, "nimrodvm", 8);
STRING_LITERAL(TMP4850, "echo \"eval\\t\", repr(", 20);
STRING_LITERAL(TMP4851, ")", 1);
static NIM_CONST terrorhandler214188 TMP4852 = {NIM_NIL,NIM_NIL};
extern NF glastcmdtime_168131;
extern tlinkedlist126028 searchpaths_168122;
extern NimStringDesc* libpath_168233;
extern NimStringDesc* gprojectfull_168236;
extern NimStringDesc* gprojectpath_168235;
extern NI gfrontendid_223012;
extern NimStringDesc* command_168239;
extern NU8 gcmd_168120;
extern NU32 gglobaloptions_168118;
extern NIM_BOOL isserving_168133;
extern NimStringDesc* lastcaascmd_609205;
extern NimStringDesc* curcaascmd_609204;
extern tgcheap47016 gch_47044;
extern TY610058* gmemcachedata_610079;
extern NU8 ccompiler_201461;
extern NI gerrormax_195309;
extern NimStringDesc* gprojectname_168234;
extern stringtableobj130012* gsymbols_200004;
extern NI32 gprojectmainidx_168237;
extern TNimType NTI214190; /* TLexer */
extern TY118808* commandargs_168261;
extern tsym224846* systemmodule_281019;
extern tsymseq224818* gowners_289293;
extern TNimType NTI224818; /* TSymSeq */
extern tsym224846* rangedestructorproc_514764;
extern TY199034 buckets_199039;
extern tident199021* idanon_199504;
extern NimStringDesc* gevalexpr_168130;
extern NI32 gdirtybufferidx_168134;
extern tlineinfo194539 opttrackpos_196156;
extern NI32 gdirtyoriginalidx_168135;
extern NI gerrorcounter_195306;
extern NI gverbosity_168127;
extern NI glinescompiled_214218;

static N_INLINE(void, setid_223446)(NI id) {
	gfrontendid_223012 = ((gfrontendid_223012 >= (NI32)(id + 1)) ? gfrontendid_223012 : (NI32)(id + 1));
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, semanticpasses_612230)(void) {
	tpass285017 LOC1;
	tpass285017 LOC2;
	LOC1.Field0 = verboseopen_606012;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = verboseprocess_606023;
	LOC1.Field3 = NIM_NIL;
	registerpass_285214(LOC1);
	LOC2.Field0 = myopen_543456;
	LOC2.Field1 = myopencached_543499;
	LOC2.Field2 = myprocess_543640;
	LOC2.Field3 = myclose_543656;
	registerpass_285214(LOC2);
}

N_NIMCALL(void, rodpass_612201)(void) {
	{
		tpass285017 LOC5;
		if (!((gglobaloptions_168118 &(1<<((((NU8) 14))&31)))!=0)) goto LA3;
		LOC5.Field0 = myopen_301688;
		LOC5.Field1 = NIM_NIL;
		LOC5.Field2 = process_301205;
		LOC5.Field3 = myclose_301701;
		registerpass_285214(LOC5);
	}
	LA3: ;
}

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

static N_INLINE(void, rtladdzct_50204)(tcell44935* c) {
	addzct_48617((&gch_47044.Zct), c);
}

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

N_NIMCALL(void, commandcompiletoc_612268)(void) {
	tpass285017 LOC1;
	semanticpasses_612230();
	LOC1.Field0 = myopen_590544;
	LOC1.Field1 = myopencached_590720;
	LOC1.Field2 = myprocess_590808;
	LOC1.Field3 = myclose_591246;
	registerpass_285214(LOC1);
	rodpass_612201();
	{
		if (!((gglobaloptions_168118 &(1<<((((NU8) 15))&31)))!=0)) goto LA4;
	}
	LA4: ;
	compileproject_611077(((NI32) -1));
	cgenwritemodules_591360();
	{
		NimStringDesc* LOC10;
		if (!!((gcmd_168120 == ((NU8) 19)))) goto LA8;
		LOC10 = 0;
		LOC10 = noschangeFileExt(gprojectfull_168236, ((NimStringDesc*) &TMP4228));
		callccompiler_202541(LOC10);
	}
	LA8: ;
	{
		NimStringDesc* LOC15;
		if (!isserving_168133) goto LA13;
		LOC15 = 0;
		LOC15 = lastcaascmd_609205; lastcaascmd_609205 = copyStringRC1(curcaascmd_609204);
		if (LOC15) nimGCunrefNoCycle(LOC15);
		resetcgenmodules_590397();
		{
			NI i_612324;
			NI HEX3Atmp_612326;
			NI res_612329;
			i_612324 = 0;
			HEX3Atmp_612326 = 0;
			HEX3Atmp_612326 = (gmemcachedata_610079->Sup.len - 1);
			res_612329 = 0;
			{
				while (1) {
					if (!(res_612329 <= HEX3Atmp_612326)) goto LA18;
					i_612324 = res_612329;
					gmemcachedata_610079->data[i_612324].Crcstatus = ((NU8) 1);
					gmemcachedata_610079->data[i_612324].Needsrecompile = ((NU8) 0);
					res_612329 += 1;
				} LA18: ;
			}
		}
		resetcompilationlists_201886();
		resetcaches_547365();
		gcfullcollect_8005();
	}
	LA13: ;
}

N_NIMCALL(void, commandcompiletojs_612401)(void) {
	tpass285017 LOC1;
	settarget_173621(((NU8) 21), ((NU8) 12));
	definesymbol_200009(((NimStringDesc*) &TMP4230));
	definesymbol_200009(((NimStringDesc*) &TMP4231));
	definesymbol_200009(((NimStringDesc*) &TMP1924));
	semanticpasses_612230();
	LOC1.Field0 = myopen_605239;
	LOC1.Field1 = myopencached_605228;
	LOC1.Field2 = myprocess_605062;
	LOC1.Field3 = myclose_605197;
	registerpass_285214(LOC1);
	compileproject_611077(((NI32) -1));
}

N_NIMCALL(void, commanddoc2_612257)(void) {
	tpass285017 LOC1;
	gerrormax_195309 = 2147483647;
	semanticpasses_612230();
	LOC1.Field0 = myopen_608070;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = processnode_608058;
	LOC1.Field3 = close_608018;
	registerpass_285214(LOC1);
	compileproject_611077(((NI32) -1));
	finishdoc2pass_608114(gprojectname_168234);
}

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;
}

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(void, commandgendepend_612238)(void) {
	tpass285017 LOC1;
	tpass285017 LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	semanticpasses_612230();
	LOC1.Field0 = myopen_607168;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = adddotdependency_607043;
	LOC1.Field3 = NIM_NIL;
	registerpass_285214(LOC1);
	LOC2.Field0 = NIM_NIL;
	LOC2.Field1 = NIM_NIL;
	LOC2.Field2 = cleanup_606077;
	LOC2.Field3 = cleanup_606077;
	registerpass_285214(LOC2);
	compileproject_611077(((NI32) -1));
	generatedot_607009(gprojectfull_168236);
	LOC3 = 0;
	LOC4 = 0;
	LOC4 = noschangeFileExt(gprojectfull_168236, ((NimStringDesc*) &TMP4831));
	LOC5 = 0;
	LOC5 = noschangeFileExt(gprojectfull_168236, ((NimStringDesc*) &TMP4832));
	LOC3 = rawNewString(LOC4->Sup.len + LOC5->Sup.len + 13);
appendString(LOC3, ((NimStringDesc*) &TMP4830));
appendString(LOC3, LOC4);
appendChar(LOC3, 32);
appendString(LOC3, LOC5);
	execexternalprogram_201907(LOC3, ((NimStringDesc*) &TMP4228));
}

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

N_NIMCALL(void, commandcheck_612246)(void) {
	gerrormax_195309 = 2147483647;
	semanticpasses_612230();
	rodpass_612201();
	compileproject_611077(((NI32) -1));
}

N_NIMCALL(void, commandscan_612692)(void) {
	NimStringDesc* f;
	NimStringDesc* LOC1;
	tllstream210204* stream;
	LOC1 = 0;
	LOC1 = maincommandarg_168319();
	f = nosaddFileExt(LOC1, ((NimStringDesc*) &TMP4843));
	stream = llstreamopen_210233(f, ((NU8) 0));
	{
		tlexer214190 l;
		ttoken214186 tok;
		if (!!((stream == NIM_NIL))) goto LA4;
		memset((void*)(&l), 0, sizeof(l));
		l.Sup.Sup.m_type = (&NTI214190);
		memset((void*)(&tok), 0, sizeof(tok));
		inittoken_214482((&tok));
		openlexer_214277((&l), f, stream);
		{
			while (1) {
				rawgettok_214238((&l), (&tok));
				printtok_214265((&tok));
				{
					if (!(tok.Toktype == ((NU8) 1))) goto LA10;
					goto LA6;
				}
				LA10: ;
			}
		} LA6: ;
		closelexer_214258((&l));
	}
	goto LA2;
	LA4: ;
	{
		rawmessage_196733(((NU16) 3), f);
	}
	LA2: ;
}

N_NIMCALL(void, interactivepasses_612409)(void) {
	tpass285017 LOC1;
	tpass285017 LOC2;
	tpass285017 LOC3;
	initdefines_200146();
	definesymbol_200009(((NimStringDesc*) &TMP4847));
	LOC1.Field0 = verboseopen_606012;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = verboseprocess_606023;
	LOC1.Field3 = NIM_NIL;
	registerpass_285214(LOC1);
	LOC2.Field0 = myopen_543456;
	LOC2.Field1 = myopencached_543499;
	LOC2.Field2 = myprocess_543640;
	LOC2.Field3 = myclose_543656;
	registerpass_285214(LOC2);
	LOC3.Field0 = myopen_475283;
	LOC3.Field1 = NIM_NIL;
	LOC3.Field2 = myprocess_475412;
	LOC3.Field3 = myprocess_475412;
	registerpass_285214(LOC3);
}

N_NIMCALL(void, commandinteractive_612607)(void) {
	gerrormax_195309 = 2147483647;
	interactivepasses_612409();
	compilesystemmodule_610988();
	{
		NI32 LOC5;
		tsym224846* LOC6;
		if (!(0 < commandargs_168261->Sup.len)) goto LA3;
		LOC5 = 0;
		LOC5 = fileinfoidx_194747(gprojectfull_168236);
		LOC6 = 0;
		LOC6 = compilemodule_610776(LOC5, 0);
	}
	goto LA1;
	LA3: ;
	{
		tsym224846* m;
		tllstream210204* LOC8;
		m = makestdinmodule_611097();
		(*m).Flags |= ((NI32)1)<<((((NU8) 12))%(sizeof(NI32)*8));
		LOC8 = 0;
		LOC8 = llstreamopenstdin_210245();
		processmodule_285056(m, LOC8, NIM_NIL);
	}
	LA1: ;
}

N_NIMCALL(void, evalnim_612655)(tnode224816* nodes, tsym224846* module) {
	TY612650 LOC1;
	LOC1[0].Field0 = verboseopen_606012;
	LOC1[0].Field1 = NIM_NIL;
	LOC1[0].Field2 = verboseprocess_606023;
	LOC1[0].Field3 = NIM_NIL;
	LOC1[1].Field0 = myopen_543456;
	LOC1[1].Field1 = myopencached_543499;
	LOC1[1].Field2 = myprocess_543640;
	LOC1[1].Field3 = myclose_543656;
	LOC1[2].Field0 = myopen_475283;
	LOC1[2].Field1 = NIM_NIL;
	LOC1[2].Field2 = myprocess_475412;
	LOC1[2].Field3 = myprocess_475412;
	carrypasses_285257(nodes, module, LOC1, 3);
}

N_NIMCALL(void, commandeval_612665)(NimStringDesc* exp) {
	NimStringDesc* echoexp;
	NimStringDesc* LOC5;
	tnode224816* LOC6;
	tsym224846* LOC7;
	{
		if (!(systemmodule_281019 == NIM_NIL)) goto LA3;
		interactivepasses_612409();
		compilesystemmodule_610988();
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = rawNewString(exp->Sup.len + 21);
appendString(LOC5, ((NimStringDesc*) &TMP4850));
appendString(LOC5, exp);
appendString(LOC5, ((NimStringDesc*) &TMP4851));
	echoexp = LOC5;
	LOC6 = 0;
	LOC6 = parsestring_247539(echoexp, ((NimStringDesc*) &TMP4228), 0, TMP4852);
	LOC7 = 0;
	LOC7 = makestdinmodule_611097();
	evalnim_612655(LOC6, LOC7);
}

N_NIMCALL(void, resetmemory_612770)(void) {
	resetcompilationlists_201886();
	resetcaches_547365();
	resetallmodules_610411();
	resetropecache_176247();
	resetsystypes_281359();
	if (gowners_289293) nimGCunrefNoCycle(gowners_289293);
	gowners_289293 = (tsymseq224818*) newSeqRC1((&NTI224818), 0);
	asgnRefNoCycle((void**) (&rangedestructorproc_514764), NIM_NIL);
	{
		NI i_612827;
		NI res_613005;
		i_612827 = 0;
		res_613005 = 0;
		{
			while (1) {
				if (!(((NI) (res_613005)) <= 8191)) goto LA3;
				i_612827 = res_613005;
				asgnRefNoCycle((void**) (&buckets_199039[(i_612827)- 0]), NIM_NIL);
				res_613005 += 1;
			} LA3: ;
		}
	}
	asgnRefNoCycle((void**) (&idanon_199504), NIM_NIL);
}

N_NIMCALL(void, commandsuggest_612744)(void) {
	{
		if (!isserving_168133) goto LA3;
		commandcompiletoc_612268();
		{
			tsym224846* LOC9;
			if (!!((gdirtybufferidx_168134 == ((NI32) 0)))) goto LA7;
			LOC9 = 0;
			LOC9 = compilemodule_610776(gdirtybufferidx_168134, 512);
			resetmodule_610402(gdirtybufferidx_168134);
		}
		LA7: ;
		{
			if (!((gglobaloptions_168118 &(1<<((((NU8) 25))&31)))!=0)) goto LA12;
			deffromsourcemap_419834(opttrackpos_196156);
		}
		LA12: ;
	}
	goto LA1;
	LA3: ;
	{
		NI32 projfile;
		gerrormax_195309 = 2147483647;
		semanticpasses_612230();
		rodpass_612201();
		{
			if (!(gprojectmainidx_168237 == gdirtyoriginalidx_168135)) goto LA17;
			projfile = gdirtybufferidx_168134;
		}
		goto LA15;
		LA17: ;
		{
			projfile = gprojectmainidx_168237;
		}
		LA15: ;
		compileproject_611077(projfile);
	}
	LA1: ;
}

N_NIMCALL(void, maincommand_613027)(void) {
	NimStringDesc* LOC5;
	clearpasses_285206();
	glastcmdtime_168131 = ntepochTime();
	appendstr_126286((&searchpaths_168122), libpath_168233);
	{
		if (!!((gprojectfull_168236->Sup.len == 0))) goto LA3;
		prependstr_126424((&searchpaths_168122), gprojectpath_168235);
	}
	LA3: ;
	setid_223446(100);
	LOC5 = 0;
	LOC5 = nsuNormalize(command_168239);
	switch (hashString(LOC5) & 31) {
	case 0: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1917))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1922))) goto LA8;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1941))) goto LA26;
break;
	case 2: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1934))) goto LA19;
break;
	case 4: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1936))) goto LA21;
break;
	case 7: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1929))) goto LA14;
break;
	case 9: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1923))) goto LA9;
break;
	case 10: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1916))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1925))) goto LA10;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1935))) goto LA20;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1940))) goto LA25;
break;
	case 11: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1933))) goto LA18;
break;
	case 13: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1927))) goto LA12;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1930))) goto LA15;
break;
	case 14: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1931))) goto LA16;
break;
	case 15: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1938))) goto LA23;
break;
	case 16: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1918))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1939))) goto LA24;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1942))) goto LA27;
break;
	case 19: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1920))) goto LA7;
break;
	case 25: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1915))) goto LA6;
break;
	case 26: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1937))) goto LA22;
break;
	case 27: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1919))) goto LA7;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1924))) goto LA10;
break;
	case 28: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1926))) goto LA11;
break;
	case 29: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1932))) goto LA17;
break;
	case 31: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1921))) goto LA8;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP1928))) goto LA13;
break;
	}
	goto LA28;
	LA6: ;
	{
		gcmd_168120 = ((NU8) 1);
		commandcompiletoc_612268();
	}
	goto LA29;
	LA7: ;
	{
		gcmd_168120 = ((NU8) 2);
		{
			if (!(ccompiler_201461 == ((NU8) 1))) goto LA34;
			setcc_201708(((NimStringDesc*) &TMP4229));
		}
		LA34: ;
		definesymbol_200009(((NimStringDesc*) &TMP1919));
		commandcompiletoc_612268();
	}
	goto LA29;
	LA8: ;
	{
		gcmd_168120 = ((NU8) 3);
		definesymbol_200009(((NimStringDesc*) &TMP1921));
		commandcompiletoc_612268();
	}
	goto LA29;
	LA9: ;
	{
		gcmd_168120 = ((NU8) 19);
		rawmessage_196733(((NU16) 180), command_168239);
	}
	goto LA29;
	LA10: ;
	{
		gcmd_168120 = ((NU8) 4);
		commandcompiletojs_612401();
	}
	goto LA29;
	LA11: ;
	{
		gcmd_168120 = ((NU8) 5);
		rawmessage_196733(((NU16) 180), command_168239);
	}
	goto LA29;
	LA12: ;
	{
		wantmainmodule_611014();
		gcmd_168120 = ((NU8) 8);
		loadconfigs_219811(((NimStringDesc*) &TMP4622));
		commanddoc_402946();
	}
	goto LA29;
	LA13: ;
	{
		gcmd_168120 = ((NU8) 8);
		loadconfigs_219811(((NimStringDesc*) &TMP4622));
		definesymbol_200009(((NimStringDesc*) &TMP4746));
		commanddoc2_612257();
	}
	goto LA29;
	LA14: ;
	{
		gcmd_168120 = ((NU8) 16);
		loadconfigs_219811(((NimStringDesc*) &TMP4622));
		commandrst2html_402992();
	}
	goto LA29;
	LA15: ;
	{
		gcmd_168120 = ((NU8) 17);
		loadconfigs_219811(((NimStringDesc*) &TMP4752));
		commandrst2tex_403000();
	}
	goto LA29;
	LA16: ;
	{
		wantmainmodule_611014();
		gcmd_168120 = ((NU8) 8);
		loadconfigs_219811(((NimStringDesc*) &TMP4622));
		wantmainmodule_611014();
		definesymbol_200009(((NimStringDesc*) &TMP4746));
		commandjson_403008();
	}
	goto LA29;
	LA17: ;
	{
		gcmd_168120 = ((NU8) 8);
		loadconfigs_219811(((NimStringDesc*) &TMP4622));
		commandbuildindex_403054();
	}
	goto LA29;
	LA18: ;
	{
		gcmd_168120 = ((NU8) 9);
		commandgendepend_612238();
	}
	goto LA29;
	LA19: ;
	{
		gcmd_168120 = ((NU8) 10);
		{
			NimStringDesc* LOC50;
			jsonnodeobj335042* definedsymbols;
			jsonnodeobj335042* libpaths;
			jsonnodeobj335042* dumpdata;
			TY613683 LOC71;
			NimStringDesc* LOC72;
			LOC50 = 0;
			LOC50 = getconfigvar_168350(((NimStringDesc*) &TMP4833));
			if (!eqStrings(LOC50, ((NimStringDesc*) &TMP4834))) goto LA51;
			wantmainmodule_611014();
			definedsymbols = newjarray_335389();
			{
				NimStringDesc* s_613602;
				s_613602 = 0;
				{
					NimStringDesc* key_614006;
					NimStringDesc* val_614008;
					key_614006 = 0;
					val_614008 = 0;
					{
						NI h_614010;
						NI HEX3Atmp_614012;
						NI res_614014;
						h_614010 = 0;
						HEX3Atmp_614012 = 0;
						HEX3Atmp_614012 = ((*gsymbols_200004).Data->Sup.len-1);
						res_614014 = 0;
						{
							while (1) {
								if (!(res_614014 <= HEX3Atmp_614012)) goto LA57;
								h_614010 = res_614014;
								{
									if (!!((*gsymbols_200004).Data->data[h_614010].Field0 == 0)) goto LA60;
									key_614006 = (*gsymbols_200004).Data->data[h_614010].Field0;
									val_614008 = (*gsymbols_200004).Data->data[h_614010].Field1;
									{
										jsonnodeobj335042* LOC66;
										if (!eqStrings(val_614008, ((NimStringDesc*) &TMP4835))) goto LA64;
										s_613602 = key_614006;
										LOC66 = 0;
										LOC66 = HEX25_335448(s_613602);
										(*definedsymbols).kindU.S7.Elems = (TY335062*) incrSeq(&((*definedsymbols).kindU.S7.Elems)->Sup, sizeof(jsonnodeobj335042*));
										asgnRefNoCycle((void**) (&(*definedsymbols).kindU.S7.Elems->data[(*definedsymbols).kindU.S7.Elems->Sup.len-1]), LOC66);
									}
									LA64: ;
								}
								LA60: ;
								res_614014 += 1;
							} LA57: ;
						}
					}
				}
			}
			libpaths = newjarray_335389();
			{
				NimStringDesc* dir_613636;
				tstrentry126024* it_614018;
				dir_613636 = 0;
				it_614018 = ((tstrentry126024*) (searchpaths_168122.Head));
				{
					while (1) {
						jsonnodeobj335042* LOC70;
						if (!!((it_614018 == NIM_NIL))) goto LA69;
						dir_613636 = (*it_614018).Data;
						LOC70 = 0;
						LOC70 = HEX25_335448(dir_613636);
						(*libpaths).kindU.S7.Elems = (TY335062*) incrSeq(&((*libpaths).kindU.S7.Elems)->Sup, sizeof(jsonnodeobj335042*));
						asgnRefNoCycle((void**) (&(*libpaths).kindU.S7.Elems->data[(*libpaths).kindU.S7.Elems->Sup.len-1]), LOC70);
						it_614018 = ((tstrentry126024*) ((*it_614018).Sup.Next));
					} LA69: ;
				}
			}
			memset((void*)LOC71, 0, sizeof(LOC71));
			LOC71[0].Field0 = copyString(((NimStringDesc*) &TMP4836));
			LOC71[0].Field1 = HEX25_335448(((NimStringDesc*) &TMP4837));
			LOC71[1].Field0 = copyString(((NimStringDesc*) &TMP4838));
			LOC71[1].Field1 = HEX25_335448(gprojectfull_168236);
			LOC71[2].Field0 = copyString(((NimStringDesc*) &TMP4839));
			LOC71[2].Field1 = definedsymbols;
			LOC71[3].Field0 = copyString(((NimStringDesc*) &TMP4840));
			LOC71[3].Field1 = libpaths;
			dumpdata = HEX25_335608(LOC71, 4);
			LOC72 = 0;
			LOC72 = HEX24_339633(dumpdata);
			outwriteln_196198(LOC72);
		}
		goto LA48;
		LA51: ;
		{
			outwriteln_196198(((NimStringDesc*) &TMP4841));
			{
				NimStringDesc* s_613686;
				s_613686 = 0;
				{
					NimStringDesc* key_614024;
					NimStringDesc* val_614026;
					key_614024 = 0;
					val_614026 = 0;
					{
						NI h_614028;
						NI HEX3Atmp_614030;
						NI res_614032;
						h_614028 = 0;
						HEX3Atmp_614030 = 0;
						HEX3Atmp_614030 = ((*gsymbols_200004).Data->Sup.len-1);
						res_614032 = 0;
						{
							while (1) {
								if (!(res_614032 <= HEX3Atmp_614030)) goto LA78;
								h_614028 = res_614032;
								{
									if (!!((*gsymbols_200004).Data->data[h_614028].Field0 == 0)) goto LA81;
									key_614024 = (*gsymbols_200004).Data->data[h_614028].Field0;
									val_614026 = (*gsymbols_200004).Data->data[h_614028].Field1;
									{
										if (!eqStrings(val_614026, ((NimStringDesc*) &TMP4835))) goto LA85;
										s_613686 = key_614024;
										outwriteln_196198(s_613686);
									}
									LA85: ;
								}
								LA81: ;
								res_614032 += 1;
							} LA78: ;
						}
					}
				}
			}
			outwriteln_196198(((NimStringDesc*) &TMP4842));
			{
				NimStringDesc* it_613687;
				tstrentry126024* it_614036;
				it_613687 = 0;
				it_614036 = ((tstrentry126024*) (searchpaths_168122.Head));
				{
					while (1) {
						if (!!((it_614036 == NIM_NIL))) goto LA89;
						it_613687 = (*it_614036).Data;
						msgwriteln_196236(it_613687);
						it_614036 = ((tstrentry126024*) ((*it_614036).Sup.Next));
					} LA89: ;
				}
			}
		}
		LA48: ;
	}
	goto LA29;
	LA20: ;
	{
		gcmd_168120 = ((NU8) 11);
		commandcheck_612246();
	}
	goto LA29;
	LA21: ;
	{
		tnode224816* LOC92;
		gcmd_168120 = ((NU8) 12);
		wantmainmodule_611014();
		LOC92 = 0;
		LOC92 = parsefile_259041(gprojectmainidx_168237);
	}
	goto LA29;
	LA22: ;
	{
		gcmd_168120 = ((NU8) 13);
		wantmainmodule_611014();
		commandscan_612692();
		msgwriteln_196236(((NimStringDesc*) &TMP4846));
	}
	goto LA29;
	LA23: ;
	{
		gcmd_168120 = ((NU8) 18);
		commandinteractive_612607();
	}
	goto LA29;
	LA24: ;
	{
		NimStringDesc* LOC96;
		LOC96 = 0;
		LOC96 = maincommandarg_168319();
		commandeval_612665(LOC96);
	}
	goto LA29;
	LA25: ;
	{
		resetmemory_612770();
	}
	goto LA29;
	LA26: ;
	{
		gcmd_168120 = ((NU8) 14);
		{
			if (!!(((gevalexpr_168130) && (gevalexpr_168130)->Sup.len == 0))) goto LA101;
			commandeval_612665(gevalexpr_168130);
		}
		goto LA99;
		LA101: ;
		{
			commandsuggest_612744();
		}
		LA99: ;
	}
	goto LA29;
	LA27: ;
	{
		isserving_168133 = NIM_TRUE;
		gglobaloptions_168118 |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
		gerrormax_195309 = 2147483647;
		serve_609259(maincommand_613027);
	}
	goto LA29;
	LA28: ;
	{
		rawmessage_196733(((NU16) 180), command_168239);
	}
	LA29: ;
	{
		NIM_BOOL LOC108;
		NIM_BOOL LOC109;
		TY207063 LOC114;
		NF LOC115;
		NI LOC116;
		LOC108 = 0;
		LOC109 = 0;
		LOC109 = (gerrorcounter_195306 == 0);
		if (!(LOC109)) goto LA110;
		LOC109 = !(((525376 &(1<<((gcmd_168120)&31)))!=0));
		LA110: ;
		LOC108 = LOC109;
		if (!(LOC108)) goto LA111;
		LOC108 = (0 < gverbosity_168127);
		LA111: ;
		if (!LOC108) goto LA112;
		memset((void*)LOC114, 0, sizeof(LOC114));
		LOC114[0] = nimIntToStr(glinescompiled_214218);
		LOC115 = 0;
		LOC115 = ntepochTime();
		LOC114[1] = nsuformatFloat(((NF)(LOC115) - (NF)(glastcmdtime_168131)), ((NU8) 1), 3);
		LOC116 = 0;
		LOC116 = gettotalmem_6499();
		LOC114[2] = formatsize_98604(((NI64) (LOC116)), 46);
		rawmessage_196643(((NU16) 260), LOC114, 3);
	}
	LA112: ;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_mainInit)(void) {
}

NIM_EXTERNC N_NOINLINE(void, HEX00_mainDatInit)(void) {
}

