text: /* Generated by Nim Compiler v0.15.0 */
  /*   (c) 2016 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 Tsymseq294804 Tsymseq294804;
  typedef struct Tsym294834 Tsym294834;
  typedef struct TGenericSeq TGenericSeq;
  typedef struct TNimType TNimType;
  typedef struct TNimNode TNimNode;
  typedef struct Cell47305 Cell47305;
  typedef struct Cellseq47321 Cellseq47321;
  typedef struct Gcheap49818 Gcheap49818;
  typedef struct Gcstack49816 Gcstack49816;
  typedef struct Memregion29485 Memregion29485;
  typedef struct Smallchunk29439 Smallchunk29439;
  typedef struct Llchunk29479 Llchunk29479;
  typedef struct Bigchunk29441 Bigchunk29441;
  typedef struct Intset29414 Intset29414;
  typedef struct Trunk29410 Trunk29410;
  typedef struct Avlnode29483 Avlnode29483;
  typedef struct Gcstat49814 Gcstat49814;
  typedef struct Cellset47317 Cellset47317;
  typedef struct Pagedesc47313 Pagedesc47313;
  typedef struct TY595041 TY595041;
  typedef struct Tmoduleinmemory595007 Tmoduleinmemory595007;
  typedef struct TY334033 TY334033;
  typedef struct Tstrtable294806 Tstrtable294806;
  typedef struct Tnode294802 Tnode294802;
  typedef struct Tidobj201004 Tidobj201004;
  typedef struct TNimObject TNimObject;
  typedef struct Ttypeseq294836 Ttypeseq294836;
  typedef struct TY294929 TY294929;
  typedef struct Ttype294840 Ttype294840;
  typedef struct Tident201010 Tident201010;
  typedef struct Tlineinfo193336 Tlineinfo193336;
  typedef struct Tloc294816 Tloc294816;
  typedef struct Ropeobj180006 Ropeobj180006;
  typedef struct Tlib294820 Tlib294820;
  typedef struct NimStringDesc NimStringDesc;
  typedef struct TY129506 TY129506;
  typedef struct Trodreader334021 Trodreader334021;
  typedef struct Tllstream284204 Tllstream284204;
  typedef struct TY205018 TY205018;
  typedef struct TY531153 TY531153;
  typedef struct Tcgen531027 Tcgen531027;
  typedef struct Basechunk29437 Basechunk29437;
  typedef struct Freecell29429 Freecell29429;
  typedef struct Tnodeseq294796 Tnodeseq294796;
  typedef struct Tinstantiation294824 Tinstantiation294824;
  typedef struct TY294960 TY294960;
  typedef struct Tlistentry148007 Tlistentry148007;
  typedef struct Tindex334019 Tindex334019;
  typedef struct Tiitable301142 Tiitable301142;
  typedef struct Tiipairseq301140 Tiipairseq301140;
  typedef struct Table334054 Table334054;
  typedef struct Keyvaluepairseq334057 Keyvaluepairseq334057;
  typedef struct Memfile332202 Memfile332202;
  typedef struct Tpasscontext343002 Tpasscontext343002;
  typedef struct Tidtable294850 Tidtable294850;
  typedef struct Tidpairseq294848 Tidpairseq294848;
  typedef struct Intset270030 Intset270030;
  typedef struct Trunk270026 Trunk270026;
  typedef struct Trunkseq270028 Trunkseq270028;
  typedef struct Tlinkedlist148013 Tlinkedlist148013;
  typedef struct Tcproc531021 Tcproc531021;
  typedef struct Tnodetable294862 Tnodetable294862;
  typedef struct Tnodepairseq294860 Tnodepairseq294860;
  typedef struct TY294961 TY294961;
  typedef struct Tiipair301138 Tiipair301138;
  typedef struct Keyvaluepair334060 Keyvaluepair334060;
  typedef struct Tidpair294846 Tidpair294846;
  typedef struct TY193350 TY193350;
  typedef struct TY531095 TY531095;
  typedef struct Tnodepair294858 Tnodepair294858;
  typedef struct Tblock531019 Tblock531019;
  struct  TGenericSeq  {
  NI len;
  NI reserved;
  };
  typedef NU8 Tnimkind3403;
  typedef NU8 Tnimtypeflag3409Set;
  typedef N_NIMCALL_PTR(void, TY3489) (void* p0, NI op0);
  typedef N_NIMCALL_PTR(void*, TY3494) (void* p0);
  struct  TNimType  {
  NI size;
  Tnimkind3403 kind;
  Tnimtypeflag3409Set flags;
  TNimType* base;
  TNimNode* node;
  void* finalizer;
  TY3489 marker;
  TY3494 deepcopy;
  };
  typedef NU8 Tnimnodekind3405;
  struct  TNimNode  {
  Tnimnodekind3405 kind;
  NI offset;
  TNimType* typ;
  NCSTRING name;
  NI len;
  TNimNode** sons;
  };
  typedef N_NIMCALL_PTR(void, Globalmarkerproc55802) (void);
  struct  Cell47305  {
  NI refcount;
  TNimType* typ;
  };
  struct  Cellseq47321  {
  NI len;
  NI cap;
  Cell47305** d;
  };
  typedef Smallchunk29439* TY29500[512];
  typedef Trunk29410* Trunkbuckets29412[256];
  struct  Intset29414  {
  Trunkbuckets29412 data;
  };
  struct  Memregion29485  {
  NI minlargeobj;
  NI maxlargeobj;
  TY29500 freesmallchunks;
  Llchunk29479* llmem;
  NI currmem;
  NI maxmem;
  NI freemem;
  NI lastsize;
  Bigchunk29441* freechunkslist;
  Intset29414 chunkstarts;
  Avlnode29483* root;
  Avlnode29483* deleted;
  Avlnode29483* last;
  Avlnode29483* freeavlnodes;
  NIM_BOOL locked;
  };
  struct  Gcstat49814  {
  NI stackscans;
  NI cyclecollections;
  NI maxthreshold;
  NI maxstacksize;
  NI maxstackcells;
  NI cycletablesize;
  NI64 maxpause;
  };
  struct  Cellset47317  {
  NI counter;
  NI max;
  Pagedesc47313* head;
  Pagedesc47313** data;
  };
  struct  Gcheap49818  {
  Gcstack49816* stack;
  void* stackbottom;
  NI cyclethreshold;
  Cellseq47321 zct;
  Cellseq47321 decstack;
  Cellseq47321 tempstack;
  NI recgclock;
  Memregion29485 region;
  Gcstat49814 stat;
  Cellset47317 marked;
  Cellseq47321 additionalroots;
  };
  typedef NU8 Sha1digest203005[20];
  typedef NU8 Tneedrecompile595003;
  typedef NU8 Thashstatus595005;
  struct  Tmoduleinmemory595007  {
  NF compiledat;
  Sha1digest203005 hash;
  TY334033* deps;
  Tneedrecompile595003 needsrecompile;
  Thashstatus595005 hashstatus;
  };
  struct  Tstrtable294806  {
  NI counter;
  Tsymseq294804* data;
  };
  typedef N_NIMCALL_PTR(Tnode294802*, TY343074) (Tsym294834* m0, NI32 fileidx0);
  typedef NU64 Tglobaloption171013Set;
  typedef NU8 Tglobaloption171013;
  struct  TNimObject  {
  TNimType* m_type;
  };
  struct  Tidobj201004  {
    TNimObject Sup;
  NI id;
  };
  typedef NU8 Tsymkind294435;
  typedef NU16 Tmagic294524;
  struct  Tlineinfo193336  {
  NI16 line;
  NI16 col;
  NI32 fileindex;
  };
  typedef NU32 Tsymflag294184Set;
  typedef NU32 Toption171009Set;
  typedef NU8 Tlockind294808;
  typedef NU8 Tstorageloc294812;
  typedef NU16 Tlocflag294810Set;
  struct  Tloc294816  {
  Tlockind294808 k;
  Tstorageloc294812 s;
  Tlocflag294810Set flags;
  Ttype294840* t;
  Ropeobj180006* r;
  };
  struct  Tsym294834  {
    Tidobj201004 Sup;
  Tsymkind294435 kind;
  union{
  struct {Ttypeseq294836* typeinstcache;
  } S1;
  struct {TY294929* procinstcache;
  Tsym294834* gcunsafetyreason;
  } S2;
  struct {TY294929* usedgenerics;
  Tstrtable294806 tab;
  } S3;
  struct {Tsym294834* guard;
  NI bitsize;
  } S4;
  } kindU;
  Tmagic294524 magic;
  Ttype294840* typ;
  Tident201010* name;
  Tlineinfo193336 info;
  Tsym294834* owner;
  Tsymflag294184Set flags;
  Tnode294802* ast;
  Toption171009Set options;
  NI position;
  NI offset;
  Tloc294816 loc;
  Tlib294820* annex;
  Tnode294802* constraint;
  };
  struct  NimStringDesc  {
    TGenericSeq Sup;
  NIM_CHAR data[SEQ_DECL_SIZE];
  };
  typedef N_NIMCALL_PTR(Tsym294834*, TY343069) (Tsym294834* m0, NI32 fileidx0);
  struct TY129506 {
  NimStringDesc* Field0;
  NimStringDesc* Field1;
  NimStringDesc* Field2;
  };
  struct  Tident201010  {
    Tidobj201004 Sup;
  NimStringDesc* s;
  Tident201010* next;
  NI h;
  };
  typedef NU16 Tmsgkind193002;
  typedef NU8 Tsymflag294184;
  typedef NU8 Tcommands171076;
  struct TY205018 {
  NimStringDesc* Field0;
  NI Field1;
  };
  typedef NU64 Tnotekind193330Set;
  struct  Gcstack49816  {
  Gcstack49816* prev;
  Gcstack49816* next;
  void* starts;
  void* pos;
  NI maxstacksize;
  };
  struct  Basechunk29437  {
  NI prevsize;
  NI size;
  NIM_BOOL used;
  };
  struct  Smallchunk29439  {
    Basechunk29437 Sup;
  Smallchunk29439* next;
  Smallchunk29439* prev;
  Freecell29429* freelist;
  NI free;
  NI acc;
  NF data;
  };
  struct  Llchunk29479  {
  NI size;
  NI acc;
  Llchunk29479* next;
  };
  struct  Bigchunk29441  {
    Basechunk29437 Sup;
  Bigchunk29441* next;
  Bigchunk29441* prev;
  NI align;
  NF data;
  };
  typedef NI TY29418[16];
  struct  Trunk29410  {
  Trunk29410* next;
  NI key;
  TY29418 bits;
  };
  typedef Avlnode29483* TY29490[2];
  struct  Avlnode29483  {
  TY29490 link;
  NI key;
  NI upperbound;
  NI level;
  };
  struct  Pagedesc47313  {
  Pagedesc47313* next;
  NI key;
  TY29418 bits;
  };
  typedef NU16 Tnodeflag294427Set;
  typedef NU8 Tnodekind294020;
  struct  Tnode294802  {
  Ttype294840* typ;
  Tlineinfo193336 info;
  Tnodeflag294427Set flags;
  Tnodekind294020 kind;
  union{
  struct {NI64 intval;
  } S1;
  struct {NF floatval;
  } S2;
  struct {NimStringDesc* strval;
  } S3;
  struct {Tsym294834* sym;
  } S4;
  struct {Tident201010* ident;
  } S5;
  struct {Tnodeseq294796* sons;
  } S6;
  } kindU;
  NimStringDesc* comment;
  };
  typedef NU8 Ttypekind294244;
  typedef NU8 Tcallingconvention294002;
  typedef NU32 Ttypeflag294431Set;
  struct  Ttype294840  {
    Tidobj201004 Sup;
  Ttypekind294244 kind;
  Tcallingconvention294002 callconv;
  Ttypeflag294431Set flags;
  Ttypeseq294836* sons;
  Tnode294802* n;
  Tsym294834* owner;
  Tsym294834* sym;
  Tsym294834* destructor;
  Tsym294834* deepcopy;
  Tsym294834* assignment;
  TY294960* methods;
  NI64 size;
  NI16 align;
  NI16 locklevel;
  Tloc294816 loc;
  };
  struct  Ropeobj180006  {
    TNimObject Sup;
  Ropeobj180006* left;
  Ropeobj180006* right;
  NI length;
  NimStringDesc* data;
  };
  struct  Tlistentry148007  {
    TNimObject Sup;
  Tlistentry148007* prev;
  Tlistentry148007* next;
  };
  typedef NU8 Tlibkind294818;
  struct  Tlib294820  {
    Tlistentry148007 Sup;
  Tlibkind294818 kind;
  NIM_BOOL generated;
  NIM_BOOL isoverriden;
  Ropeobj180006* name;
  Tnode294802* path;
  };
  typedef NU8 Treasonforrecompile334002;
  struct  Tiitable301142  {
  NI counter;
  Tiipairseq301140* data;
  };
  struct  Tindex334019  {
  NI lastidxkey;
  NI lastidxval;
  Tiitable301142 tab;
  NimStringDesc* r;
  NI offset;
  };
  struct  Table334054  {
  Keyvaluepairseq334057* data;
  NI counter;
  };
  struct  Memfile332202  {
  void* mem;
  NI size;
  int handle;
  };
  struct  Trodreader334021  {
    TNimObject Sup;
  NI pos;
  NCSTRING s;
  Toption171009Set options;
  Treasonforrecompile334002 reason;
  TY334033* moddeps;
  TY334033* files;
  NI dataidx;
  NI convertersidx;
  NI initidx;
  NI interfidx;
  NI compilerprocsidx;
  NI methodsidx;
  NimStringDesc* filename;
  Tindex334019 index;
  Tindex334019 imports;
  NI readerindex;
  NI line;
  NI moduleid;
  Table334054 syms;
  Memfile332202 memfile;
  Tsymseq294804* methods;
  NimStringDesc* origfile;
  NIM_BOOL inviewmode;
  };
  typedef NU8 Tllstreamkind284202;
  struct  Tllstream284204  {
    TNimObject Sup;
  Tllstreamkind284202 kind;
  FILE* f;
  NimStringDesc* s;
  NI rd;
  NI wr;
  NI lineoffset;
  };
  struct  Tpasscontext343002  {
    TNimObject Sup;
  NIM_BOOL fromcache;
  };
  typedef Ropeobj180006* Tcfilesections531009[18];
  typedef NU8 Codegenflag531025Set;
  struct  Tidtable294850  {
  NI counter;
  Tidpairseq294848* data;
  };
  struct  Intset270030  {
  NI counter;
  NI max;
  Trunk270026* head;
  Trunkseq270028* data;
  };
  struct  Tlinkedlist148013  {
  Tlistentry148007* head;
  Tlistentry148007* tail;
  NI counter;
  };
  struct  Tnodetable294862  {
  NI counter;
  Tnodepairseq294860* data;
  };
  typedef Ropeobj180006* TY531136[10];
  struct  Tcgen531027  {
    Tpasscontext343002 Sup;
  Tcfilesections531009 s;
  Codegenflag531025Set flags;
  Tsym294834* module;
  NimStringDesc* filename;
  NimStringDesc* cfilename;
  Ropeobj180006* tmpbase;
  Tidtable294850 typecache;
  Tidtable294850 forwtypecache;
  Intset270030 declaredthings;
  Intset270030 declaredprotos;
  Tlinkedlist148013 headerfiles;
  Intset270030 typeinfomarker;
  Tcproc531021* initproc;
  Tcproc531021* postinitproc;
  Tcproc531021* preinitproc;
  Ttypeseq294836* typestack;
  Tnodetable294862 datacache;
  Tsymseq294804* forwardedprocs;
  NI typenodes;
  NI nimtypes;
  Ropeobj180006* typenodesname;
  Ropeobj180006* nimtypesname;
  NI labels;
  TY531136 extensionloaders;
  Ropeobj180006* injectstmt;
  };
  struct  Freecell29429  {
  Freecell29429* next;
  NI zerofield;
  };
  struct  Tinstantiation294824  {
  Tsym294834* sym;
  Ttypeseq294836* concretetypes;
  NI compilesid;
  };
  struct TY294961 {
  NI Field0;
  Tsym294834* Field1;
  };
  struct  Tiipair301138  {
  NI key;
  NI val;
  };
  struct Keyvaluepair334060 {
  NI Field0;
  NI Field1;
  Tsym294834* Field2;
  };
  struct  Tidpair294846  {
  Tidobj201004* key;
  TNimObject* val;
  };
  struct  Trunk270026  {
  Trunk270026* next;
  NI key;
  TY29418 bits;
  };
  struct  Tcproc531021  {
  Tsym294834* prc;
  NIM_BOOL beforeretneeded;
  NIM_BOOL threadvaraccessed;
  Tlineinfo193336 lastlineinfo;
  Tnodeseq294796* nestedtrystmts;
  NI inexceptblock;
  TY193350* finallysafepoints;
  NI labels;
  TY531095* blocks;
  NI breakidx;
  Toption171009Set options;
  NI maxframelen;
  Tcgen531027* module;
  NI withinloop;
  NI splitdecls;
  NI gcframeid;
  Ropeobj180006* gcframetype;
  };
  struct  Tnodepair294858  {
  NI h;
  Tnode294802* key;
  NI val;
  };
  typedef Ropeobj180006* Tcprocsections531013[3];
  struct  Tblock531019  {
  NI id;
  Ropeobj180006* label;
  Tcprocsections531013 sections;
  NIM_BOOL isloop;
  NI16 nestedtrystmts;
  NI16 nestedexceptstmts;
  NI16 framelen;
  };
  struct Tsymseq294804 {
    TGenericSeq Sup;
    Tsym294834* data[SEQ_DECL_SIZE];
  };
  struct TY595041 {
    TGenericSeq Sup;
    Tmoduleinmemory595007 data[SEQ_DECL_SIZE];
  };
  struct TY531153 {
    TGenericSeq Sup;
    Tcgen531027* data[SEQ_DECL_SIZE];
  };
  struct TY334033 {
    TGenericSeq Sup;
    NI32 data[SEQ_DECL_SIZE];
  };
  struct Ttypeseq294836 {
    TGenericSeq Sup;
    Ttype294840* data[SEQ_DECL_SIZE];
  };
  struct TY294929 {
    TGenericSeq Sup;
    Tinstantiation294824* data[SEQ_DECL_SIZE];
  };
  struct Tnodeseq294796 {
    TGenericSeq Sup;
    Tnode294802* data[SEQ_DECL_SIZE];
  };
  struct TY294960 {
    TGenericSeq Sup;
    TY294961 data[SEQ_DECL_SIZE];
  };
  struct Tiipairseq301140 {
    TGenericSeq Sup;
    Tiipair301138 data[SEQ_DECL_SIZE];
  };
  struct Keyvaluepairseq334057 {
    TGenericSeq Sup;
    Keyvaluepair334060 data[SEQ_DECL_SIZE];
  };
  struct Tidpairseq294848 {
    TGenericSeq Sup;
    Tidpair294846 data[SEQ_DECL_SIZE];
  };
  struct Trunkseq270028 {
    TGenericSeq Sup;
    Trunk270026* data[SEQ_DECL_SIZE];
  };
  struct Tnodepairseq294860 {
    TGenericSeq Sup;
    Tnodepair294858 data[SEQ_DECL_SIZE];
  };
  struct TY193350 {
    TGenericSeq Sup;
    Ropeobj180006* data[SEQ_DECL_SIZE];
  };
  struct TY531095 {
    TGenericSeq Sup;
    Tblock531019 data[SEQ_DECL_SIZE];
  };
  N_NIMCALL(void, nimGCvisit)(void* d0, NI op0);
  N_NIMCALL(void, T3338220056_2)(void);
  N_NIMCALL(void, nimRegisterGlobalMarker)(Globalmarkerproc55802 markerproc0);
  static N_INLINE(void, nimGCunrefNoCycle)(void* p0);
  static N_INLINE(Cell47305*, usrtocell_51440_1689653243)(void* usr0);
  static N_INLINE(void, rtladdzct_52601_1689653243)(Cell47305* c0);
  N_NOINLINE(void, addzct_51417_1689653243)(Cellseq47321* s0, Cell47305* c0);
  N_NIMCALL(void*, newSeqRC1)(TNimType* typ0, NI len0);
  N_NIMCALL(void, T3338220056_10)(void* p, NI op);
  N_NIMCALL(void, T3338220056_11)(void);
  N_NIMCALL(void, T3338220056_12)(void);
  N_NIMCALL(void, initstrtable_298001_850551059)(Tstrtable294806* x0);
  N_NIMCALL(Tnode294802*, includemodule_595861_3338220056)(Tsym294834* s0, NI32 fileidx0);
  N_NIMCALL(Tnode294802*, parsefile_319029_4241778752)(NI32 fileidx0);
  N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq0, NI elemsize0, NI newlen0);
  N_NIMCALL(void, adddep_595114_3338220056)(Tsym294834* x0, NI32 dep0);
  N_NIMCALL(void, safeadd_595138_1689653243)(TY334033** x0, NI32 y0);
  N_NIMCALL(void, dohash_595102_3338220056)(NI32 fileidx0);
  N_NIMCALL(void, securehashfile_204348_2683236817)(NimStringDesc* filename0, Sha1digest203005 Result);
  N_NIMCALL(NimStringDesc*, tofullpath_194264_155036129)(NI32 fileidx0);
  N_NIMCALL(Tsym294834*, importmodule_595842_3338220056)(Tsym294834* s0, NI32 fileidx0);
  N_NIMCALL(Tsym294834*, compilemodule_595735_3338220056)(NI32 fileidx0, Tsymflag294184Set flags0);
  N_NIMCALL(Tsym294834*, getmodule_595066_3338220056)(NI32 fileidx0);
  N_NIMCALL(Tsym294834*, newmodule_595622_3338220056)(NI32 fileidx0);
  N_NIMCALL(void*, newObj)(TNimType* typ0, NI size0);
  N_NIMCALL(Tident201010*, getident_201441_791273810)(NimStringDesc* identifier0);
  N_NIMCALL(void, nossplitFile)(NimStringDesc* path0, TY129506* Result);
  static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0);
  N_NIMCALL(NIM_BOOL, isnimidentifier_287239_689113469)(NimStringDesc* s0);
  N_NIMCALL(void, rawmessage_196612_155036129)(Tmsgkind193002 msg0, NimStringDesc* arg0);
  N_NIMCALL(Tlineinfo193336, newlineinfo_194015_155036129)(NI32 fileinfoidx0, NI line0, NI col0);
  N_NIMCALL(NimStringDesc*, getpackagename_172001_2607990831)(NimStringDesc* path0);
  N_NIMCALL(Tsym294834*, strtableget_301045_2984716966)(Tstrtable294806 t0, Tident201010* name0);
  N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src0);
  N_NIMCALL(Tsym294834*, newsym_295684_850551059)(Tsymkind294435 symkind0, Tident201010* name0, Tsym294834* owner0, Tlineinfo193336 info0);
  N_NIMCALL(void, strtableadd_301040_2984716966)(Tstrtable294806* t0, Tsym294834* n0);
  N_NIMCALL(void, localerror_198085_155036129)(Tlineinfo193336 info0, NimStringDesc* arg0);
  static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0);
  static N_INLINE(void, copymem_7485_1689653243)(void* dest0, void* source0, NI size0);
  N_NIMCALL(NimStringDesc*, rawNewString)(NI space0);
  N_NIMCALL(NIM_BOOL, strtableincl_304401_2984716966)(Tstrtable294806* t0, Tsym294834* n0, NIM_BOOL onconflictkeepold0);
  N_NIMCALL(Trodreader334021*, handlesymbolfile_337133_1724185294)(Tsym294834* module0);
  N_NIMCALL(void, internalerror_198113_155036129)(NimStringDesc* errmsg0);
  static N_INLINE(NI, getid_293401_644355110)(void);
  N_NIMCALL(NIM_BOOL, processmodule_343490_2355241294)(Tsym294834* module0, Tllstream284204* stream0, Trodreader334021* rd0);
  N_NIMCALL(Tllstream284204*, llstreamopen_284230_597494479)(FILE* f0);
  N_NIMCALL(Tneedrecompile595003, checkdepmem_595377_3338220056)(NI32 fileidx0);
  N_NIMCALL(NIM_BOOL, hashchanged_595078_3338220056)(NI32 fileidx0);
  N_NIMCALL(NimStringDesc*, HEX24_198185_1689653243)(TY205018 x0);
  N_NOINLINE(void, chckNil)(void* p0);
  N_NIMCALL(NIM_BOOL, HEX3DHEX3D_204419_2683236817)(Sha1digest203005 a0, Sha1digest203005 b0);
  N_NIMCALL(void, resetmodule_595258_3338220056)(NI32 fileidx0);
  static N_INLINE(void, asgnRef)(void** dest0, void* src0);
  static N_INLINE(void, incref_53419_1689653243)(Cell47305* c0);
  static N_INLINE(void, decref_53001_1689653243)(Cell47305* c0);
  N_NIMCALL(NIM_BOOL, HEX3DHEX3D_595149_1689653243)(TY334033* x0, TY334033* y0);
  N_NIMCALL(NI32, fileinfoidx_194008_155036129)(NimStringDesc* filename0);
  N_NIMCALL(NimStringDesc*, HEX2F_129265_2125978480)(NimStringDesc* head0, NimStringDesc* tail0);
  N_NIMCALL(void, resetpackagecache_171802_2607990831)(void);
  N_NIMCALL(void, resetsystypes_340219_3937434831)(void);
  N_NIMCALL(void, wantmainmodule_595909_3338220056)(void);
  N_NIMCALL(void, fatal_198066_155036129)(Tlineinfo193336 info0, Tmsgkind193002 msg0, NimStringDesc* arg0);
  N_NIMCALL(NimStringDesc*, nosaddFileExt)(NimStringDesc* filename0, NimStringDesc* ext0);
  N_NIMCALL(void, compilesystemmodule_595894_3338220056)(void);
  N_NIMCALL(Tsym294834*, makemodule_595922_3338220056)(NimStringDesc* filename0);
  STRING_LITERAL(T3338220056_13, "unknown", 7);
  STRING_LITERAL(T3338220056_14, "module names need to be unique per Nimble package; module clash"
  "es with ", 71);
  STRING_LITERAL(T3338220056_15, "handleSymbolFile should have set the module\'s ID", 48);
  STRING_LITERAL(T3338220056_17, "compiler/modules.nim", 20);
  NIM_CONST TY205018 T3338220056_16 = {((NimStringDesc*) &T3338220056_17),
  ((NI) 42)}
  ;
  STRING_LITERAL(T3338220056_18, "system.nim", 10);
  STRING_LITERAL(T3338220056_19, "", 0);
  STRING_LITERAL(T3338220056_20, "nim", 3);
  STRING_LITERAL(T3338220056_21, "stdin", 5);
  Tsymseq294804* gcompiledmodules_595040_3338220056;
  extern TNimType NTI294804; /* TSymSeq */
  extern Gcheap49818 gch_49858_1689653243;
  TY595041* gmemcachedata_595058_3338220056;
  TNimType NTI595007; /* TModuleInMemory */
  extern TNimType NTI124; /* float */
  extern TNimType NTI203005; /* Sha1Digest */
  extern TNimType NTI334033; /* seq[int32] */
  TNimType NTI595003; /* TNeedRecompile */
  TNimType NTI595005; /* THashStatus */
  TNimType NTI595041; /* seq[TModuleInMemory] */
  NIM_BOOL gfuzzygraphchecking_595059_3338220056;
  Tstrtable294806 packagesyms_595060_3338220056;
  extern TNimType NTI294806; /* TStrTable */
  extern TY343074 gincludefile_343078_2355241294;
  extern Tglobaloption171013Set gglobaloptions_171130_2607990831;
  extern TY343069 gimportmodule_343073_2355241294;
  extern TNimType NTI294800; /* PSym */
  extern TNimType NTI294834; /* TSym */
  extern NI gmainpackageid_295062_850551059;
  extern Tcommands171076 gcmd_171132_2607990831;
  extern NI gfrontendid_293004_644355110;
  extern NIM_BOOL gprojectisstdin_171212_2607990831;
  extern NF glastcmdtime_171143_2607990831;
  extern TY531153* gmodules_531170_3723162438;
  extern Tnotekind193330Set gnotes_194071_155036129;
  extern Tnotekind193330Set gmainpackagenotes_194076_155036129;
  extern Tnotekind193330Set Foreignpackagenotes_193423_155036129;
  extern Tsym294834* systemmodule_340004_3937434831;
  extern NI32 systemfileidx_193630_155036129;
  extern NimStringDesc* libpath_171208_2607990831;
  extern NimStringDesc* gprojectfull_171211_2607990831;
  extern Tlineinfo193336 gcmdlineinfo_194037_155036129;
  extern NI32 gprojectmainidx_171213_2607990831;
  N_NIMCALL(void, T3338220056_2)(void) {
  	nimGCvisit((void*)gcompiledmodules_595040_3338220056, 0);
  }
  
  static N_INLINE(Cell47305*, usrtocell_51440_1689653243)(void* usr0) {
  	Cell47305* result0;
  	result0 = (Cell47305*)0;
  	result0 = ((Cell47305*) ((NI)((NU32)(((NI) (usr0))) - (NU32)(((NI)sizeof(Cell47305))))));
  	return result0;
  }
  
  static N_INLINE(void, rtladdzct_52601_1689653243)(Cell47305* c0) {
  	addzct_51417_1689653243((&gch_49858_1689653243.zct), c0);
  }
  
  static N_INLINE(void, nimGCunrefNoCycle)(void* p0) {
  	Cell47305* c0;
  	c0 = usrtocell_51440_1689653243(p0);
  	{
  		(*c0).refcount -= ((NI) 8);
  		if (!((NU32)((*c0).refcount) < (NU32)(((NI) 8)))) goto LA3;
  		rtladdzct_52601_1689653243(c0);
  	}
  	LA3: ;
  }
  N_NIMCALL(void, T3338220056_10)(void* p, NI op) {
  	TY595041* a;
  	NI LOC1;
  	NI LOC2;
  	a = (TY595041*)p;
  	LOC1 = (NI)0;
  	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
  	LOC2 = (NI)0;
  	for (LOC2 = 0; LOC2 < 20; LOC2++) {
  	}
  	nimGCvisit((void*)a->data[LOC1].deps, op);
  	}
  }
  N_NIMCALL(void, T3338220056_11)(void) {
  	nimGCvisit((void*)gmemcachedata_595058_3338220056, 0);
  }
  N_NIMCALL(void, T3338220056_12)(void) {
  	nimGCvisit((void*)packagesyms_595060_3338220056.data, 0);
  }
  
  N_NIMCALL(void, adddep_595114_3338220056)(Tsym294834* x0, NI32 dep0) {
  	{
  		if (!((gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0) <= ((NI) (dep0)))) goto LA3;
  		gmemcachedata_595058_3338220056 = (TY595041*) setLengthSeq(&(gmemcachedata_595058_3338220056)->Sup, sizeof(Tmoduleinmemory595007), ((NI) ((NI32)(dep0 + ((NI32) 1)))));
  	}
  	LA3: ;
  	safeadd_595138_1689653243((&gmemcachedata_595058_3338220056->data[(*x0).position].deps), dep0);
  }
  
  N_NIMCALL(void, dohash_595102_3338220056)(NI32 fileidx0) {
  	{
  		NimStringDesc* LOC5;
  		if (!(gmemcachedata_595058_3338220056->data[fileidx0].hashstatus == ((Thashstatus595005) 0))) goto LA3;
  		LOC5 = (NimStringDesc*)0;
  		LOC5 = tofullpath_194264_155036129(fileidx0);
  		securehashfile_204348_2683236817(LOC5, gmemcachedata_595058_3338220056->data[fileidx0].hash);
  	}
  	LA3: ;
  }
  
  N_NIMCALL(Tnode294802*, includemodule_595861_3338220056)(Tsym294834* s0, NI32 fileidx0) {
  	Tnode294802* result0;
  	result0 = (Tnode294802*)0;
  	result0 = parsefile_319029_4241778752(fileidx0);
  	{
  		if (!((gglobaloptions_171130_2607990831 &((NU64)1<<((NU)(((Tglobaloption171013) 15))&63U)))!=0)) goto LA3;
  		{
  			if (!((gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0) <= ((NI) (fileidx0)))) goto LA7;
  			gmemcachedata_595058_3338220056 = (TY595041*) setLengthSeq(&(gmemcachedata_595058_3338220056)->Sup, sizeof(Tmoduleinmemory595007), ((NI) ((NI32)(fileidx0 + ((NI32) 1)))));
  		}
  		LA7: ;
  		adddep_595114_3338220056(s0, fileidx0);
  		dohash_595102_3338220056(fileidx0);
  	}
  	LA3: ;
  	return result0;
  }
  
  N_NIMCALL(Tsym294834*, getmodule_595066_3338220056)(NI32 fileidx0) {
  	Tsym294834* result0;
  	result0 = (Tsym294834*)0;
  	{
  		NIM_BOOL LOC3;
  		LOC3 = (NIM_BOOL)0;
  		LOC3 = (((NI32) 0) <= fileidx0);
  		if (!(LOC3)) goto LA4;
  		LOC3 = (((NI) (fileidx0)) < (gcompiledmodules_595040_3338220056 ? gcompiledmodules_595040_3338220056->Sup.len : 0));
  		LA4: ;
  		if (!LOC3) goto LA5;
  		result0 = gcompiledmodules_595040_3338220056->data[fileidx0];
  	}
  	LA5: ;
  	return result0;
  }
  
  static N_INLINE(void, asgnRefNoCycle)(void** dest0, void* src0) {
  	{
  		Cell47305* c0;
  		if (!!((src0 == NIM_NIL))) goto LA3;
  		c0 = usrtocell_51440_1689653243(src0);
  		(*c0).refcount += ((NI) 8);
  	}
  	LA3: ;
  	{
  		Cell47305* c0;
  		if (!!(((*dest0) == NIM_NIL))) goto LA7;
  		c0 = usrtocell_51440_1689653243((*dest0));
  		{
  			(*c0).refcount -= ((NI) 8);
  			if (!((NU32)((*c0).refcount) < (NU32)(((NI) 8)))) goto LA11;
  			rtladdzct_52601_1689653243(c0);
  		}
  		LA11: ;
  	}
  	LA7: ;
  	(*dest0) = src0;
  }
  
  static N_INLINE(void, copymem_7485_1689653243)(void* dest0, void* source0, NI size0) {
  	void* LOC1;
  	LOC1 = (void*)0;
  	LOC1 = memcpy(dest0, source0, ((size_t) (size0)));
  }
  
  static N_INLINE(void, appendString)(NimStringDesc* dest0, NimStringDesc* src0) {
  	copymem_7485_1689653243(((void*) ((&(*dest0).data[((*dest0).Sup.len)- 0]))), ((void*) ((*src0).data)), ((NI) ((NI)((*src0).Sup.len + ((NI) 1)))));
  	(*dest0).Sup.len += (*src0).Sup.len;
  }
  
  N_NIMCALL(Tsym294834*, newmodule_595622_3338220056)(NI32 fileidx0) {
  	Tsym294834* result0;
  	NimStringDesc* filename0;
  	TY129506 LOC1;
  	Tident201010* pack0;
  	NimStringDesc* LOC7;
  	Tsym294834* packsym0;
  	Tsym294834* existing0;
  	NIM_BOOL LOC34;
  	result0 = (Tsym294834*)0;
  	result0 = (Tsym294834*) newObj((&NTI294800), sizeof(Tsym294834));
  	(*result0).Sup.Sup.m_type = (&NTI294834);
  	(*result0).Sup.id = ((NI) -1);
  	(*result0).kind = ((Tsymkind294435) 6);
  	filename0 = tofullpath_194264_155036129(fileidx0);
  	memset((void*)(&LOC1), 0, sizeof(LOC1));
  	nossplitFile(filename0, (&LOC1));
  	asgnRefNoCycle((void**) (&(*result0).name), getident_201441_791273810(LOC1.Field1));
  	{
  		NIM_BOOL LOC4;
  		LOC4 = (NIM_BOOL)0;
  		LOC4 = isnimidentifier_287239_689113469((*(*result0).name).s);
  		if (!!(LOC4)) goto LA5;
  		rawmessage_196612_155036129(((Tmsgkind193002) 22), (*(*result0).name).s);
  	}
  	LA5: ;
  	(*result0).info = newlineinfo_194015_155036129(fileidx0, ((NI) 1), ((NI) 1));
  	LOC7 = (NimStringDesc*)0;
  	LOC7 = getpackagename_172001_2607990831(filename0);
  	pack0 = getident_201441_791273810(LOC7);
  	packsym0 = strtableget_301045_2984716966(packagesyms_595060_3338220056, pack0);
  	{
  		NimStringDesc* pck0;
  		NimStringDesc* pck20;
  		Tident201010* LOC17;
  		if (!(packsym0 == NIM_NIL)) goto LA10;
  		pck0 = getpackagename_172001_2607990831(filename0);
  		{
  			if (!(((NI) 0) < (pck0 ? pck0->Sup.len : 0))) goto LA14;
  			pck20 = pck0;
  		}
  		goto LA12;
  		LA14: ;
  		{
  			pck20 = copyString(((NimStringDesc*) &T3338220056_13));
  		}
  		LA12: ;
  		LOC17 = (Tident201010*)0;
  		LOC17 = getident_201441_791273810(pck20);
  		packsym0 = newsym_295684_850551059(((Tsymkind294435) 23), LOC17, NIM_NIL, (*result0).info);
  		initstrtable_298001_850551059((&(*packsym0).kindU.S3.tab));
  		strtableadd_301040_2984716966((&packagesyms_595060_3338220056), packsym0);
  	}
  	LA10: ;
  	asgnRefNoCycle((void**) (&(*result0).owner), packsym0);
  	(*result0).position = ((NI) (fileidx0));
  	{
  		if (!((gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0) <= ((NI) (fileidx0)))) goto LA20;
  		gmemcachedata_595058_3338220056 = (TY595041*) setLengthSeq(&(gmemcachedata_595058_3338220056)->Sup, sizeof(Tmoduleinmemory595007), ((NI) ((NI32)(fileidx0 + ((NI32) 1)))));
  	}
  	LA20: ;
  	{
  		if (!((gcompiledmodules_595040_3338220056 ? gcompiledmodules_595040_3338220056->Sup.len : 0) <= ((NI) (fileidx0)))) goto LA24;
  		gcompiledmodules_595040_3338220056 = (Tsymseq294804*) setLengthSeq(&(gcompiledmodules_595040_3338220056)->Sup, sizeof(Tsym294834*), ((NI) ((NI32)(fileidx0 + ((NI32) 1)))));
  	}
  	LA24: ;
  	asgnRefNoCycle((void**) (&gcompiledmodules_595040_3338220056->data[(*result0).position]), result0);
  	(*result0).flags |= ((NU32)1)<<((((Tsymflag294184) 0))%(sizeof(NU32)*8));
  	initstrtable_298001_850551059((&(*result0).kindU.S3.tab));
  	strtableadd_301040_2984716966((&(*result0).kindU.S3.tab), result0);
  	existing0 = strtableget_301045_2984716966((*packsym0).kindU.S3.tab, (*result0).name);
  	{
  		NIM_BOOL LOC28;
  		NimStringDesc* LOC32;
  		NimStringDesc* LOC33;
  		LOC28 = (NIM_BOOL)0;
  		LOC28 = !((existing0 == NIM_NIL));
  		if (!(LOC28)) goto LA29;
  		LOC28 = !(((*existing0).info.fileindex == (*result0).info.fileindex));
  		LA29: ;
  		if (!LOC28) goto LA30;
  		LOC32 = (NimStringDesc*)0;
  		LOC33 = (NimStringDesc*)0;
  		LOC33 = tofullpath_194264_155036129((*existing0).info.fileindex);
  		LOC32 = rawNewString(LOC33->Sup.len + 71);
  appendString(LOC32, ((NimStringDesc*) &T3338220056_14));
  appendString(LOC32, LOC33);
  		localerror_198085_155036129((*result0).info, LOC32);
  	}
  	LA30: ;
  	LOC34 = (NIM_BOOL)0;
  	LOC34 = strtableincl_304401_2984716966((&(*packsym0).kindU.S3.tab), result0, NIM_FALSE);
  	return result0;
  }
  
  static N_INLINE(NI, getid_293401_644355110)(void) {
  	NI result0;
  	result0 = (NI)0;
  	result0 = gfrontendid_293004_644355110;
  	gfrontendid_293004_644355110 += ((NI) 1);
  	return result0;
  }
  
  N_NIMCALL(NIM_BOOL, hashchanged_595078_3338220056)(NI32 fileidx0) {
  	NIM_BOOL result0;
  	result0 = (NIM_BOOL)0;
  	{
  		NIM_BOOL LOC3;
  		NimStringDesc* LOC7;
  		LOC3 = (NIM_BOOL)0;
  		LOC3 = (((NI32) 0) <= fileidx0);
  		if (!(LOC3)) goto LA4;
  		LOC3 = (((NI) (fileidx0)) < (gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0));
  		LA4: ;
  		if (!!(LOC3)) goto LA5;
  		LOC7 = (NimStringDesc*)0;
  		LOC7 = HEX24_198185_1689653243(T3338220056_16);
  		internalerror_198113_155036129(LOC7);
  	}
  	LA5: ;
  	switch (gmemcachedata_595058_3338220056->data[fileidx0].hashstatus) {
  	case ((Thashstatus595005) 2):
  	{
  		result0 = NIM_TRUE;
  	}
  	break;
  	case ((Thashstatus595005) 3):
  	{
  		result0 = NIM_FALSE;
  	}
  	break;
  	case ((Thashstatus595005) 1):
  	{
  		Sha1digest203005 newhash0;
  		NimStringDesc* LOC11;
  		NIM_BOOL LOC12;
  		memset((void*)newhash0, 0, sizeof(newhash0));
  		LOC11 = (NimStringDesc*)0;
  		LOC11 = tofullpath_194264_155036129(fileidx0);
  		chckNil((void*)newhash0);
  		memset((void*)newhash0, 0, sizeof(newhash0));
  		securehashfile_204348_2683236817(LOC11, newhash0);
  		LOC12 = (NIM_BOOL)0;
  		LOC12 = HEX3DHEX3D_204419_2683236817(newhash0, gmemcachedata_595058_3338220056->data[fileidx0].hash);
  		result0 = !(LOC12);
  		memcpy((void*)gmemcachedata_595058_3338220056->data[fileidx0].hash, (NIM_CONST void*)newhash0, sizeof(Sha1digest203005));
  		{
  			if (!result0) goto LA15;
  			gmemcachedata_595058_3338220056->data[fileidx0].hashstatus = ((Thashstatus595005) 2);
  		}
  		goto LA13;
  		LA15: ;
  		{
  			gmemcachedata_595058_3338220056->data[fileidx0].hashstatus = ((Thashstatus595005) 3);
  		}
  		LA13: ;
  	}
  	break;
  	case ((Thashstatus595005) 0):
  	{
  		NimStringDesc* LOC19;
  		LOC19 = (NimStringDesc*)0;
  		LOC19 = tofullpath_194264_155036129(fileidx0);
  		securehashfile_204348_2683236817(LOC19, gmemcachedata_595058_3338220056->data[fileidx0].hash);
  		result0 = NIM_TRUE;
  		{
  			if (!result0) goto LA22;
  			gmemcachedata_595058_3338220056->data[fileidx0].hashstatus = ((Thashstatus595005) 2);
  		}
  		goto LA20;
  		LA22: ;
  		{
  			gmemcachedata_595058_3338220056->data[fileidx0].hashstatus = ((Thashstatus595005) 3);
  		}
  		LA20: ;
  	}
  	break;
  	}
  	return result0;
  }
  
  static N_INLINE(void, incref_53419_1689653243)(Cell47305* c0) {
  	(*c0).refcount = (NI)((NU32)((*c0).refcount) + (NU32)(((NI) 8)));
  }
  
  static N_INLINE(void, decref_53001_1689653243)(Cell47305* c0) {
  	{
  		(*c0).refcount -= ((NI) 8);
  		if (!((NU32)((*c0).refcount) < (NU32)(((NI) 8)))) goto LA3;
  		rtladdzct_52601_1689653243(c0);
  	}
  	LA3: ;
  }
  
  static N_INLINE(void, asgnRef)(void** dest0, void* src0) {
  	{
  		Cell47305* LOC5;
  		if (!!((src0 == NIM_NIL))) goto LA3;
  		LOC5 = (Cell47305*)0;
  		LOC5 = usrtocell_51440_1689653243(src0);
  		incref_53419_1689653243(LOC5);
  	}
  	LA3: ;
  	{
  		Cell47305* LOC10;
  		if (!!(((*dest0) == NIM_NIL))) goto LA8;
  		LOC10 = (Cell47305*)0;
  		LOC10 = usrtocell_51440_1689653243((*dest0));
  		decref_53001_1689653243(LOC10);
  	}
  	LA8: ;
  	(*dest0) = src0;
  }
  
  N_NIMCALL(void, resetmodule_595258_3338220056)(NI32 fileidx0) {
  	{
  		if (!((NU64)(((NI64) (fileidx0))) < (NU64)(((NI64) ((gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0)))))) goto LA3;
  		gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile = ((Tneedrecompile595003) 2);
  	}
  	LA3: ;
  	{
  		if (!((NU64)(((NI64) (fileidx0))) < (NU64)(((NI64) ((gcompiledmodules_595040_3338220056 ? gcompiledmodules_595040_3338220056->Sup.len : 0)))))) goto LA7;
  		asgnRefNoCycle((void**) (&gcompiledmodules_595040_3338220056->data[fileidx0]), NIM_NIL);
  	}
  	LA7: ;
  	{
  		if (!((NU64)(((NI64) (fileidx0))) < (NU64)(((NI64) ((gmodules_531170_3723162438 ? gmodules_531170_3723162438->Sup.len : 0)))))) goto LA11;
  		asgnRef((void**) (&gmodules_531170_3723162438->data[fileidx0]), NIM_NIL);
  	}
  	LA11: ;
  }
  
  N_NIMCALL(Tneedrecompile595003, checkdepmem_595377_3338220056)(NI32 fileidx0) {
  	Tneedrecompile595003 result0;
  {	result0 = (Tneedrecompile595003)0;
  	{
  		if (!gfuzzygraphchecking_595059_3338220056) goto LA3;
  		{
  			if (!!((gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile == ((Tneedrecompile595003) 0)))) goto LA7;
  			result0 = gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile;
  			goto BeforeRet;
  		}
  		LA7: ;
  	}
  	goto LA1;
  	LA3: ;
  	{
  		{
  			if (!(gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile == ((Tneedrecompile595003) 3))) goto LA12;
  			result0 = ((Tneedrecompile595003) 1);
  			goto BeforeRet;
  		}
  		LA12: ;
  	}
  	LA1: ;
  	{
  		NIM_BOOL LOC16;
  		LOC16 = (NIM_BOOL)0;
  		LOC16 = ((gglobaloptions_171130_2607990831 &((NU64)1<<((NU)(((Tglobaloption171013) 1))&63U)))!=0);
  		if (LOC16) goto LA17;
  		LOC16 = hashchanged_595078_3338220056(fileidx0);
  		LA17: ;
  		if (!LOC16) goto LA18;
  		resetmodule_595258_3338220056(fileidx0);
  		result0 = ((Tneedrecompile595003) 2);
  		goto BeforeRet;
  	}
  	LA18: ;
  	{
  		NIM_BOOL LOC22;
  		LOC22 = (NIM_BOOL)0;
  		LOC22 = HEX3DHEX3D_595149_1689653243(gmemcachedata_595058_3338220056->data[fileidx0].deps, NIM_NIL);
  		if (!!(LOC22)) goto LA23;
  		gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile = ((Tneedrecompile595003) 3);
  		{
  			NI32 dep_595602_3338220056;
  			TY334033* HEX3Atmp_595616_3338220056;
  			NI i_595619_3338220056;
  			NI L_595621_3338220056;
  			dep_595602_3338220056 = (NI32)0;
  			HEX3Atmp_595616_3338220056 = (TY334033*)0;
  			HEX3Atmp_595616_3338220056 = gmemcachedata_595058_3338220056->data[fileidx0].deps;
  			i_595619_3338220056 = ((NI) 0);
  			L_595621_3338220056 = (HEX3Atmp_595616_3338220056 ? HEX3Atmp_595616_3338220056->Sup.len : 0);
  			{
  				while (1) {
  					Tneedrecompile595003 d0;
  					if (!(i_595619_3338220056 < L_595621_3338220056)) goto LA27;
  					dep_595602_3338220056 = HEX3Atmp_595616_3338220056->data[i_595619_3338220056];
  					d0 = checkdepmem_595377_3338220056(dep_595602_3338220056);
  					{
  						if (!((20 &(1U<<((NU)(d0)&7U)))!=0)) goto LA30;
  						resetmodule_595258_3338220056(fileidx0);
  						result0 = ((Tneedrecompile595003) 2);
  						goto BeforeRet;
  					}
  					LA30: ;
  					i_595619_3338220056 += ((NI) 1);
  				} LA27: ;
  			}
  		}
  	}
  	LA23: ;
  	gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile = ((Tneedrecompile595003) 1);
  	result0 = ((Tneedrecompile595003) 1);
  	goto BeforeRet;
  	}BeforeRet: ;
  	return result0;
  }
  
  N_NIMCALL(Tsym294834*, compilemodule_595735_3338220056)(NI32 fileidx0, Tsymflag294184Set flags0) {
  	Tsym294834* result0;
  {	result0 = (Tsym294834*)0;
  	result0 = getmodule_595066_3338220056(fileidx0);
  	{
  		Trodreader334021* rd0;
  		NIM_BOOL validfile0;
  		Tllstream284204* LOC22;
  		if (!(result0 == NIM_NIL)) goto LA3;
  		{
  			if (!((gmemcachedata_595058_3338220056 ? gmemcachedata_595058_3338220056->Sup.len : 0) <= ((NI) (fileidx0)))) goto LA7;
  			gmemcachedata_595058_3338220056 = (TY595041*) setLengthSeq(&(gmemcachedata_595058_3338220056)->Sup, sizeof(Tmoduleinmemory595007), ((NI) ((NI32)(fileidx0 + ((NI32) 1)))));
  		}
  		LA7: ;
  		gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile = ((Tneedrecompile595003) 3);
  		result0 = newmodule_595622_3338220056(fileidx0);
  		rd0 = (Trodreader334021*)0;
  		(*result0).flags = ((*result0).flags | flags0);
  		{
  			if (!(((*result0).flags &(1U<<((NU)(((Tsymflag294184) 12))&31U)))!=0)) goto LA11;
  			gmainpackageid_295062_850551059 = (*(*result0).owner).Sup.id;
  		}
  		LA11: ;
  		{
  			if (!((36870 &(1U<<((NU)(gcmd_171132_2607990831)&31U)))!=0)) goto LA15;
  			rd0 = handlesymbolfile_337133_1724185294(result0);
  			{
  				if (!((*result0).Sup.id < ((NI) 0))) goto LA19;
  				internalerror_198113_155036129(((NimStringDesc*) &T3338220056_15));
  				goto BeforeRet;
  			}
  			LA19: ;
  		}
  		goto LA13;
  		LA15: ;
  		{
  			(*result0).Sup.id = getid_293401_644355110();
  		}
  		LA13: ;
  		LOC22 = (Tllstream284204*)0;
  		{
  			NIM_BOOL LOC25;
  			LOC25 = (NIM_BOOL)0;
  			LOC25 = ((flags0 &(1U<<((NU)(((Tsymflag294184) 12))&31U)))!=0);
  			if (!(LOC25)) goto LA26;
  			LOC25 = gprojectisstdin_171212_2607990831;
  			LA26: ;
  			if (!LOC25) goto LA27;
  			LOC22 = llstreamopen_284230_597494479(stdin);
  		}
  		goto LA23;
  		LA27: ;
  		{
  			LOC22 = NIM_NIL;
  		}
  		LA23: ;
  		validfile0 = processmodule_343490_2355241294(result0, LOC22, rd0);
  		{
  			if (!((gglobaloptions_171130_2607990831 &((NU64)1<<((NU)(((Tglobaloption171013) 15))&63U)))!=0)) goto LA32;
  			gmemcachedata_595058_3338220056->data[fileidx0].compiledat = glastcmdtime_171143_2607990831;
  			gmemcachedata_595058_3338220056->data[fileidx0].needsrecompile = ((Tneedrecompile595003) 4);
  			{
  				if (!validfile0) goto LA36;
  				dohash_595102_3338220056(fileidx0);
  			}
  			LA36: ;
  		}
  		LA32: ;
  	}
  	goto LA1;
  	LA3: ;
  	{
  		{
  			Tneedrecompile595003 LOC41;
  			LOC41 = (Tneedrecompile595003)0;
  			LOC41 = checkdepmem_595377_3338220056(fileidx0);
  			if (!(LOC41 == ((Tneedrecompile595003) 2))) goto LA42;
  			result0 = compilemodule_595735_3338220056(fileidx0, flags0);
  		}
  		goto LA39;
  		LA42: ;
  		{
  			result0 = gcompiledmodules_595040_3338220056->data[fileidx0];
  		}
  		LA39: ;
  	}
  	LA1: ;
  	}BeforeRet: ;
  	return result0;
  }
  
  N_NIMCALL(Tsym294834*, importmodule_595842_3338220056)(Tsym294834* s0, NI32 fileidx0) {
  	Tsym294834* result0;
  	result0 = (Tsym294834*)0;
  	result0 = compilemodule_595735_3338220056(fileidx0, 0);
  	{
  		if (!((gglobaloptions_171130_2607990831 &((NU64)1<<((NU)(((Tglobaloption171013) 15))&63U)))!=0)) goto LA3;
  		adddep_595114_3338220056(s0, fileidx0);
  	}
  	LA3: ;
  	{
  		if (!((*(*s0).owner).Sup.id == gmainpackageid_295062_850551059)) goto LA7;
  		gnotes_194071_155036129 = gmainpackagenotes_194076_155036129;
  	}
  	goto LA5;
  	LA7: ;
  	{
  		gnotes_194071_155036129 = Foreignpackagenotes_193423_155036129;
  	}
  	LA5: ;
  	return result0;
  }
  
  N_NIMCALL(Tsym294834*, makemodule_595922_3338220056)(NimStringDesc* filename0) {
  	Tsym294834* result0;
  	NI32 LOC1;
  	result0 = (Tsym294834*)0;
  	LOC1 = (NI32)0;
  	LOC1 = fileinfoidx_194008_155036129(filename0);
  	result0 = newmodule_595622_3338220056(LOC1);
  	(*result0).Sup.id = getid_293401_644355110();
  	return result0;
  }
  
  N_NIMCALL(void, compilesystemmodule_595894_3338220056)(void) {
  	{
  		NimStringDesc* LOC5;
  		Tsym294834* LOC6;
  		if (!(systemmodule_340004_3937434831 == NIM_NIL)) goto LA3;
  		LOC5 = (NimStringDesc*)0;
  		LOC5 = HEX2F_129265_2125978480(libpath_171208_2607990831, ((NimStringDesc*) &T3338220056_18));
  		systemfileidx_193630_155036129 = fileinfoidx_194008_155036129(LOC5);
  		LOC6 = (Tsym294834*)0;
  		LOC6 = compilemodule_595735_3338220056(systemfileidx_193630_155036129, 8192);
  	}
  	LA3: ;
  }
  
  N_NIMCALL(void, resetallmoduleshard_595354_3338220056)(void) {
  	resetpackagecache_171802_2607990831();
  	gcompiledmodules_595040_3338220056 = (Tsymseq294804*) setLengthSeq(&(gcompiledmodules_595040_3338220056)->Sup, sizeof(Tsym294834*), ((NI) 0));
  	gmemcachedata_595058_3338220056 = (TY595041*) setLengthSeq(&(gmemcachedata_595058_3338220056)->Sup, sizeof(Tmoduleinmemory595007), ((NI) 0));
  	resetsystypes_340219_3937434831();
  	initstrtable_298001_850551059((&packagesyms_595060_3338220056));
  }
  
  N_NIMCALL(void, wantmainmodule_595909_3338220056)(void) {
  	NimStringDesc* LOC5;
  	{
  		if (!((gprojectfull_171211_2607990831 ? gprojectfull_171211_2607990831->Sup.len : 0) == ((NI) 0))) goto LA3;
  		fatal_198066_155036129(gcmdlineinfo_194037_155036129, ((Tmsgkind193002) 191), ((NimStringDesc*) &T3338220056_19));
  	}
  	LA3: ;
  	LOC5 = (NimStringDesc*)0;
  	LOC5 = nosaddFileExt(gprojectfull_171211_2607990831, ((NimStringDesc*) &T3338220056_20));
  	gprojectmainidx_171213_2607990831 = fileinfoidx_194008_155036129(LOC5);
  }
  
  N_NIMCALL(void, compileproject_595915_3338220056)(NI32 projectfileidx0) {
  	NI32 systemfileidx0;
  	NimStringDesc* LOC1;
  	NI32 projectfile0;
  	wantmainmodule_595909_3338220056();
  	LOC1 = (NimStringDesc*)0;
  	LOC1 = HEX2F_129265_2125978480(libpath_171208_2607990831, ((NimStringDesc*) &T3338220056_18));
  	systemfileidx0 = fileinfoidx_194008_155036129(LOC1);
  	{
  		if (!(projectfileidx0 < ((NI32) 0))) goto LA4;
  		projectfile0 = gprojectmainidx_171213_2607990831;
  	}
  	goto LA2;
  	LA4: ;
  	{
  		projectfile0 = projectfileidx0;
  	}
  	LA2: ;
  	{
  		Tsym294834* LOC11;
  		if (!(projectfile0 == systemfileidx0)) goto LA9;
  		LOC11 = (Tsym294834*)0;
  		LOC11 = compilemodule_595735_3338220056(projectfile0, 12288);
  	}
  	goto LA7;
  	LA9: ;
  	{
  		Tsym294834* LOC13;
  		compilesystemmodule_595894_3338220056();
  		LOC13 = (Tsym294834*)0;
  		LOC13 = compilemodule_595735_3338220056(projectfile0, 4096);
  	}
  	LA7: ;
  }
  
  N_NIMCALL(Tsym294834*, makestdinmodule_595927_3338220056)(void) {
  	Tsym294834* result0;
  	result0 = (Tsym294834*)0;
  	result0 = makemodule_595922_3338220056(((NimStringDesc*) &T3338220056_21));
  	return result0;
  }
  
  N_NIMCALL(void, resetallmodules_595320_3338220056)(void) {
  	{
  		NI i_595331_3338220056;
  		NI HEX3Atmp_595347_3338220056;
  		NI res_595350_3338220056;
  		i_595331_3338220056 = (NI)0;
  		HEX3Atmp_595347_3338220056 = (NI)0;
  		HEX3Atmp_595347_3338220056 = (gcompiledmodules_595040_3338220056 ? (gcompiledmodules_595040_3338220056->Sup.len-1) : -1);
  		res_595350_3338220056 = ((NI) 0);
  		{
  			while (1) {
  				if (!(res_595350_3338220056 <= HEX3Atmp_595347_3338220056)) goto LA3;
  				i_595331_3338220056 = res_595350_3338220056;
  				{
  					if (!!((gcompiledmodules_595040_3338220056->data[i_595331_3338220056] == NIM_NIL))) goto LA6;
  					resetmodule_595258_3338220056(((NI32) (i_595331_3338220056)));
  				}
  				LA6: ;
  				res_595350_3338220056 += ((NI) 1);
  			} LA3: ;
  		}
  	}
  	resetpackagecache_171802_2607990831();
  	initstrtable_298001_850551059((&packagesyms_595060_3338220056));
  }
  NIM_EXTERNC N_NOINLINE(void, compiler_modulesInit000)(void) {
  nimRegisterGlobalMarker(T3338220056_2);
  nimRegisterGlobalMarker(T3338220056_11);
  nimRegisterGlobalMarker(T3338220056_12);
  	if (gcompiledmodules_595040_3338220056) nimGCunrefNoCycle(gcompiledmodules_595040_3338220056);
  	gcompiledmodules_595040_3338220056 = (Tsymseq294804*) newSeqRC1((&NTI294804), 0);
  	if (gmemcachedata_595058_3338220056) nimGCunrefNoCycle(gmemcachedata_595058_3338220056);
  	gmemcachedata_595058_3338220056 = (TY595041*) newSeqRC1((&NTI595041), 0);
  	initstrtable_298001_850551059((&packagesyms_595060_3338220056));
  	gincludefile_343078_2355241294 = includemodule_595861_3338220056;
  	gimportmodule_343073_2355241294 = importmodule_595842_3338220056;
  }
  
  NIM_EXTERNC N_NOINLINE(void, compiler_modulesDatInit000)(void) {
  static TNimNode* T3338220056_3[5];
  static TNimNode* T3338220056_4[5];
  NI T3338220056_6;
  static char* NIM_CONST T3338220056_5[5] = {
  "Maybe", 
  "No", 
  "Yes", 
  "Probing", 
  "Recompiled"};
  static TNimNode* T3338220056_7[4];
  NI T3338220056_9;
  static char* NIM_CONST T3338220056_8[4] = {
  "hashNotTaken", 
  "hashCached", 
  "hashHasChanged", 
  "hashNotChanged"};
  static TNimNode T3338220056_0[17];
  NTI595007.size = sizeof(Tmoduleinmemory595007);
  NTI595007.kind = 18;
  NTI595007.base = 0;
  NTI595007.flags = 2;
  T3338220056_3[0] = &T3338220056_0[1];
  T3338220056_0[1].kind = 1;
  T3338220056_0[1].offset = offsetof(Tmoduleinmemory595007, compiledat);
  T3338220056_0[1].typ = (&NTI124);
  T3338220056_0[1].name = "compiledAt";
  T3338220056_3[1] = &T3338220056_0[2];
  T3338220056_0[2].kind = 1;
  T3338220056_0[2].offset = offsetof(Tmoduleinmemory595007, hash);
  T3338220056_0[2].typ = (&NTI203005);
  T3338220056_0[2].name = "hash";
  T3338220056_3[2] = &T3338220056_0[3];
  T3338220056_0[3].kind = 1;
  T3338220056_0[3].offset = offsetof(Tmoduleinmemory595007, deps);
  T3338220056_0[3].typ = (&NTI334033);
  T3338220056_0[3].name = "deps";
  T3338220056_3[3] = &T3338220056_0[4];
  NTI595003.size = sizeof(Tneedrecompile595003);
  NTI595003.kind = 14;
  NTI595003.base = 0;
  NTI595003.flags = 3;
  for (T3338220056_6 = 0; T3338220056_6 < 5; T3338220056_6++) {
  T3338220056_0[T3338220056_6+5].kind = 1;
  T3338220056_0[T3338220056_6+5].offset = T3338220056_6;
  T3338220056_0[T3338220056_6+5].name = T3338220056_5[T3338220056_6];
  T3338220056_4[T3338220056_6] = &T3338220056_0[T3338220056_6+5];
  }
  T3338220056_0[10].len = 5; T3338220056_0[10].kind = 2; T3338220056_0[10].sons = &T3338220056_4[0];
  NTI595003.node = &T3338220056_0[10];
  T3338220056_0[4].kind = 1;
  T3338220056_0[4].offset = offsetof(Tmoduleinmemory595007, needsrecompile);
  T3338220056_0[4].typ = (&NTI595003);
  T3338220056_0[4].name = "needsRecompile";
  T3338220056_3[4] = &T3338220056_0[11];
  NTI595005.size = sizeof(Thashstatus595005);
  NTI595005.kind = 14;
  NTI595005.base = 0;
  NTI595005.flags = 3;
  for (T3338220056_9 = 0; T3338220056_9 < 4; T3338220056_9++) {
  T3338220056_0[T3338220056_9+12].kind = 1;
  T3338220056_0[T3338220056_9+12].offset = T3338220056_9;
  T3338220056_0[T3338220056_9+12].name = T3338220056_8[T3338220056_9];
  T3338220056_7[T3338220056_9] = &T3338220056_0[T3338220056_9+12];
  }
  T3338220056_0[16].len = 4; T3338220056_0[16].kind = 2; T3338220056_0[16].sons = &T3338220056_7[0];
  NTI595005.node = &T3338220056_0[16];
  T3338220056_0[11].kind = 1;
  T3338220056_0[11].offset = offsetof(Tmoduleinmemory595007, hashstatus);
  T3338220056_0[11].typ = (&NTI595005);
  T3338220056_0[11].name = "hashStatus";
  T3338220056_0[0].len = 5; T3338220056_0[0].kind = 2; T3338220056_0[0].sons = &T3338220056_3[0];
  NTI595007.node = &T3338220056_0[0];
  NTI595041.size = sizeof(TY595041*);
  NTI595041.kind = 24;
  NTI595041.base = (&NTI595007);
  NTI595041.flags = 2;
  NTI595041.marker = T3338220056_10;
  }
  
  