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

#include "nimbase.h"
#include <string.h>
#include <stdio.h>
typedef struct Tlinkedlist135016 Tlinkedlist135016;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tlistentry135010 Tlistentry135010;
typedef struct Tpass261014 Tpass261014;
typedef struct Tpasscontext261002 Tpasscontext261002;
typedef struct Tsym214822 Tsym214822;
typedef struct Trodreader252021 Trodreader252021;
typedef struct Tnode214790 Tnode214790;
typedef struct Cell47505 Cell47505;
typedef struct TNimType TNimType;
typedef struct Cellseq47521 Cellseq47521;
typedef struct Gcheap49818 Gcheap49818;
typedef struct Gcstack49816 Gcstack49816;
typedef struct Cellset47517 Cellset47517;
typedef struct Pagedesc47513 Pagedesc47513;
typedef struct Memregion29687 Memregion29687;
typedef struct Smallchunk29639 Smallchunk29639;
typedef struct Llchunk29681 Llchunk29681;
typedef struct Bigchunk29641 Bigchunk29641;
typedef struct Intset29614 Intset29614;
typedef struct Trunk29610 Trunk29610;
typedef struct Avlnode29685 Avlnode29685;
typedef struct Gcstat49814 Gcstat49814;
typedef struct TY531042 TY531042;
typedef struct Tmoduleinmemory531008 Tmoduleinmemory531008;
typedef struct TY214913 TY214913;
typedef struct Jsonnodeobj306633 Jsonnodeobj306633;
typedef struct Stringtableobj140209 Stringtableobj140209;
typedef struct TNimObject TNimObject;
typedef struct TNimNode TNimNode;
typedef struct Keyvaluepairseq140207 Keyvaluepairseq140207;
typedef struct Keyvaluepair140205 Keyvaluepair140205;
typedef struct TY306648 TY306648;
typedef struct TY306653 TY306653;
typedef struct Tstrentry135012 Tstrentry135012;
typedef struct TY307043 TY307043;
typedef struct Tllstream202204 Tllstream202204;
typedef struct Tlexer205173 Tlexer205173;
typedef struct Tbaselexer203015 Tbaselexer203015;
typedef struct Tlineinfo182337 Tlineinfo182337;
typedef struct Ttoken205169 Ttoken205169;
typedef struct Tident189012 Tident189012;
typedef struct TY125202 TY125202;
typedef struct Tidobj189006 Tidobj189006;
typedef struct Ttypeseq214824 Ttypeseq214824;
typedef struct Tscope214816 Tscope214816;
typedef struct TY214925 TY214925;
typedef struct Tstrtable214794 Tstrtable214794;
typedef struct Tsymseq214792 Tsymseq214792;
typedef struct Ttype214828 Ttype214828;
typedef struct Tloc214804 Tloc214804;
typedef struct Ropeobj169006 Ropeobj169006;
typedef struct Tlib214808 Tlib214808;
typedef struct Tindex252019 Tindex252019;
typedef struct Tiitable221163 Tiitable221163;
typedef struct Tiipairseq221161 Tiipairseq221161;
typedef struct Table252054 Table252054;
typedef struct Keyvaluepairseq252057 Keyvaluepairseq252057;
typedef struct Memfile250202 Memfile250202;
typedef struct Tnodeseq214784 Tnodeseq214784;
typedef struct Basechunk29637 Basechunk29637;
typedef struct Freecell29629 Freecell29629;
typedef struct Tinstantiation214812 Tinstantiation214812;
typedef struct Tiipair221159 Tiipair221159;
typedef struct Keyvaluepair252060 Keyvaluepair252060;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tlinkedlist135016  {
Tlistentry135010* head;
Tlistentry135010* tail;
NI counter;
};
typedef N_NIMCALL_PTR(Tpasscontext261002*, Tpassopen261006) (Tsym214822* module);
typedef N_NIMCALL_PTR(Tpasscontext261002*, Tpassopencached261008) (Tsym214822* module, Trodreader252021* rd);
typedef N_NIMCALL_PTR(Tnode214790*, Tpassprocess261012) (Tpasscontext261002* p, Tnode214790* toplevelstmt);
typedef N_NIMCALL_PTR(Tnode214790*, Tpassclose261010) (Tpasscontext261002* p, Tnode214790* n);
struct Tpass261014 {
Tpassopen261006 Field0;
Tpassopencached261008 Field1;
Tpassprocess261012 Field2;
Tpassclose261010 Field3;
};
struct  Cell47505  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47521  {
NI len;
NI cap;
Cell47505** d;
};
struct  Cellset47517  {
NI counter;
NI max;
Pagedesc47513* head;
Pagedesc47513** data;
};
typedef Smallchunk29639* TY29702[512];
typedef Trunk29610* Trunkbuckets29612[256];
struct  Intset29614  {
Trunkbuckets29612 data;
};
struct  Memregion29687  {
NI minlargeobj;
NI maxlargeobj;
TY29702 freesmallchunks;
Llchunk29681* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29641* freechunkslist;
Intset29614 chunkstarts;
Avlnode29685* root;
Avlnode29685* deleted;
Avlnode29685* last;
Avlnode29685* freeavlnodes;
};
struct  Gcstat49814  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap49818  {
Gcstack49816* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47521 zct;
Cellseq47521 decstack;
Cellset47517 cycleroots;
Cellseq47521 tempstack;
NI recgclock;
Memregion29687 region;
Gcstat49814 stat;
};
typedef NU8 Sha1digest192003[20];
struct  Tmoduleinmemory531008  {
NF compiledat;
Sha1digest192003 hash;
TY214913* deps;
NU8 needsrecompile;
NU8 hashstatus;
};
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Stringtableobj140209  {
  TNimObject Sup;
NI counter;
Keyvaluepairseq140207* data;
NU8 mode;
};
struct Keyvaluepair140205 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  Jsonnodeobj306633  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY306648* fields;
} S6;
struct {TY306653* elems;
} S7;
} kindU;
};
struct  Tlistentry135010  {
  TNimObject Sup;
Tlistentry135010* prev;
Tlistentry135010* next;
};
struct  Tstrentry135012  {
  Tlistentry135010 Sup;
NimStringDesc* data;
};
struct TY307043 {
NimStringDesc* Field0;
Jsonnodeobj306633* Field1;
};
typedef TY307043 TY533027[4];
struct  Tbaselexer203015  {
  TNimObject Sup;
NI bufpos;
NCSTRING buf;
NI buflen;
Tllstream202204* stream;
NI linenumber;
NI sentinel;
NI linestart;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Tlineinfo182337 info, NU16 msg, NimStringDesc* arg, void* ClEnv);
void* ClEnv;
} Terrorhandler205171;
struct  Tlexer205173  {
  Tbaselexer203015 Sup;
NI32 fileidx;
NI indentahead;
NI currlineindent;
NIM_BOOL strongspaces;
Terrorhandler205171 errorhandler;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Ttoken205169  {
NU8 toktype;
NI indent;
Tident189012* ident;
NI64 inumber;
NF fnumber;
NU8 base;
NI8 strongspacea;
NI8 strongspaceb;
NimStringDesc* literal;
NI line;
NI col;
};
struct  Tidobj189006  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable214794  {
NI counter;
Tsymseq214792* data;
};
struct  Tlineinfo182337  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc214804  {
NU8 k;
NU8 s;
NU16 flags;
Ttype214828* t;
Ropeobj169006* r;
Ropeobj169006* heaproot;
};
struct  Tsym214822  {
  Tidobj189006 Sup;
NU8 kind;
union{
struct {Ttypeseq214824* typeinstcache;
Tscope214816* typscope;
} S1;
struct {TY214925* procinstcache;
Tsym214822* gcunsafetyreason;
} S2;
struct {TY214925* usedgenerics;
Tstrtable214794 tab;
} S3;
struct {Tsym214822* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype214828* typ;
Tident189012* name;
Tlineinfo182337 info;
Tsym214822* owner;
NU32 flags;
Tnode214790* ast;
NU32 options;
NI position;
NI offset;
Tloc214804 loc;
Tlib214808* annex;
Tnode214790* constraint;
};
typedef Tpass261014 TY532229[3];
typedef Tident189012* TY189023[8192];
typedef N_NIMCALL_PTR(void, TY530238) (void);
typedef NimStringDesc* TY185781[4];
struct  Tpasscontext261002  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Tiitable221163  {
NI counter;
Tiipairseq221161* data;
};
struct  Tindex252019  {
NI lastidxkey;
NI lastidxval;
Tiitable221163 tab;
NimStringDesc* r;
NI offset;
};
struct  Table252054  {
Keyvaluepairseq252057* data;
NI counter;
};
struct  Memfile250202  {
void* mem;
NI size;
int handle;
};
struct  Trodreader252021  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY214913* moddeps;
TY214913* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex252019 index;
Tindex252019 imports;
NI readerindex;
NI line;
NI moduleid;
Table252054 syms;
Memfile250202 memfile;
Tsymseq214792* methods;
NimStringDesc* origfile;
NIM_BOOL inviewmode;
};
struct  Tnode214790  {
Ttype214828* typ;
Tlineinfo182337 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym214822* sym;
} S4;
struct {Tident189012* ident;
} S5;
struct {Tnodeseq214784* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Gcstack49816  {
Gcstack49816* prev;
Gcstack49816* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY29618[16];
struct  Pagedesc47513  {
Pagedesc47513* next;
NI key;
TY29618 bits;
};
struct  Basechunk29637  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29639  {
  Basechunk29637 Sup;
Smallchunk29639* next;
Smallchunk29639* prev;
Freecell29629* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29681  {
NI size;
NI acc;
Llchunk29681* next;
};
struct  Bigchunk29641  {
  Basechunk29637 Sup;
Bigchunk29641* next;
Bigchunk29641* prev;
NI align;
NF data;
};
struct  Trunk29610  {
Trunk29610* next;
NI key;
TY29618 bits;
};
typedef Avlnode29685* TY29692[2];
struct  Avlnode29685  {
TY29692 link;
NI key;
NI upperbound;
NI level;
};
struct  Tllstream202204  {
  TNimObject Sup;
NU8 kind;
FILE* f;
NimStringDesc* s;
NI rd;
NI wr;
NI lineoffset;
};
struct  Tident189012  {
  Tidobj189006 Sup;
NimStringDesc* s;
Tident189012* next;
NI h;
};
struct  Tscope214816  {
NI depthlevel;
Tstrtable214794 symbols;
Tnodeseq214784* usingsyms;
Tscope214816* parent;
};
struct  Ttype214828  {
  Tidobj189006 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq214824* sons;
Tnode214790* n;
Tsym214822* owner;
Tsym214822* sym;
Tsym214822* destructor;
Tsym214822* deepcopy;
Tsym214822* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc214804 loc;
};
struct  Ropeobj169006  {
  TNimObject Sup;
Ropeobj169006* left;
Ropeobj169006* right;
NI length;
NimStringDesc* data;
};
struct  Tlib214808  {
  Tlistentry135010 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj169006* name;
Tnode214790* path;
};
struct  Tiipair221159  {
NI key;
NI val;
};
struct Keyvaluepair252060 {
NI Field0;
NI Field1;
Tsym214822* Field2;
};
struct  Freecell29629  {
Freecell29629* next;
NI zerofield;
};
struct  Tinstantiation214812  {
Tsym214822* sym;
Ttypeseq214824* concretetypes;
TY214913* usedby;
NI compilesid;
};
struct TY531042 {
  TGenericSeq Sup;
  Tmoduleinmemory531008 data[SEQ_DECL_SIZE];
};
struct TY306653 {
  TGenericSeq Sup;
  Jsonnodeobj306633* data[SEQ_DECL_SIZE];
};
struct TY125202 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct Tsymseq214792 {
  TGenericSeq Sup;
  Tsym214822* data[SEQ_DECL_SIZE];
};
struct TY214913 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq140207 {
  TGenericSeq Sup;
  Keyvaluepair140205 data[SEQ_DECL_SIZE];
};
struct TY306648 {
  TGenericSeq Sup;
  TY307043 data[SEQ_DECL_SIZE];
};
struct Ttypeseq214824 {
  TGenericSeq Sup;
  Ttype214828* data[SEQ_DECL_SIZE];
};
struct TY214925 {
  TGenericSeq Sup;
  Tinstantiation214812* data[SEQ_DECL_SIZE];
};
struct Tiipairseq221161 {
  TGenericSeq Sup;
  Tiipair221159 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq252057 {
  TGenericSeq Sup;
  Keyvaluepair252060 data[SEQ_DECL_SIZE];
};
struct Tnodeseq214784 {
  TGenericSeq Sup;
  Tnode214790* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, clearpasses_261143)(void);
N_NIMCALL(NF, ntepochTime)(void);
N_NIMCALL(void, appendstr_135244)(Tlinkedlist135016* list, NimStringDesc* data);
N_NIMCALL(void, prependstr_135413)(Tlinkedlist135016* list, NimStringDesc* data);
static N_INLINE(void, setid_213425)(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_532029)(void);
N_NIMCALL(void, initvars_194834)(void);
N_NIMCALL(void, semanticpasses_532015)(void);
N_NIMCALL(void, registerpass_261145)(Tpass261014 p);
N_NIMCALL(Tpasscontext261002*, verboseopen_513003)(Tsym214822* s);
N_NIMCALL(Tnode214790*, verboseprocess_513008)(Tpasscontext261002* context, Tnode214790* n);
N_NIMCALL(Tpasscontext261002*, myopen_467665)(Tsym214822* module);
N_NIMCALL(Tpasscontext261002*, myopencached_467696)(Tsym214822* module, Trodreader252021* rd);
N_NIMCALL(Tnode214790*, myprocess_467804)(Tpasscontext261002* context, Tnode214790* n);
N_NIMCALL(Tnode214790*, myclose_467814)(Tpasscontext261002* context, Tnode214790* n);
N_NIMCALL(Tpasscontext261002*, myopen_503515)(Tsym214822* module);
N_NIMCALL(Tpasscontext261002*, myopencached_503639)(Tsym214822* module, Trodreader252021* rd);
N_NIMCALL(Tnode214790*, myprocess_503802)(Tpasscontext261002* b, Tnode214790* n);
N_NIMCALL(Tnode214790*, myclose_504230)(Tpasscontext261002* b, Tnode214790* n);
N_NIMCALL(void, rodpass_532001)(void);
N_NIMCALL(Tpasscontext261002*, myopen_273919)(Tsym214822* module);
N_NIMCALL(Tnode214790*, process_273699)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(Tnode214790*, myclose_273929)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(void, compileproject_531877)(NI32 projectfileidx);
N_NIMCALL(void, cgenwritemodules_504292)(void);
N_NIMCALL(void, callccompiler_195510)(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(Cell47505*, usrtocell_51440)(void* usr);
static N_INLINE(void, rtladdzct_53001)(Cell47505* c);
N_NOINLINE(void, addzct_51417)(Cellseq47521* s, Cell47505* c);
N_NIMCALL(void, resetcgenmodules_503424)(void);
N_NIMCALL(void, resetcompilationlists_194867)(void);
N_NIMCALL(void, resetcaches_468424)(void);
N_NIMCALL(void, Gcfullcollect_9805)(void);
N_NIMCALL(void, definesymbol_190004)(NimStringDesc* symbol);
N_NIMCALL(void, rawmessage_185612)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(void, commandcompiletojs_532074)(void);
N_NIMCALL(void, settarget_167623)(NU8 o, NU8 c);
N_NIMCALL(Tpasscontext261002*, myopen_512130)(Tsym214822* s);
N_NIMCALL(Tpasscontext261002*, myopencached_512125)(Tsym214822* s, Trodreader252021* rd);
N_NIMCALL(Tnode214790*, myprocess_512028)(Tpasscontext261002* b, Tnode214790* n);
N_NIMCALL(Tnode214790*, myclose_512102)(Tpasscontext261002* b, Tnode214790* n);
N_NIMCALL(void, wantmainmodule_531871)(void);
N_NIMCALL(void, loadconfigs_210603)(NimStringDesc* cfg);
N_NIMCALL(void, commanddoc_361714)(void);
N_NIMCALL(void, commanddoc2_532024)(void);
N_NIMCALL(Tpasscontext261002*, myopen_515048)(Tsym214822* module);
N_NIMCALL(Tnode214790*, processnode_515042)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(Tnode214790*, close_515009)(Tpasscontext261002* p, Tnode214790* n);
N_NIMCALL(void, finishdoc2pass_515069)(NimStringDesc* project);
N_NIMCALL(void, commandrst2html_361742)(void);
N_NIMCALL(void, commandrst2tex_361744)(void);
N_NIMCALL(void, commandjson_361746)(void);
N_NIMCALL(void, commandbuildindex_361776)(void);
N_NIMCALL(void, commandgendepend_532017)(void);
N_NIMCALL(Tpasscontext261002*, myopen_514078)(Tsym214822* module);
N_NIMCALL(Tnode214790*, adddotdependency_514020)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(Tnode214790*, cleanup_513036)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(void, generatedot_514003)(NimStringDesc* project);
N_NIMCALL(void, execexternalprogram_194881)(NimStringDesc* cmd, NU16 msg);
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_160282)(NimStringDesc* key);
N_NIMCALL(Jsonnodeobj306633*, newjarray_306781)(void);
N_NIMCALL(Jsonnodeobj306633*, HEX25_306988)(NimStringDesc* s);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Jsonnodeobj306633*, HEX25_307040)(TY307043* keyvals, NI keyvalsLen0);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, msgwriteln_183449)(NimStringDesc* s, NU8 flags);
N_NIMCALL(NimStringDesc*, HEX24_310805)(Jsonnodeobj306633* node);
N_NIMCALL(void, commandcheck_532019)(void);
N_NIMCALL(Tnode214790*, parsefile_238029)(NI32 fileidx);
N_NIMCALL(void, commandscan_532251)(void);
N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, maincommandarg_160267)(void);
N_NIMCALL(Tllstream202204*, llstreamopen_202241)(NimStringDesc* filename, NU8 mode);
N_NIMCALL(void, inittoken_205306)(Ttoken205169* L);
N_NIMCALL(void, openlexer_205329)(Tlexer205173* lex, NimStringDesc* filename, Tllstream202204* inputstream);
N_NIMCALL(void, rawgettok_208824)(Tlexer205173* L, Ttoken205169* tok);
N_NIMCALL(void, printtok_205301)(Ttoken205169* tok);
N_NIMCALL(void, closelexer_205335)(Tlexer205173* lex);
N_NIMCALL(void, commandinteractive_532201)(void);
N_NIMCALL(void, interactivepasses_532076)(void);
N_NIMCALL(void, initdefines_190184)(void);
N_NIMCALL(Tpasscontext261002*, myopen_414030)(Tsym214822* module);
N_NIMCALL(Tnode214790*, myprocess_414203)(Tpasscontext261002* c, Tnode214790* n);
N_NIMCALL(void, compilesystemmodule_531856)(void);
N_NIMCALL(Tsym214822*, compilemodule_531695)(NI32 fileidx, NU32 flags);
N_NIMCALL(NI32, fileinfoidx_183017)(NimStringDesc* filename);
N_NIMCALL(Tsym214822*, makestdinmodule_531889)(void);
N_NIMCALL(void, processmodule_261044)(Tsym214822* module, Tllstream202204* stream, Trodreader252021* rd);
N_NIMCALL(Tllstream202204*, llstreamopenstdin_202266)(void);
N_NIMCALL(void, commandeval_532235)(NimStringDesc* exp);
N_NIMCALL(void, evalnim_532231)(Tnode214790* nodes, Tsym214822* module);
N_NIMCALL(void, carrypasses_261174)(Tnode214790* nodes, Tsym214822* module, Tpass261014* passes, NI passesLen0);
N_NIMCALL(Tnode214790*, parsestring_231536)(NimStringDesc* s, NimStringDesc* filename, NI line, Terrorhandler205171 errorhandler);
N_NIMCALL(void, resetmemory_532293)(void);
N_NIMCALL(void, resetallmodules_531320)(void);
N_NIMCALL(void, resetropecache_169075)(void);
N_NIMCALL(void, resetsystypes_258199)(void);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, commandsuggest_532286)(void);
N_NIMCALL(void, resetmodule_531258)(NI32 fileidx);
N_NIMCALL(void, serve_530236)(TY530238 action);
N_NIMCALL(void, maincommand_532610)(void);
N_NIMCALL(void, rawmessage_184645)(NU16 msg, NimStringDesc** args, NI argsLen0);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, nsuformatFloat)(NF f, NU8 format, NI precision, NIM_CHAR decimalsep);
N_NIMCALL(NimStringDesc*, formatsize_102497)(NI64 bytes, NIM_CHAR decimalsep);
N_NIMCALL(NI, gettotalmem_8059)(void);
N_NIMCALL(NIM_BOOL, isdefined_190010)(NimStringDesc* symbol);
N_NIMCALL(void, resetattributes_185618)(void);
STRING_LITERAL(TMP3722, "c", 1);
STRING_LITERAL(TMP3723, "cc", 2);
STRING_LITERAL(TMP3724, "compile", 7);
STRING_LITERAL(TMP3725, "compiletoc", 10);
STRING_LITERAL(TMP3726, "cpp", 3);
STRING_LITERAL(TMP3727, "compiletocpp", 12);
STRING_LITERAL(TMP3728, "objc", 4);
STRING_LITERAL(TMP3729, "compiletooc", 11);
STRING_LITERAL(TMP3730, "run", 3);
STRING_LITERAL(TMP3731, "js", 2);
STRING_LITERAL(TMP3732, "compiletojs", 11);
STRING_LITERAL(TMP3733, "doc", 3);
STRING_LITERAL(TMP3734, "doc2", 4);
STRING_LITERAL(TMP3735, "rst2html", 8);
STRING_LITERAL(TMP3736, "rst2tex", 7);
STRING_LITERAL(TMP3737, "jsondoc", 7);
STRING_LITERAL(TMP3738, "buildindex", 10);
STRING_LITERAL(TMP3739, "gendepend", 9);
STRING_LITERAL(TMP3740, "dump", 4);
STRING_LITERAL(TMP3741, "check", 5);
STRING_LITERAL(TMP3742, "parse", 5);
STRING_LITERAL(TMP3743, "scan", 4);
STRING_LITERAL(TMP3744, "secret", 6);
STRING_LITERAL(TMP3745, "e", 1);
STRING_LITERAL(TMP3746, "reset", 5);
STRING_LITERAL(TMP3747, "idetools", 8);
STRING_LITERAL(TMP3748, "serve", 5);
STRING_LITERAL(TMP3749, "nop", 3);
STRING_LITERAL(TMP3750, "help", 4);
STRING_LITERAL(TMP4631, "", 0);
STRING_LITERAL(TMP4632, "nimrod", 6);
STRING_LITERAL(TMP4633, "ecmascript", 10);
STRING_LITERAL(TMP5028, "nimdoc.cfg", 10);
STRING_LITERAL(TMP5159, "nimdoc", 6);
STRING_LITERAL(TMP5165, "nimdoc.tex.cfg", 14);
STRING_LITERAL(TMP5235, "dot -Tpng -o", 12);
STRING_LITERAL(TMP5236, "png", 3);
STRING_LITERAL(TMP5237, "dot", 3);
STRING_LITERAL(TMP5238, "dump.format", 11);
STRING_LITERAL(TMP5239, "json", 4);
STRING_LITERAL(TMP5240, "false", 5);
STRING_LITERAL(TMP5241, "version", 7);
STRING_LITERAL(TMP5242, "0.13.0", 6);
STRING_LITERAL(TMP5243, "project_path", 12);
STRING_LITERAL(TMP5244, "defined_symbols", 15);
STRING_LITERAL(TMP5245, "lib_paths", 9);
STRING_LITERAL(TMP5248, "-- list of currently defined symbols --", 39);
STRING_LITERAL(TMP5249, "-- end of list --", 17);
STRING_LITERAL(TMP5250, "nim", 3);
STRING_LITERAL(TMP5253, "Beware: Indentation tokens depend on the parser\'s state!", 56);
STRING_LITERAL(TMP5254, "nimscript", 9);
STRING_LITERAL(TMP5256, "echo \"eval\\t\", repr(", 20);
STRING_LITERAL(TMP5257, ")", 1);
static NIM_CONST Terrorhandler205171 TMP5258 = {NIM_NIL,NIM_NIL};
STRING_LITERAL(TMP5295, "release", 7);
STRING_LITERAL(TMP5296, "Release Build", 13);
STRING_LITERAL(TMP5297, "Debug Build", 11);
extern NF glastcmdtime_160134;
extern Tlinkedlist135016 searchpaths_160125;
extern NimStringDesc* libpath_160198;
extern NimStringDesc* gprojectfull_160201;
extern NimStringDesc* gprojectpath_160200;
extern NI gfrontendid_213003;
extern NimStringDesc* command_160205;
extern NU8 gcmd_160123;
extern NU32 gglobaloptions_160121;
extern NIM_BOOL isserving_160136;
extern NimStringDesc* lastcaascmd_530202;
extern NimStringDesc* curcaascmd_530201;
extern Gcheap49818 gch_49859;
extern TY531042* gmemcachedata_531059;
extern NI gerrormax_183084;
extern NimStringDesc* gprojectname_160199;
extern Stringtableobj140209* gsymbols_190001;
extern NI32 gprojectmainidx_160203;
extern TNimType NTI205173; /* TLexer */
extern TY125202* commandargs_160223;
extern Tsym214822* systemmodule_258007;
extern Tsymseq214792* gowners_264234;
extern TNimType NTI214792; /* TSymSeq */
extern TY189023 buckets_189024;
extern Tident189012* idanon_189455;
extern NimStringDesc* gevalexpr_160133;
extern Tlineinfo182337 gtrackpos_183441;
extern NI gerrorcounter_183081;
extern NI glinescompiled_205198;

static N_INLINE(void, setid_213425)(NI id) {
	gfrontendid_213003 = ((gfrontendid_213003 >= (NI)(id + ((NI) 1))) ? gfrontendid_213003 : (NI)(id + ((NI) 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)), (*a).Sup.len);
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, semanticpasses_532015)(void) {
	Tpass261014 LOC1;
	Tpass261014 LOC2;
	LOC1.Field0 = verboseopen_513003;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = verboseprocess_513008;
	LOC1.Field3 = NIM_NIL;
	registerpass_261145(LOC1);
	LOC2.Field0 = myopen_467665;
	LOC2.Field1 = myopencached_467696;
	LOC2.Field2 = myprocess_467804;
	LOC2.Field3 = myclose_467814;
	registerpass_261145(LOC2);
}

N_NIMCALL(void, rodpass_532001)(void) {
	{
		Tpass261014 LOC5;
		if (!((gglobaloptions_160121 &(1U<<((NU)(((NU8) 14))&31U)))!=0)) goto LA3;
		LOC5.Field0 = myopen_273919;
		LOC5.Field1 = NIM_NIL;
		LOC5.Field2 = process_273699;
		LOC5.Field3 = myclose_273929;
		registerpass_261145(LOC5);
	}
	LA3: ;
}

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

static N_INLINE(void, rtladdzct_53001)(Cell47505* c) {
	addzct_51417((&gch_49859.zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell47505* c;
	c = usrtocell_51440(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_53001(c);
	}
	LA3: ;
}

N_NIMCALL(void, commandcompiletoc_532029)(void) {
	Tpass261014 LOC1;
	initvars_194834();
	semanticpasses_532015();
	LOC1.Field0 = myopen_503515;
	LOC1.Field1 = myopencached_503639;
	LOC1.Field2 = myprocess_503802;
	LOC1.Field3 = myclose_504230;
	registerpass_261145(LOC1);
	rodpass_532001();
	compileproject_531877(((NI32) -1));
	cgenwritemodules_504292();
	{
		NimStringDesc* LOC6;
		if (!!((gcmd_160123 == ((NU8) 19)))) goto LA4;
		LOC6 = 0;
		LOC6 = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP4631));
		callccompiler_195510(LOC6);
	}
	LA4: ;
	{
		NimStringDesc* LOC11;
		if (!isserving_160136) goto LA9;
		LOC11 = 0;
		LOC11 = lastcaascmd_530202; lastcaascmd_530202 = copyStringRC1(curcaascmd_530201);
		if (LOC11) nimGCunrefNoCycle(LOC11);
		resetcgenmodules_503424();
		{
			NI i_532065;
			NI HEX3Atmp_532067;
			NI res_532070;
			i_532065 = 0;
			HEX3Atmp_532067 = 0;
			HEX3Atmp_532067 = ((gmemcachedata_531059 ? gmemcachedata_531059->Sup.len : 0) - 1);
			res_532070 = ((NI) 0);
			{
				while (1) {
					if (!(res_532070 <= HEX3Atmp_532067)) goto LA14;
					i_532065 = res_532070;
					gmemcachedata_531059->data[i_532065].hashstatus = ((NU8) 1);
					gmemcachedata_531059->data[i_532065].needsrecompile = ((NU8) 0);
					res_532070 += ((NI) 1);
				} LA14: ;
			}
		}
		resetcompilationlists_194867();
		resetcaches_468424();
		Gcfullcollect_9805();
	}
	LA9: ;
}

N_NIMCALL(void, commandcompiletojs_532074)(void) {
	Tpass261014 LOC1;
	settarget_167623(((NU8) 22), ((NU8) 15));
	definesymbol_190004(((NimStringDesc*) &TMP4632));
	definesymbol_190004(((NimStringDesc*) &TMP4633));
	definesymbol_190004(((NimStringDesc*) &TMP3731));
	semanticpasses_532015();
	LOC1.Field0 = myopen_512130;
	LOC1.Field1 = myopencached_512125;
	LOC1.Field2 = myprocess_512028;
	LOC1.Field3 = myclose_512102;
	registerpass_261145(LOC1);
	compileproject_531877(((NI32) -1));
}

N_NIMCALL(void, commanddoc2_532024)(void) {
	Tpass261014 LOC1;
	gerrormax_183084 = ((NI) 2147483647);
	semanticpasses_532015();
	LOC1.Field0 = myopen_515048;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = processnode_515042;
	LOC1.Field3 = close_515009;
	registerpass_261145(LOC1);
	compileproject_531877(((NI32) -1));
	finishdoc2pass_515069(gprojectname_160199);
}

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

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

N_NIMCALL(void, commandgendepend_532017)(void) {
	Tpass261014 LOC1;
	Tpass261014 LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	NimStringDesc* LOC5;
	semanticpasses_532015();
	LOC1.Field0 = myopen_514078;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = adddotdependency_514020;
	LOC1.Field3 = NIM_NIL;
	registerpass_261145(LOC1);
	LOC2.Field0 = NIM_NIL;
	LOC2.Field1 = NIM_NIL;
	LOC2.Field2 = cleanup_513036;
	LOC2.Field3 = cleanup_513036;
	registerpass_261145(LOC2);
	compileproject_531877(((NI32) -1));
	generatedot_514003(gprojectfull_160201);
	LOC3 = 0;
	LOC4 = 0;
	LOC4 = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP5236));
	LOC5 = 0;
	LOC5 = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP5237));
	LOC3 = rawNewString(LOC4->Sup.len + LOC5->Sup.len + 13);
appendString(LOC3, ((NimStringDesc*) &TMP5235));
appendString(LOC3, LOC4);
appendChar(LOC3, 32);
appendString(LOC3, LOC5);
	execexternalprogram_194881(LOC3, ((NU16) 284));
}

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

N_NIMCALL(void, commandcheck_532019)(void) {
	gerrormax_183084 = ((NI) 2147483647);
	semanticpasses_532015();
	rodpass_532001();
	compileproject_531877(((NI32) -1));
}

N_NIMCALL(void, commandscan_532251)(void) {
	NimStringDesc* f;
	NimStringDesc* LOC1;
	Tllstream202204* stream;
	LOC1 = 0;
	LOC1 = maincommandarg_160267();
	f = nosaddFileExt(LOC1, ((NimStringDesc*) &TMP5250));
	stream = llstreamopen_202241(f, ((NU8) 0));
	{
		Tlexer205173 L;
		Ttoken205169 tok;
		if (!!((stream == NIM_NIL))) goto LA4;
		memset((void*)(&L), 0, sizeof(L));
		L.Sup.Sup.m_type = (&NTI205173);
		memset((void*)(&tok), 0, sizeof(tok));
		inittoken_205306((&tok));
		openlexer_205329((&L), f, stream);
		{
			while (1) {
				rawgettok_208824((&L), (&tok));
				printtok_205301((&tok));
				{
					if (!(tok.toktype == ((NU8) 1))) goto LA10;
					goto LA6;
				}
				LA10: ;
			}
		} LA6: ;
		closelexer_205335((&L));
	}
	goto LA2;
	LA4: ;
	{
		rawmessage_185612(((NU16) 3), f);
	}
	LA2: ;
}

N_NIMCALL(void, interactivepasses_532076)(void) {
	Tpass261014 LOC1;
	Tpass261014 LOC2;
	Tpass261014 LOC3;
	initdefines_190184();
	definesymbol_190004(((NimStringDesc*) &TMP5254));
	LOC1.Field0 = verboseopen_513003;
	LOC1.Field1 = NIM_NIL;
	LOC1.Field2 = verboseprocess_513008;
	LOC1.Field3 = NIM_NIL;
	registerpass_261145(LOC1);
	LOC2.Field0 = myopen_467665;
	LOC2.Field1 = myopencached_467696;
	LOC2.Field2 = myprocess_467804;
	LOC2.Field3 = myclose_467814;
	registerpass_261145(LOC2);
	LOC3.Field0 = myopen_414030;
	LOC3.Field1 = NIM_NIL;
	LOC3.Field2 = myprocess_414203;
	LOC3.Field3 = myprocess_414203;
	registerpass_261145(LOC3);
}

N_NIMCALL(void, commandinteractive_532201)(void) {
	gerrormax_183084 = ((NI) 2147483647);
	interactivepasses_532076();
	compilesystemmodule_531856();
	{
		NI32 LOC5;
		Tsym214822* LOC6;
		if (!(((NI) 0) < (commandargs_160223 ? commandargs_160223->Sup.len : 0))) goto LA3;
		LOC5 = 0;
		LOC5 = fileinfoidx_183017(gprojectfull_160201);
		LOC6 = 0;
		LOC6 = compilemodule_531695(LOC5, 0);
	}
	goto LA1;
	LA3: ;
	{
		Tsym214822* m;
		Tllstream202204* LOC8;
		m = makestdinmodule_531889();
		(*m).flags |= ((NU32)1)<<((((NU8) 12))%(sizeof(NU32)*8));
		LOC8 = 0;
		LOC8 = llstreamopenstdin_202266();
		processmodule_261044(m, LOC8, NIM_NIL);
	}
	LA1: ;
}

N_NIMCALL(void, evalnim_532231)(Tnode214790* nodes, Tsym214822* module) {
	TY532229 LOC1;
	LOC1[0].Field0 = verboseopen_513003;
	LOC1[0].Field1 = NIM_NIL;
	LOC1[0].Field2 = verboseprocess_513008;
	LOC1[0].Field3 = NIM_NIL;
	LOC1[1].Field0 = myopen_467665;
	LOC1[1].Field1 = myopencached_467696;
	LOC1[1].Field2 = myprocess_467804;
	LOC1[1].Field3 = myclose_467814;
	LOC1[2].Field0 = myopen_414030;
	LOC1[2].Field1 = NIM_NIL;
	LOC1[2].Field2 = myprocess_414203;
	LOC1[2].Field3 = myprocess_414203;
	carrypasses_261174(nodes, module, LOC1, 3);
}

N_NIMCALL(void, commandeval_532235)(NimStringDesc* exp) {
	NimStringDesc* echoexp;
	NimStringDesc* LOC5;
	Tnode214790* LOC6;
	Tsym214822* LOC7;
	{
		if (!(systemmodule_258007 == NIM_NIL)) goto LA3;
		interactivepasses_532076();
		compilesystemmodule_531856();
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = rawNewString(exp->Sup.len + 21);
appendString(LOC5, ((NimStringDesc*) &TMP5256));
appendString(LOC5, exp);
appendString(LOC5, ((NimStringDesc*) &TMP5257));
	echoexp = LOC5;
	LOC6 = 0;
	LOC6 = parsestring_231536(echoexp, ((NimStringDesc*) &TMP4631), ((NI) 0), TMP5258);
	LOC7 = 0;
	LOC7 = makestdinmodule_531889();
	evalnim_532231(LOC6, LOC7);
}

N_NIMCALL(void, resetmemory_532293)(void) {
	resetcompilationlists_194867();
	resetcaches_468424();
	resetallmodules_531320();
	resetropecache_169075();
	resetsystypes_258199();
	if (gowners_264234) nimGCunrefNoCycle(gowners_264234);
	gowners_264234 = (Tsymseq214792*) newSeqRC1((&NTI214792), 0);
	{
		NI i_532414;
		NI res_532605;
		i_532414 = 0;
		res_532605 = ((NI) 0);
		{
			while (1) {
				if (!(res_532605 <= ((NI) 8191))) goto LA3;
				i_532414 = ((NI) (res_532605));
				asgnRefNoCycle((void**) (&buckets_189024[(i_532414)- 0]), NIM_NIL);
				res_532605 += ((NI) 1);
			} LA3: ;
		}
	}
	asgnRefNoCycle((void**) (&idanon_189455), NIM_NIL);
}

N_NIMCALL(void, commandsuggest_532286)(void) {
	{
		NI32 gdirtybufferidx;
		Tsym214822* LOC5;
		if (!isserving_160136) goto LA3;
		commandcompiletoc_532029();
		gdirtybufferidx = gtrackpos_183441.fileindex;
		LOC5 = 0;
		LOC5 = compilemodule_531695(gdirtybufferidx, 512);
		resetmodule_531258(gdirtybufferidx);
	}
	goto LA1;
	LA3: ;
	{
		gerrormax_183084 = ((NI) 2147483647);
		semanticpasses_532015();
		rodpass_532001();
		compileproject_531877(((NI32) -1));
	}
	LA1: ;
}

N_NIMCALL(void, maincommand_532610)(void) {
	NimStringDesc* LOC5;
	clearpasses_261143();
	glastcmdtime_160134 = ntepochTime();
	appendstr_135244((&searchpaths_160125), libpath_160198);
	{
		if (!!(((gprojectfull_160201 ? gprojectfull_160201->Sup.len : 0) == ((NI) 0)))) goto LA3;
		prependstr_135413((&searchpaths_160125), gprojectpath_160200);
	}
	LA3: ;
	setid_213425(((NI) 100));
	LOC5 = 0;
	LOC5 = nsuNormalize(command_160205);
	switch (hashString(LOC5) & 31) {
	case 0: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3724))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3729))) goto LA8;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3747))) goto LA25;
break;
	case 2: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3740))) goto LA18;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3749))) goto LA27;
break;
	case 4: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3742))) goto LA20;
break;
	case 7: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3735))) goto LA13;
break;
	case 9: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3730))) goto LA9;
break;
	case 10: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3723))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3732))) goto LA10;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3741))) goto LA19;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3746))) goto LA24;
break;
	case 11: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3739))) goto LA17;
break;
	case 12: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3750))) goto LA27;
break;
	case 13: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3733))) goto LA11;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3736))) goto LA14;
break;
	case 14: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3737))) goto LA15;
break;
	case 16: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3725))) goto LA6;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3745))) goto LA23;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3748))) goto LA26;
break;
	case 19: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3727))) goto LA7;
break;
	case 21: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3744))) goto LA22;
break;
	case 25: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3722))) goto LA6;
break;
	case 26: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3743))) goto LA21;
break;
	case 27: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3726))) goto LA7;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3731))) goto LA10;
break;
	case 29: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3738))) goto LA16;
break;
	case 31: 
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3728))) goto LA8;
if (eqStrings(LOC5, ((NimStringDesc*) &TMP3734))) goto LA12;
break;
	}
	goto LA28;
	LA6: ;
	{
		gcmd_160123 = ((NU8) 1);
		commandcompiletoc_532029();
	}
	goto LA29;
	LA7: ;
	{
		gcmd_160123 = ((NU8) 2);
		definesymbol_190004(((NimStringDesc*) &TMP3726));
		commandcompiletoc_532029();
	}
	goto LA29;
	LA8: ;
	{
		gcmd_160123 = ((NU8) 3);
		definesymbol_190004(((NimStringDesc*) &TMP3728));
		commandcompiletoc_532029();
	}
	goto LA29;
	LA9: ;
	{
		gcmd_160123 = ((NU8) 19);
		rawmessage_185612(((NU16) 185), command_160205);
	}
	goto LA29;
	LA10: ;
	{
		gcmd_160123 = ((NU8) 4);
		commandcompiletojs_532074();
	}
	goto LA29;
	LA11: ;
	{
		wantmainmodule_531871();
		gcmd_160123 = ((NU8) 8);
		loadconfigs_210603(((NimStringDesc*) &TMP5028));
		commanddoc_361714();
	}
	goto LA29;
	LA12: ;
	{
		gcmd_160123 = ((NU8) 8);
		loadconfigs_210603(((NimStringDesc*) &TMP5028));
		definesymbol_190004(((NimStringDesc*) &TMP5159));
		commanddoc2_532024();
	}
	goto LA29;
	LA13: ;
	{
		gcmd_160123 = ((NU8) 16);
		loadconfigs_210603(((NimStringDesc*) &TMP5028));
		commandrst2html_361742();
	}
	goto LA29;
	LA14: ;
	{
		gcmd_160123 = ((NU8) 17);
		loadconfigs_210603(((NimStringDesc*) &TMP5165));
		commandrst2tex_361744();
	}
	goto LA29;
	LA15: ;
	{
		wantmainmodule_531871();
		gcmd_160123 = ((NU8) 8);
		loadconfigs_210603(((NimStringDesc*) &TMP5028));
		wantmainmodule_531871();
		definesymbol_190004(((NimStringDesc*) &TMP5159));
		commandjson_361746();
	}
	goto LA29;
	LA16: ;
	{
		gcmd_160123 = ((NU8) 8);
		loadconfigs_210603(((NimStringDesc*) &TMP5028));
		commandbuildindex_361776();
	}
	goto LA29;
	LA17: ;
	{
		gcmd_160123 = ((NU8) 9);
		commandgendepend_532017();
	}
	goto LA29;
	LA18: ;
	{
		gcmd_160123 = ((NU8) 10);
		{
			NimStringDesc* LOC45;
			Jsonnodeobj306633* definedsymbols;
			Jsonnodeobj306633* libpaths;
			Jsonnodeobj306633* dumpdata;
			TY533027 LOC66;
			NimStringDesc* LOC67;
			LOC45 = 0;
			LOC45 = getconfigvar_160282(((NimStringDesc*) &TMP5238));
			if (!eqStrings(LOC45, ((NimStringDesc*) &TMP5239))) goto LA46;
			wantmainmodule_531871();
			definedsymbols = newjarray_306781();
			{
				NimStringDesc* s_533002;
				s_533002 = 0;
				{
					NimStringDesc* key_533406;
					NimStringDesc* val_533408;
					key_533406 = 0;
					val_533408 = 0;
					{
						NI h_533410;
						NI HEX3Atmp_533412;
						NI res_533414;
						h_533410 = 0;
						HEX3Atmp_533412 = 0;
						HEX3Atmp_533412 = ((*gsymbols_190001).data ? ((*gsymbols_190001).data->Sup.len-1) : -1);
						res_533414 = ((NI) 0);
						{
							while (1) {
								if (!(res_533414 <= HEX3Atmp_533412)) goto LA52;
								h_533410 = res_533414;
								{
									if (!!((*gsymbols_190001).data->data[h_533410].Field0 == 0)) goto LA55;
									key_533406 = (*gsymbols_190001).data->data[h_533410].Field0;
									val_533408 = (*gsymbols_190001).data->data[h_533410].Field1;
									{
										Jsonnodeobj306633* LOC61;
										if (!!(eqStrings(val_533408, ((NimStringDesc*) &TMP5240)))) goto LA59;
										s_533002 = key_533406;
										LOC61 = 0;
										LOC61 = HEX25_306988(s_533002);
										(*definedsymbols).kindU.S7.elems = (TY306653*) incrSeqV2(&((*definedsymbols).kindU.S7.elems)->Sup, sizeof(Jsonnodeobj306633*));
										asgnRefNoCycle((void**) (&(*definedsymbols).kindU.S7.elems->data[(*definedsymbols).kindU.S7.elems->Sup.len]), LOC61);
										++(*definedsymbols).kindU.S7.elems->Sup.len;
									}
									LA59: ;
								}
								LA55: ;
								res_533414 += ((NI) 1);
							} LA52: ;
						}
					}
				}
			}
			libpaths = newjarray_306781();
			{
				NimStringDesc* dir_533015;
				Tstrentry135012* it_533420;
				dir_533015 = 0;
				it_533420 = ((Tstrentry135012*) (searchpaths_160125.head));
				{
					while (1) {
						Jsonnodeobj306633* LOC65;
						if (!!((it_533420 == NIM_NIL))) goto LA64;
						dir_533015 = (*it_533420).data;
						LOC65 = 0;
						LOC65 = HEX25_306988(dir_533015);
						(*libpaths).kindU.S7.elems = (TY306653*) incrSeqV2(&((*libpaths).kindU.S7.elems)->Sup, sizeof(Jsonnodeobj306633*));
						asgnRefNoCycle((void**) (&(*libpaths).kindU.S7.elems->data[(*libpaths).kindU.S7.elems->Sup.len]), LOC65);
						++(*libpaths).kindU.S7.elems->Sup.len;
						it_533420 = ((Tstrentry135012*) ((*it_533420).Sup.next));
					} LA64: ;
				}
			}
			memset((void*)LOC66, 0, sizeof(LOC66));
			LOC66[0].Field0 = copyString(((NimStringDesc*) &TMP5241));
			LOC66[0].Field1 = HEX25_306988(((NimStringDesc*) &TMP5242));
			LOC66[1].Field0 = copyString(((NimStringDesc*) &TMP5243));
			LOC66[1].Field1 = HEX25_306988(gprojectfull_160201);
			LOC66[2].Field0 = copyString(((NimStringDesc*) &TMP5244));
			LOC66[2].Field1 = definedsymbols;
			LOC66[3].Field0 = copyString(((NimStringDesc*) &TMP5245));
			LOC66[3].Field1 = libpaths;
			dumpdata = HEX25_307040(LOC66, 4);
			LOC67 = 0;
			LOC67 = HEX24_310805(dumpdata);
			msgwriteln_183449(LOC67, 3);
		}
		goto LA43;
		LA46: ;
		{
			msgwriteln_183449(((NimStringDesc*) &TMP5248), 3);
			{
				NimStringDesc* s_533044;
				s_533044 = 0;
				{
					NimStringDesc* key_533426;
					NimStringDesc* val_533428;
					key_533426 = 0;
					val_533428 = 0;
					{
						NI h_533430;
						NI HEX3Atmp_533432;
						NI res_533434;
						h_533430 = 0;
						HEX3Atmp_533432 = 0;
						HEX3Atmp_533432 = ((*gsymbols_190001).data ? ((*gsymbols_190001).data->Sup.len-1) : -1);
						res_533434 = ((NI) 0);
						{
							while (1) {
								if (!(res_533434 <= HEX3Atmp_533432)) goto LA73;
								h_533430 = res_533434;
								{
									if (!!((*gsymbols_190001).data->data[h_533430].Field0 == 0)) goto LA76;
									key_533426 = (*gsymbols_190001).data->data[h_533430].Field0;
									val_533428 = (*gsymbols_190001).data->data[h_533430].Field1;
									{
										if (!!(eqStrings(val_533428, ((NimStringDesc*) &TMP5240)))) goto LA80;
										s_533044 = key_533426;
										msgwriteln_183449(s_533044, 3);
									}
									LA80: ;
								}
								LA76: ;
								res_533434 += ((NI) 1);
							} LA73: ;
						}
					}
				}
			}
			msgwriteln_183449(((NimStringDesc*) &TMP5249), 3);
			{
				NimStringDesc* it_533047;
				Tstrentry135012* it_533440;
				it_533047 = 0;
				it_533440 = ((Tstrentry135012*) (searchpaths_160125.head));
				{
					while (1) {
						if (!!((it_533440 == NIM_NIL))) goto LA84;
						it_533047 = (*it_533440).data;
						msgwriteln_183449(it_533047, 0);
						it_533440 = ((Tstrentry135012*) ((*it_533440).Sup.next));
					} LA84: ;
				}
			}
		}
		LA43: ;
	}
	goto LA29;
	LA19: ;
	{
		gcmd_160123 = ((NU8) 11);
		commandcheck_532019();
	}
	goto LA29;
	LA20: ;
	{
		Tnode214790* LOC87;
		gcmd_160123 = ((NU8) 12);
		wantmainmodule_531871();
		LOC87 = 0;
		LOC87 = parsefile_238029(gprojectmainidx_160203);
	}
	goto LA29;
	LA21: ;
	{
		gcmd_160123 = ((NU8) 13);
		wantmainmodule_531871();
		commandscan_532251();
		msgwriteln_183449(((NimStringDesc*) &TMP5253), 0);
	}
	goto LA29;
	LA22: ;
	{
		gcmd_160123 = ((NU8) 18);
		commandinteractive_532201();
	}
	goto LA29;
	LA23: ;
	{
		NimStringDesc* LOC91;
		LOC91 = 0;
		LOC91 = maincommandarg_160267();
		commandeval_532235(LOC91);
	}
	goto LA29;
	LA24: ;
	{
		resetmemory_532293();
	}
	goto LA29;
	LA25: ;
	{
		gcmd_160123 = ((NU8) 14);
		{
			if (!!(((gevalexpr_160133) && (gevalexpr_160133)->Sup.len == 0))) goto LA96;
			commandeval_532235(gevalexpr_160133);
		}
		goto LA94;
		LA96: ;
		{
			commandsuggest_532286();
		}
		LA94: ;
	}
	goto LA29;
	LA26: ;
	{
		isserving_160136 = NIM_TRUE;
		gglobaloptions_160121 |= ((NU32)1)<<((((NU8) 15))%(sizeof(NU32)*8));
		gerrormax_183084 = ((NI) 2147483647);
		serve_530236(maincommand_532610);
	}
	goto LA29;
	LA27: ;
	{
		gcmd_160123 = ((NU8) 10);
	}
	goto LA29;
	LA28: ;
	{
		rawmessage_185612(((NU16) 185), command_160205);
	}
	LA29: ;
	{
		NIM_BOOL LOC104;
		TY185781 LOC108;
		NF LOC109;
		NI LOC110;
		LOC104 = 0;
		LOC104 = (gerrorcounter_183081 == ((NI) 0));
		if (!(LOC104)) goto LA105;
		LOC104 = !(((525376 &(1U<<((NU)(gcmd_160123)&31U)))!=0));
		LA105: ;
		if (!LOC104) goto LA106;
		memset((void*)LOC108, 0, sizeof(LOC108));
		LOC108[0] = nimIntToStr(glinescompiled_205198);
		LOC109 = 0;
		LOC109 = ntepochTime();
		LOC108[1] = nsuformatFloat(((NF)(LOC109) - (NF)(glastcmdtime_160134)), ((NU8) 1), ((NI) 3), 46);
		LOC110 = 0;
		LOC110 = gettotalmem_8059();
		LOC108[2] = formatsize_102497(((NI64) (LOC110)), 46);
		{
			NIM_BOOL LOC113;
			LOC113 = 0;
			LOC113 = isdefined_190010(((NimStringDesc*) &TMP5295));
			if (!LOC113) goto LA114;
			LOC108[3] = copyString(((NimStringDesc*) &TMP5296));
		}
		goto LA111;
		LA114: ;
		{
			LOC108[3] = copyString(((NimStringDesc*) &TMP5297));
		}
		LA111: ;
		rawmessage_184645(((NU16) 269), LOC108, 4);
	}
	LA106: ;
	resetattributes_185618();
}
NIM_EXTERNC N_NOINLINE(void, compiler_mainInit000)(void) {
}

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

