/* Generated by Nim Compiler v0.12.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 <setjmp.h>
#include <stdio.h>
typedef struct Tstrtable227813 Tstrtable227813;
typedef struct Tsymseq227811 Tsymseq227811;
typedef struct Tidtable227859 Tidtable227859;
typedef struct Tidpairseq227857 Tidpairseq227857;
typedef struct Tfilemodulemap272298 Tfilemodulemap272298;
typedef struct Tfilemodulerec272296 Tfilemodulerec272296;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Trodreader270030 Trodreader270030;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct TY227932 TY227932;
typedef struct Tindex270028 Tindex270028;
typedef struct Tiitable235274 Tiitable235274;
typedef struct Tiipairseq235272 Tiipairseq235272;
typedef struct Table270063 Table270063;
typedef struct Keyvaluepairseq270066 Keyvaluepairseq270066;
typedef struct Memfile268208 Memfile268208;
typedef struct Cell48946 Cell48946;
typedef struct Cellseq48962 Cellseq48962;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48958 Cellset48958;
typedef struct Pagedesc48954 Pagedesc48954;
typedef struct Memregion30890 Memregion30890;
typedef struct Smallchunk30842 Smallchunk30842;
typedef struct Llchunk30884 Llchunk30884;
typedef struct Bigchunk30844 Bigchunk30844;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30888 Avlnode30888;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Tsym227841 Tsym227841;
typedef struct Tidobj200015 Tidobj200015;
typedef struct Ttypeseq227843 Ttypeseq227843;
typedef struct Tscope227835 Tscope227835;
typedef struct TY227944 TY227944;
typedef struct Ttype227847 Ttype227847;
typedef struct Tident200021 Tident200021;
typedef struct Tlineinfo192352 Tlineinfo192352;
typedef struct Tnode227809 Tnode227809;
typedef struct Tloc227823 Tloc227823;
typedef struct Ropeobj178009 Ropeobj178009;
typedef struct Tlib227827 Tlib227827;
typedef struct Tnodeseq227803 Tnodeseq227803;
typedef struct Tlistentry143022 Tlistentry143022;
typedef struct TY92759 TY92759;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct Tidpair227855 Tidpair227855;
typedef struct Tiipair235270 Tiipair235270;
typedef struct Keyvaluepair270069 Keyvaluepair270069;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tinstantiation227831 Tinstantiation227831;
struct  Tstrtable227813  {
NI counter;
Tsymseq227811* data;
};
struct  Tidtable227859  {
NI counter;
Tidpairseq227857* data;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Sha1digest203009[20];
struct  Tfilemodulerec272296  {
NimStringDesc* filename;
NU8 reason;
Trodreader270030* rd;
Sha1digest203009 hash;
NIM_BOOL hashdone;
};
typedef N_NIMCALL_PTR(void, TY3889) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3894) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3889 marker;
TY3894 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tiitable235274  {
NI counter;
Tiipairseq235272* data;
};
struct  Tindex270028  {
NI lastidxkey;
NI lastidxval;
Tiitable235274 tab;
NimStringDesc* r;
NI offset;
};
struct  Table270063  {
Keyvaluepairseq270066* data;
NI counter;
};
struct  Memfile268208  {
void* mem;
NI size;
NI fhandle;
NI maphandle;
NIM_BOOL wasopened;
};
struct  Trodreader270030  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY227932* moddeps;
TY227932* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex270028 index;
Tindex270028 imports;
NI readerindex;
NI line;
NI moduleid;
Table270063 syms;
Memfile268208 memfile;
Tsymseq227811* methods;
NimStringDesc* origfile;
NIM_BOOL inviewmode;
};
struct  Cell48946  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48962  {
NI len;
NI cap;
Cell48946** d;
};
struct  Cellset48958  {
NI counter;
NI max;
Pagedesc48954* head;
Pagedesc48954** data;
};
typedef Smallchunk30842* TY30905[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30890  {
NI minlargeobj;
NI maxlargeobj;
TY30905 freesmallchunks;
Llchunk30884* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30844* freechunkslist;
Intset30817 chunkstarts;
Avlnode30888* root;
Avlnode30888* deleted;
Avlnode30888* last;
Avlnode30888* freeavlnodes;
};
struct  Gcstat51014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51018  {
Gcstack51016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq48962 zct;
Cellseq48962 decstack;
Cellset48958 cycleroots;
Cellseq48962 tempstack;
NI recgclock;
Memregion30890 region;
Gcstat51014 stat;
};
struct  Tidobj200015  {
  TNimObject Sup;
NI id;
};
struct  Tlineinfo192352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc227823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype227847* t;
Ropeobj178009* r;
Ropeobj178009* heaproot;
};
struct  Tsym227841  {
  Tidobj200015 Sup;
NU8 kind;
union{
struct {Ttypeseq227843* typeinstcache;
Tscope227835* typscope;
} S1;
struct {TY227944* procinstcache;
Tsym227841* gcunsafetyreason;
} S2;
struct {TY227944* usedgenerics;
Tstrtable227813 tab;
} S3;
struct {Tsym227841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype227847* typ;
Tident200021* name;
Tlineinfo192352 info;
Tsym227841* owner;
NU32 flags;
Tnode227809* ast;
NU32 options;
NI position;
NI offset;
Tloc227823 loc;
Tlib227827* annex;
Tnode227809* constraint;
};
struct  Ttype227847  {
  Tidobj200015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq227843* sons;
Tnode227809* n;
Tsym227841* owner;
Tsym227841* sym;
Tsym227841* destructor;
Tsym227841* deepcopy;
Tsym227841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc227823 loc;
};
struct  Tnode227809  {
Ttype227847* typ;
Tlineinfo192352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym227841* sym;
} S4;
struct {Tident200021* ident;
} S5;
struct {Tnodeseq227803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tlistentry143022  {
  TNimObject Sup;
Tlistentry143022* prev;
Tlistentry143022* next;
};
struct  Tlib227827  {
  Tlistentry143022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj178009* name;
Tnode227809* path;
};
struct TY92759 {
NimStringDesc* Field0;
NI Field1;
};
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (Exception* e, void* ClEnv);
void* ClEnv;
} TY19211;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY19211 raiseAction;
};
typedef NimStringDesc* TY196829[4];
typedef NimStringDesc* TY270021[9];
struct  Tidpair227855  {
Tidobj200015* key;
TNimObject* val;
};
struct  Tiipair235270  {
NI key;
NI val;
};
struct Keyvaluepair270069 {
NI Field0;
NI Field1;
Tsym227841* Field2;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48954  {
Pagedesc48954* next;
NI key;
TY30821 bits;
};
struct  Basechunk30840  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30842  {
  Basechunk30840 Sup;
Smallchunk30842* next;
Smallchunk30842* prev;
Freecell30832* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30884  {
NI size;
NI acc;
Llchunk30884* next;
};
struct  Bigchunk30844  {
  Basechunk30840 Sup;
Bigchunk30844* next;
Bigchunk30844* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30821 bits;
};
typedef Avlnode30888* TY30895[2];
struct  Avlnode30888  {
TY30895 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope227835  {
NI depthlevel;
Tstrtable227813 symbols;
Tnodeseq227803* usingsyms;
Tscope227835* parent;
};
struct  Tident200021  {
  Tidobj200015 Sup;
NimStringDesc* s;
Tident200021* next;
NI h;
};
struct  Ropeobj178009  {
  TNimObject Sup;
Ropeobj178009* left;
Ropeobj178009* right;
NI length;
NimStringDesc* data;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct  Tinstantiation227831  {
Tsym227841* sym;
Ttypeseq227843* concretetypes;
TY227932* usedby;
NI compilesid;
};
struct Tfilemodulemap272298 {
  TGenericSeq Sup;
  Tfilemodulerec272296 data[SEQ_DECL_SIZE];
};
struct TY227932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Tsymseq227811 {
  TGenericSeq Sup;
  Tsym227841* data[SEQ_DECL_SIZE];
};
struct Tidpairseq227857 {
  TGenericSeq Sup;
  Tidpair227855 data[SEQ_DECL_SIZE];
};
struct Tiipairseq235272 {
  TGenericSeq Sup;
  Tiipair235270 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq270066 {
  TGenericSeq Sup;
  Keyvaluepair270069 data[SEQ_DECL_SIZE];
};
struct Ttypeseq227843 {
  TGenericSeq Sup;
  Ttype227847* data[SEQ_DECL_SIZE];
};
struct TY227944 {
  TGenericSeq Sup;
  Tinstantiation227831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq227803 {
  TGenericSeq Sup;
  Tnode227809* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP916)(void* p, NI op);
N_NIMCALL(void, TMP917)(void* p, NI op);
static N_INLINE(void, nimGCunref)(void* p);
static N_INLINE(void, decref_54604)(Cell48946* c);
static N_INLINE(void, rtladdzct_54204)(Cell48946* c);
N_NOINLINE(void, addzct_52617)(Cellseq48962* s, Cell48946* c);
static N_INLINE(NIM_BOOL, canbecycleroot_52667)(Cell48946* c);
static N_INLINE(void, rtladdcycleroot_53423)(Cell48946* c);
N_NOINLINE(void, incl_49665)(Cellset48958* s, Cell48946* cell);
static N_INLINE(Cell48946*, usrtocell_52646)(void* usr);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, initidtable_231057)(Tidtable227859* x);
N_NIMCALL(void, initstrtable_231007)(Tstrtable227813* x);
static N_INLINE(void, Gcdisable_11201)(void);
N_NIMCALL(void, rawloadstub_270106)(Tsym227841* s);
N_NIMCALL(void, internalerror_198191)(NimStringDesc* errmsg);
N_NIMCALL(NI, iitableget_235289)(Tiitable235274 t, NI key);
N_NIMCALL(Tsym227841*, decodesymsafepos_272328)(Trodreader270030* rd, NI offset, Tlineinfo192352 info);
N_NIMCALL(void, internalerror_198172)(Tlineinfo192352 info, NimStringDesc* errmsg);
N_NIMCALL(Tsym227841*, decodesym_270689)(Trodreader270030* r, Tlineinfo192352 info);
N_NIMCALL(NI, decodevint_234356)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_226440)(NI id);
N_NIMCALL(Tident200021*, getident_200463)(NimStringDesc* identifier);
N_NIMCALL(NimStringDesc*, decodestr_234154)(NCSTRING s, NI* pos);
N_NIMCALL(Tsym227841*, getordefault_270737)(Table270063 t, NI key);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, HEX5BHEX5DHEX3D_270804)(Table270063* t, NI key, Tsym227841* val);
N_NIMCALL(void, registerid_226201)(Tidobj200015* id);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Ttype227847*, rrgettype_270125)(Trodreader270030* r, NI id, Tlineinfo192352 info);
N_NIMCALL(TNimObject*, idtableget_235189)(Tidtable227859 t, NI key);
N_NIMCALL(Ttype227847*, decodetype_270493)(Trodreader270030* r, Tlineinfo192352 info);
N_NIMCALL(void, idtableput_235196)(Tidtable227859* t, Tidobj200015* key, TNimObject* val);
N_NIMCALL(Tnode227809*, decodenode_270396)(Trodreader270030* r, Tlineinfo192352 finfo);
N_NIMCALL(Tnode227809*, decodenodelazybody_270243)(Trodreader270030* r, Tlineinfo192352 finfo, Tsym227841* belongsto);
N_NIMCALL(Tnode227809*, newnodei_229351)(NU8 kind, Tlineinfo192352 info);
N_NIMCALL(void, decodelineinfo_270133)(Trodreader270030* r, Tlineinfo192352* info);
N_NIMCALL(Tlineinfo192352, newlineinfo_193267)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_234512)(NCSTRING s, NI* pos);
N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(Tsym227841*, rrgetsym_270117)(Trodreader270030* r, NI id, Tlineinfo192352 info);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, encodevint_234294)(NI x, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Trodreader270030*, getreader_272396)(NI moduleid);
N_NIMCALL(void, addsonnilallowed_231550)(Tnode227809* father, Tnode227809* son);
N_NIMCALL(void, skipnode_270174)(Trodreader270030* r);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(Tlineinfo192352, unknownlineinfo_193411)(void);
N_NIMCALL(void, decodeloc_270407)(Trodreader270030* r, Tloc227823* loc, Tlineinfo192352 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Ropeobj178009*, rope_178322)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_231498)(Ttype227847* father, Ttype227847* son);
N_NIMCALL(Tlib227827*, decodelib_270641)(Trodreader270030* r, Tlineinfo192352 info);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_55022)(Cell48946* c);
static N_INLINE(void, Gcenable_11203)(void);
static N_INLINE(NI, getid_226404)(void);
N_NIMCALL(void, loadmaxids_226506)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_121890)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_272760)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_193655)(NI32 fileidx);
N_NIMCALL(void, gethash_272722)(NI32 fileidx, Sha1digest203009* Result);
N_NIMCALL(NimStringDesc*, HEX24_198279)(TY92759 x);
N_NIMCALL(void, securehashfile_203034)(NimStringDesc* filename, Sha1digest203009* Result);
N_NIMCALL(NimStringDesc*, tofullpath_193665)(NI32 fileidx);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(NimStringDesc*, togeneratedfile_170148)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_170134)(NimStringDesc* path);
N_NIMCALL(Trodreader270030*, newrodreader_271968)(NimStringDesc* modfilename, Sha1digest203009 hash, NI readerindex);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(Memfile268208, open_268607)(NimStringDesc* filename, NU8 mode, NI mappedsize, NI offset, NI newfilesize);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
static N_INLINE(Exception*, getCurrentException)(void);
static N_INLINE(void, popCurrentException)(void);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, inittable_272032)(NI initialsize, Table270063* Result);
N_NIMCALL(NIM_BOOL, startswith_271939)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_235282)(Tiitable235274* x);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NIM_BOOL, nosexistsFile)(NimStringDesc* filename);
N_NIMCALL(void, processrodfile_271586)(Trodreader270030* r, Sha1digest203009 hash);
N_NIMCALL(NimStringDesc*, rdword_271265)(Trodreader270030* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_203152)(Sha1digest203009 a, Sha1digest203009 b);
N_NIMCALL(void, parsesecurehash_203107)(NimStringDesc* hash, Sha1digest203009* Result);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_271555)(NU8 old, NU8 new_271558);
N_NIMCALL(NIM_BOOL, isdefined_201167)(Tident200021* symbol);
N_NIMCALL(NI, countdefinedsymbols_201211)(void);
N_NIMCALL(NimStringDesc*, findmodule_170549)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_193254)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, skipsection_271178)(Trodreader270030* r);
N_NIMCALL(void, processindex_271463)(Trodreader270030* r, Tindex270028* idx, FILE* outf);
N_NIMCALL(void, iitableput_235296)(Tiitable235274* t, NI key, NI val);
N_NIMCALL(void, write_16911)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_196636)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_269227)(Memfile268208* f);
N_NIMCALL(void, processinterf_271325)(Trodreader270030* r, Tsym227841* module);
N_NIMCALL(Tsym227841*, newstub_271302)(Trodreader270030* r, NimStringDesc* name, NI id);
N_NIMCALL(void, strtableadd_235103)(Tstrtable227813* t, Tsym227841* n);
N_NIMCALL(void, processcompilerprocs_271383)(Trodreader270030* r, Tsym227841* module);
N_NIMCALL(void, loadconverters_272658)(Trodreader270030* r);
N_NIMCALL(void, loadmethods_272685)(Trodreader270030* r);
N_NIMCALL(Tnode227809*, newnode_228401)(NU8 kind);
N_NIMCALL(void, addson_229819)(Tnode227809* father, Tnode227809* son);
static N_INLINE(NI, len_228098)(Tnode227809* n);
STRING_LITERAL(TMP1050, "loadStub", 8);
STRING_LITERAL(TMP1051, "loadStub: invalid key", 21);
STRING_LITERAL(TMP1075, "dataIdx == 0", 12);
STRING_LITERAL(TMP1076, "decodeSym: no id", 16);
STRING_LITERAL(TMP1078, "decodeSym: no ident", 19);
STRING_LITERAL(TMP1079, "decodeSym: wrong id", 19);
STRING_LITERAL(TMP1080, "rrGetType", 9);
STRING_LITERAL(TMP1081, "decodeType: no id", 17);
STRING_LITERAL(TMP1083, "", 0);
STRING_LITERAL(TMP1084, "decodeNode: nkIdent", 19);
STRING_LITERAL(TMP1086, "missing from both indexes: +", 28);
STRING_LITERAL(TMP1087, "rrGetSym: no reader found: +", 28);
STRING_LITERAL(TMP1088, "decodeNode: nkSym", 17);
STRING_LITERAL(TMP1089, "decodeNode: \')\' missing", 23);
STRING_LITERAL(TMP1090, "decodeNode: \'(\' missing ", 24);
STRING_LITERAL(TMP1091, "decodeLoc ", 10);
STRING_LITERAL(TMP1092, "decodeType ^(", 13);
STRING_LITERAL(TMP1093, "decodeLib: 1", 12);
STRING_LITERAL(TMP1094, "decodeLib: 2", 12);
STRING_LITERAL(TMP1095, "loadStub: wrong symbol", 22);
STRING_LITERAL(TMP1096, "loadStub: wrong ID", 18);
STRING_LITERAL(TMP1539, "compiler/rodread.nim", 20);
NIM_CONST TY92759 TMP1538 = {((NimStringDesc*) &TMP1539),
((NI) 800)}
;
STRING_LITERAL(TMP1540, "rod", 3);
STRING_LITERAL(TMP1543, "NIM:", 4);
STRING_LITERAL(TMP1544, "1215", 4);
STRING_LITERAL(TMP1545, "HASH", 4);
STRING_LITERAL(TMP1546, "ID", 2);
STRING_LITERAL(TMP1547, "ORIGFILE", 8);
STRING_LITERAL(TMP1548, "OPTIONS", 7);
STRING_LITERAL(TMP1549, "GOPTIONS", 8);
STRING_LITERAL(TMP1550, "CMD", 3);
STRING_LITERAL(TMP1551, "DEFINES", 7);
STRING_LITERAL(TMP1552, "FILES", 5);
STRING_LITERAL(TMP1553, "INCLUDES", 8);
STRING_LITERAL(TMP1554, "DEPS", 4);
STRING_LITERAL(TMP1555, "INTERF", 6);
STRING_LITERAL(TMP1556, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1557, "INDEX", 5);
STRING_LITERAL(TMP1558, "IMPORTS", 7);
STRING_LITERAL(TMP1559, "CONVERTERS", 10);
STRING_LITERAL(TMP1560, "METHODS", 7);
STRING_LITERAL(TMP1561, "DATA", 4);
STRING_LITERAL(TMP1562, "INIT", 4);
STRING_LITERAL(TMP1584, "skipSection ", 12);
STRING_LITERAL(TMP1585, " ", 1);
STRING_LITERAL(TMP1586, "\015\012", 2);
STRING_LITERAL(TMP1587, "invalid section: \'", 18);
STRING_LITERAL(TMP1588, "\' at ", 5);
STRING_LITERAL(TMP1589, " in ", 4);
STRING_LITERAL(TMP1590, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1591, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1592, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1593, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1594, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1595, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1596, "an include file edited: $1", 26);
STRING_LITERAL(TMP1597, "a module $1 depends on has changed", 34);
NIM_CONST TY270021 reasontofrmt_270018 = {((NimStringDesc*) &TMP1083),
((NimStringDesc*) &TMP1590),
((NimStringDesc*) &TMP1591),
((NimStringDesc*) &TMP1592),
((NimStringDesc*) &TMP1593),
((NimStringDesc*) &TMP1594),
((NimStringDesc*) &TMP1595),
((NimStringDesc*) &TMP1596),
((NimStringDesc*) &TMP1597)}
;
STRING_LITERAL(TMP1598, "handleSymbolFile", 16);
STRING_LITERAL(TMP1599, "processInterf", 13);
STRING_LITERAL(TMP1600, "processCompilerProcs", 20);
STRING_LITERAL(TMP1601, "importConverters", 16);
STRING_LITERAL(TMP1602, "loadMethods", 11);
STRING_LITERAL(TMP1604, "loadInitSection", 15);
Tstrtable227813 rodcompilerprocs_270089;
Tidtable227859 gtypetable_270112;
Tfilemodulemap272298* gmods_272323;
TNimType NTI272296; /* TFileModuleRec */
extern TNimType NTI149; /* string */
TNimType NTI270005; /* TReasonForRecompile */
extern TNimType NTI4011; /* RootObj */
TNimType NTI270030; /* TRodReader */
extern TNimType NTI108; /* int */
extern TNimType NTI151; /* cstring */
extern TNimType NTI169017; /* TOptions */
extern TNimType NTI227932; /* seq[int32] */
TNimType NTI270028; /* TIndex */
extern TNimType NTI235274; /* TIITable */
extern TNimType NTI270063; /* Table */
extern TNimType NTI268208; /* MemFile */
extern TNimType NTI227811; /* TSymSeq */
extern TNimType NTI138; /* bool */
TNimType NTI270032; /* PRodReader */
extern TNimType NTI203009; /* Sha1Digest */
TNimType NTI272298; /* TFileModuleMap */
extern Gcheap51018 gch_51059;
extern NI gfrontendid_226012;
extern TNimType NTI227807; /* PSym */
extern TNimType NTI227841; /* TSym */
extern TNimType NTI227805; /* PType */
extern TNimType NTI227847; /* TType */
extern TNimType NTI227839; /* PLib */
extern TNimType NTI227827; /* TLib */
extern NU32 gglobaloptions_169132;
extern NimStringDesc* gprojectpath_169235;
extern NimStringDesc* gprojectname_169234;
extern TSafePoint* exchandler_20843;
extern TNimType NTI4033; /* OSError */
extern Exception* currexception_20845;
extern NU32 goptions_169130;
extern NU8 gcmd_169134;
extern NI32 systemfileidx_192633;
extern Tnode227809* emptynode_228807;
N_NIMCALL(void, TMP916)(void* p, NI op) {
	Trodreader270030* a;
	a = (Trodreader270030*)p;
	nimGCvisit((void*)(*a).moddeps, op);
	nimGCvisit((void*)(*a).files, op);
	nimGCvisit((void*)(*a).filename, op);
	nimGCvisit((void*)(*a).index.tab.data, op);
	nimGCvisit((void*)(*a).index.r, op);
	nimGCvisit((void*)(*a).imports.tab.data, op);
	nimGCvisit((void*)(*a).imports.r, op);
	nimGCvisit((void*)(*a).syms.data, op);
	nimGCvisit((void*)(*a).methods, op);
	nimGCvisit((void*)(*a).origfile, op);
}
N_NIMCALL(void, TMP917)(void* p, NI op) {
	Tfilemodulemap272298* a;
	NI LOC1;
	a = (Tfilemodulemap272298*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].filename, op);
	nimGCvisit((void*)a->data[LOC1].rd, op);
	}
}

static N_INLINE(void, rtladdzct_54204)(Cell48946* c) {
	addzct_52617((&gch_51059.zct), c);
}

static N_INLINE(NIM_BOOL, canbecycleroot_52667)(Cell48946* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_53423)(Cell48946* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_49665((&gch_51059.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_54604)(Cell48946* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_54204(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_52667(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_53423(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

static N_INLINE(void, nimGCunref)(void* p) {
	Cell48946* LOC1;
	LOC1 = 0;
	LOC1 = usrtocell_52646(p);
	decref_54604(LOC1);
}

static N_INLINE(void, Gcdisable_11201)(void) {
	gch_51059.recgclock += ((NI) 1);
}

static N_INLINE(void, setid_226440)(NI id) {
	gfrontendid_226012 = ((gfrontendid_226012 >= (NI)(id + ((NI) 1))) ? gfrontendid_226012 : (NI)(id + ((NI) 1)));
}

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

N_NIMCALL(void, decodelineinfo_270133)(Trodreader270030* r, Tlineinfo192352* info) {
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(63))) goto LA3;
		(*r).pos += ((NI) 1);
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(44))) goto LA7;
			(*info).col = ((NI16) -1);
		}
		goto LA5;
		LA7: ;
		{
			NI LOC10;
			LOC10 = 0;
			LOC10 = decodevint_234356((*r).s, (&(*r).pos));
			(*info).col = ((NI16) (LOC10));
		}
		LA5: ;
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(44))) goto LA13;
			(*r).pos += ((NI) 1);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(44))) goto LA17;
				(*info).line = ((NI16) -1);
			}
			goto LA15;
			LA17: ;
			{
				NI LOC20;
				LOC20 = 0;
				LOC20 = decodevint_234356((*r).s, (&(*r).pos));
				(*info).line = ((NI16) (LOC20));
			}
			LA15: ;
			{
				NI LOC25;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(44))) goto LA23;
				(*r).pos += ((NI) 1);
				LOC25 = 0;
				LOC25 = decodevint_234356((*r).s, (&(*r).pos));
				(*info) = newlineinfo_193267((*r).files->data[LOC25], ((NI) ((*info).line)), ((NI) ((*info).col)));
			}
			LA23: ;
		}
		LA13: ;
	}
	LA3: ;
}

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

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

N_NIMCALL(Trodreader270030*, getreader_272396)(NI moduleid) {
	Trodreader270030* result;
{	result = 0;
	{
		NI i_272426;
		NI HEX3Atmp_272440;
		NI res_272443;
		i_272426 = 0;
		HEX3Atmp_272440 = 0;
		HEX3Atmp_272440 = ((gmods_272323 ? gmods_272323->Sup.len : 0) - 1);
		res_272443 = ((NI) 0);
		{
			while (1) {
				if (!(res_272443 <= HEX3Atmp_272440)) goto LA3;
				i_272426 = res_272443;
				result = gmods_272323->data[i_272426].rd;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = !((result == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC6 = ((*result).moduleid == moduleid);
					LA7: ;
					if (!LOC6) goto LA8;
					goto BeforeRet;
				}
				LA8: ;
				res_272443 += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym227841*, rrgetsym_270117)(Trodreader270030* r, NI id, Tlineinfo192352 info) {
	Tsym227841* result;
	result = 0;
	result = getordefault_270737((*r).syms, id);
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA3;
		d = iitableget_235289((*r).index.tab, id);
		{
			NI moduleid;
			Trodreader270030* rd;
			if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
			moduleid = iitableget_235289((*r).imports.tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC13;
				if (!(moduleid < ((NI) 0))) goto LA11;
				x = copyString(((NimStringDesc*) &TMP1083));
				encodevint_234294(id, (&x));
				LOC13 = 0;
				LOC13 = rawNewString(x->Sup.len + 28);
appendString(LOC13, ((NimStringDesc*) &TMP1086));
appendString(LOC13, x);
				internalerror_198172(info, LOC13);
			}
			LA11: ;
			rd = getreader_272396(moduleid);
			d = iitableget_235289((*rd).index.tab, id);
			{
				if (!!((d == ((NI) (-2147483647 -1))))) goto LA16;
				result = decodesymsafepos_272328(rd, d, info);
			}
			goto LA14;
			LA16: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC19;
				x = copyString(((NimStringDesc*) &TMP1083));
				encodevint_234294(id, (&x));
				LOC19 = 0;
				LOC19 = rawNewString(x->Sup.len + 28);
appendString(LOC19, ((NimStringDesc*) &TMP1087));
appendString(LOC19, x);
				internalerror_198172(info, LOC19);
			}
			LA14: ;
		}
		goto LA5;
		LA7: ;
		{
			result = decodesymsafepos_272328(r, d, info);
		}
		LA5: ;
	}
	LA3: ;
	{
		NIM_BOOL LOC23;
		LOC23 = 0;
		LOC23 = !((result == NIM_NIL));
		if (!(LOC23)) goto LA24;
		LOC23 = ((*result).kind == ((NU8) 23));
		LA24: ;
		if (!LOC23) goto LA25;
		rawloadstub_270106(result);
	}
	LA25: ;
	return result;
}

N_NIMCALL(void, skipnode_270174)(Trodreader270030* r) {
	NI par;
	NI pos;
	par = ((NI) 0);
	pos = (NI)((*r).pos + ((NI) 1));
	{
		while (1) {
			switch (((NU8)((*r).s[pos]))) {
			case 41:
			{
				{
					if (!(par == ((NI) 0))) goto LA6;
					goto LA1;
				}
				LA6: ;
				par -= ((NI) 1);
			}
			break;
			case 40:
			{
				par += ((NI) 1);
			}
			break;
			default:
			{
			}
			break;
			}
			pos += ((NI) 1);
		}
	} LA1: ;
	(*r).pos = (NI)(pos + ((NI) 1));
}

N_NIMCALL(Tnode227809*, decodenodelazybody_270243)(Trodreader270030* r, Tlineinfo192352 finfo, Tsym227841* belongsto) {
	Tnode227809* result;
{	result = 0;
	result = NIM_NIL;
	{
		NI LOC9;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA3;
		(*r).pos += ((NI) 1);
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA7;
			(*r).pos += ((NI) 1);
			goto BeforeRet;
		}
		LA7: ;
		LOC9 = 0;
		LOC9 = decodevint_234356((*r).s, (&(*r).pos));
		result = newnodei_229351(((NU8) (LOC9)), finfo);
		decodelineinfo_270133(r, (&(*result).info));
		{
			NI LOC14;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA12;
			(*r).pos += ((NI) 1);
			LOC14 = 0;
			LOC14 = decodevint_234356((*r).s, (&(*r).pos));
			(*result).flags = ((NU16) (((NI32) (LOC14))));
		}
		LA12: ;
		{
			NI id;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(94))) goto LA17;
			(*r).pos += ((NI) 1);
			id = decodevint_234356((*r).s, (&(*r).pos));
			asgnRefNoCycle((void**) (&(*result).typ), rrgettype_270125(r, id, (*result).info));
		}
		LA17: ;
		switch ((*result).kind) {
		case ((NU8) 5) ... ((NU8) 10):
		{
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA22;
				(*r).pos += ((NI) 1);
				(*result).kindU.S1.intval = decodevbiggestint_234512((*r).s, (&(*r).pos));
			}
			LA22: ;
		}
		break;
		case ((NU8) 16) ... ((NU8) 18):
		{
			{
				NimStringDesc* fl;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA27;
				(*r).pos += ((NI) 1);
				fl = decodestr_234154((*r).s, (&(*r).pos));
				(*result).kindU.S2.floatval = nsuParseFloat(fl);
			}
			LA27: ;
		}
		break;
		case ((NU8) 20) ... ((NU8) 22):
		{
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA32;
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*result).kindU.S3.strval), decodestr_234154((*r).s, (&(*r).pos)));
			}
			goto LA30;
			LA32: ;
			{
				NimStringDesc* LOC35;
				LOC35 = 0;
				LOC35 = (*result).kindU.S3.strval; (*result).kindU.S3.strval = copyStringRC1(((NimStringDesc*) &TMP1083));
				if (LOC35) nimGCunrefNoCycle(LOC35);
			}
			LA30: ;
		}
		break;
		case ((NU8) 2):
		{
			{
				NimStringDesc* fl;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA39;
				(*r).pos += ((NI) 1);
				fl = decodestr_234154((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S5.ident), getident_200463(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_198172((*result).info, ((NimStringDesc*) &TMP1084));
			}
			LA37: ;
		}
		break;
		case ((NU8) 3):
		{
			{
				NI id;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA45;
				(*r).pos += ((NI) 1);
				id = decodevint_234356((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S4.sym), rrgetsym_270117(r, id, (*result).info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_198172((*result).info, ((NimStringDesc*) &TMP1088));
			}
			LA43: ;
		}
		break;
		default:
		{
			NI i;
			i = ((NI) 0);
			{
				while (1) {
					if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(41)))) goto LA50;
					{
						NIM_BOOL LOC53;
						LOC53 = 0;
						LOC53 = !((belongsto == NIM_NIL));
						if (!(LOC53)) goto LA54;
						LOC53 = (i == ((NI) 6));
						LA54: ;
						if (!LOC53) goto LA55;
						addsonnilallowed_231550(result, NIM_NIL);
						(*belongsto).offset = (*r).pos;
						skipnode_270174(r);
					}
					goto LA51;
					LA55: ;
					{
						Tnode227809* LOC58;
						LOC58 = 0;
						LOC58 = decodenodelazybody_270243(r, (*result).info, NIM_NIL);
						addsonnilallowed_231550(result, LOC58);
					}
					LA51: ;
					i += ((NI) 1);
				} LA50: ;
			}
		}
		break;
		}
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA61;
			(*r).pos += ((NI) 1);
		}
		goto LA59;
		LA61: ;
		{
			internalerror_198172((*result).info, ((NimStringDesc*) &TMP1089));
		}
		LA59: ;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC65;
		NimStringDesc* LOC66;
		LOC65 = 0;
		LOC66 = 0;
		LOC66 = nimIntToStr((*r).pos);
		LOC65 = rawNewString(LOC66->Sup.len + 24);
appendString(LOC65, ((NimStringDesc*) &TMP1090));
appendString(LOC65, LOC66);
		internalerror_198172(finfo, LOC65);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode227809*, decodenode_270396)(Trodreader270030* r, Tlineinfo192352 finfo) {
	Tnode227809* result;
	result = 0;
	result = decodenodelazybody_270243(r, finfo, NIM_NIL);
	return result;
}

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, decodeloc_270407)(Trodreader270030* r, Tloc227823* loc, Tlineinfo192352 info) {
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(60))) goto LA3;
		(*r).pos += ((NI) 1);
		{
			NI LOC9;
			if (!(((NU8)((*r).s[(*r).pos])) >= ((NU8)(48)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(57)) || ((NU8)((*r).s[(*r).pos])) >= ((NU8)(97)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(122)) || ((NU8)((*r).s[(*r).pos])) >= ((NU8)(65)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(90)))) goto LA7;
			LOC9 = 0;
			LOC9 = decodevint_234356((*r).s, (&(*r).pos));
			(*loc).k = ((NU8) (LOC9));
		}
		goto LA5;
		LA7: ;
		{
			(*loc).k = ((NU8) 0);
		}
		LA5: ;
		{
			NI LOC15;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA13;
			(*r).pos += ((NI) 1);
			LOC15 = 0;
			LOC15 = decodevint_234356((*r).s, (&(*r).pos));
			(*loc).s = ((NU8) (LOC15));
		}
		goto LA11;
		LA13: ;
		{
			(*loc).s = ((NU8) 0);
		}
		LA11: ;
		{
			NI LOC21;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA19;
			(*r).pos += ((NI) 1);
			LOC21 = 0;
			LOC21 = decodevint_234356((*r).s, (&(*r).pos));
			(*loc).flags = ((NU16) (((NI32) (LOC21))));
		}
		goto LA17;
		LA19: ;
		{
			(*loc).flags = 0;
		}
		LA17: ;
		{
			NI LOC27;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(94))) goto LA25;
			(*r).pos += ((NI) 1);
			LOC27 = 0;
			LOC27 = decodevint_234356((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).t), rrgettype_270125(r, LOC27, info));
		}
		goto LA23;
		LA25: ;
		{
			unsureAsgnRef((void**) (&(*loc).t), NIM_NIL);
		}
		LA23: ;
		{
			NimStringDesc* LOC33;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA31;
			(*r).pos += ((NI) 1);
			LOC33 = 0;
			LOC33 = decodestr_234154((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).r), rope_178322(LOC33));
		}
		goto LA29;
		LA31: ;
		{
			unsureAsgnRef((void**) (&(*loc).r), NIM_NIL);
		}
		LA29: ;
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(62))) goto LA37;
			(*r).pos += ((NI) 1);
		}
		goto LA35;
		LA37: ;
		{
			NimStringDesc* LOC40;
			LOC40 = 0;
			LOC40 = rawNewString(11);
appendString(LOC40, ((NimStringDesc*) &TMP1091));
appendChar(LOC40, (*r).s[(*r).pos]);
			internalerror_198172(info, LOC40);
		}
		LA35: ;
	}
	LA3: ;
}

N_NIMCALL(Ttype227847*, decodetype_270493)(Trodreader270030* r, Tlineinfo192352 info) {
	Ttype227847* result;
	NI LOC9;
	Tidobj200015* LOC20;
	TNimObject* LOC21;
{	result = 0;
	result = NIM_NIL;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(91))) goto LA3;
		(*r).pos += ((NI) 1);
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(93))) goto LA7;
			(*r).pos += ((NI) 1);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = (Ttype227847*) newObj((&NTI227805), sizeof(Ttype227847));
	(*result).Sup.Sup.m_type = (&NTI227847);
	LOC9 = 0;
	LOC9 = decodevint_234356((*r).s, (&(*r).pos));
	(*result).kind = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		(*result).Sup.id = decodevint_234356((*r).s, (&(*r).pos));
		setid_226440((*result).Sup.id);
		{
			Tidobj200015* LOC18;
			if (!NIM_FALSE) goto LA16;
			LOC18 = 0;
			LOC18 = &result->Sup;
			registerid_226201(LOC18);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_198172(info, ((NimStringDesc*) &TMP1081));
	}
	LA10: ;
	LOC20 = 0;
	LOC20 = &result->Sup;
	LOC21 = 0;
	LOC21 = &result->Sup.Sup;
	idtableput_235196((&gtypetable_270112), LOC20, LOC21);
	{
		Tlineinfo192352 LOC26;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA24;
		LOC26 = unknownlineinfo_193411();
		asgnRefNoCycle((void**) (&(*result).n), decodenode_270396(r, LOC26));
	}
	LA24: ;
	{
		NI LOC31;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA29;
		(*r).pos += ((NI) 1);
		LOC31 = 0;
		LOC31 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).flags = ((NU32) (((NI32) (LOC31))));
	}
	LA29: ;
	{
		NI LOC36;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(63))) goto LA34;
		(*r).pos += ((NI) 1);
		LOC36 = 0;
		LOC36 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).callconv = ((NU8) (LOC36));
	}
	LA34: ;
	{
		NI LOC41;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA39;
		(*r).pos += ((NI) 1);
		LOC41 = 0;
		LOC41 = decodevint_234356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_270117(r, LOC41, info));
	}
	LA39: ;
	{
		NI LOC46;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA44;
		(*r).pos += ((NI) 1);
		LOC46 = 0;
		LOC46 = decodevint_234356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).sym), rrgetsym_270117(r, LOC46, info));
	}
	LA44: ;
	{
		NI LOC51;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(47))) goto LA49;
		(*r).pos += ((NI) 1);
		LOC51 = 0;
		LOC51 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).size = ((NI64) (LOC51));
	}
	goto LA47;
	LA49: ;
	{
		(*result).size = IL64(-1);
	}
	LA47: ;
	{
		NI LOC57;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(61))) goto LA55;
		(*r).pos += ((NI) 1);
		LOC57 = 0;
		LOC57 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).align = ((NI16) (LOC57));
	}
	goto LA53;
	LA55: ;
	{
		(*result).align = ((NI16) 2);
	}
	LA53: ;
	decodeloc_270407(r, (&(*result).loc), info);
	{
		while (1) {
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(94))) goto LA60;
			(*r).pos += ((NI) 1);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA63;
				(*r).pos += ((NI) 1);
				{
					if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA67;
					(*r).pos += ((NI) 1);
				}
				goto LA65;
				LA67: ;
				{
					NimStringDesc* LOC70;
					LOC70 = 0;
					LOC70 = rawNewString(14);
appendString(LOC70, ((NimStringDesc*) &TMP1092));
appendChar(LOC70, (*r).s[(*r).pos]);
					internalerror_198172(info, LOC70);
				}
				LA65: ;
				rawaddson_231498(result, NIM_NIL);
			}
			goto LA61;
			LA63: ;
			{
				NI d;
				Ttype227847* LOC72;
				d = decodevint_234356((*r).s, (&(*r).pos));
				LOC72 = 0;
				LOC72 = rrgettype_270125(r, d, info);
				rawaddson_231498(result, LOC72);
			}
			LA61: ;
		} LA60: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ttype227847*, rrgettype_270125)(Trodreader270030* r, NI id, Tlineinfo192352 info) {
	Ttype227847* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_235189(gtypetable_270112, id);
	result = ((Ttype227847*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).pos;
		d = iitableget_235289((*r).index.tab, id);
		{
			if (!(d == ((NI) (-2147483647 -1)))) goto LA8;
			internalerror_198172(info, ((NimStringDesc*) &TMP1080));
		}
		LA8: ;
		(*r).pos = (NI)(d + (*r).dataidx);
		result = decodetype_270493(r, info);
		(*r).pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(Tlib227827*, decodelib_270641)(Trodreader270030* r, Tlineinfo192352 info) {
	Tlib227827* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(124))) goto LA3;
		result = (Tlib227827*) newObj((&NTI227839), sizeof(Tlib227827));
		(*result).Sup.Sup.m_type = (&NTI227827);
		(*r).pos += ((NI) 1);
		LOC5 = 0;
		LOC5 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA8;
			internalerror_198191(((NimStringDesc*) &TMP1093));
		}
		LA8: ;
		(*r).pos += ((NI) 1);
		LOC10 = 0;
		LOC10 = decodestr_234154((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).name), rope_178322(LOC10));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA13;
			internalerror_198191(((NimStringDesc*) &TMP1094));
		}
		LA13: ;
		(*r).pos += ((NI) 1);
		asgnRefNoCycle((void**) (&(*result).path), decodenode_270396(r, info));
	}
	LA3: ;
	return result;
}

static N_INLINE(void, incref_55022)(Cell48946* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_52667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_53423(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell48946* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_52646(src);
		incref_55022(LOC5);
	}
	LA3: ;
	{
		Cell48946* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_52646((*dest));
		decref_54604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Tsym227841*, decodesym_270689)(Trodreader270030* r, Tlineinfo192352 info) {
	Tsym227841* result;
	NI id;
	Tident200021* ident;
	NU8 k;
	NI LOC9;
{	result = 0;
	id = 0;
	ident = 0;
	result = NIM_NIL;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(123))) goto LA3;
		(*r).pos += ((NI) 1);
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(125))) goto LA7;
			(*r).pos += ((NI) 1);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	LOC9 = 0;
	LOC9 = decodevint_234356((*r).s, (&(*r).pos));
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		id = decodevint_234356((*r).s, (&(*r).pos));
		setid_226440(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_198172(info, ((NimStringDesc*) &TMP1076));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA17;
		(*r).pos += ((NI) 1);
		LOC19 = 0;
		LOC19 = decodestr_234154((*r).s, (&(*r).pos));
		ident = getident_200463(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_198172(info, ((NimStringDesc*) &TMP1078));
	}
	LA15: ;
	result = getordefault_270737((*r).syms, id);
	{
		if (!(result == NIM_NIL)) goto LA23;
		result = (Tsym227841*) newObj((&NTI227807), sizeof(Tsym227841));
		(*result).Sup.Sup.m_type = (&NTI227841);
		(*result).Sup.id = id;
		HEX5BHEX5DHEX3D_270804((&(*r).syms), (*result).Sup.id, result);
		{
			Tidobj200015* LOC29;
			if (!NIM_FALSE) goto LA27;
			LOC29 = 0;
			LOC29 = &result->Sup;
			registerid_226201(LOC29);
		}
		LA27: ;
	}
	goto LA21;
	LA23: ;
	{
		if (!!(((*result).Sup.id == id))) goto LA31;
		internalerror_198172(info, ((NimStringDesc*) &TMP1079));
	}
	goto LA21;
	LA31: ;
	{
		NIM_BOOL LOC34;
		LOC34 = 0;
		LOC34 = !(((*result).kind == ((NU8) 23)));
		if (!(LOC34)) goto LA35;
		LOC34 = !((*r).inviewmode);
		LA35: ;
		if (!LOC34) goto LA36;
		goto BeforeRet;
	}
	goto LA21;
	LA36: ;
	{
		genericReset((void*)(&(*result)), (&NTI227841));
		(*result).Sup.id = id;
	}
	LA21: ;
	(*result).kind = k;
	asgnRefNoCycle((void**) (&(*result).name), ident);
	{
		NI LOC43;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(94))) goto LA41;
		(*r).pos += ((NI) 1);
		LOC43 = 0;
		LOC43 = decodevint_234356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).typ), rrgettype_270125(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_270133(r, (&(*result).info));
	{
		NI LOC48;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA46;
		(*r).pos += ((NI) 1);
		LOC48 = 0;
		LOC48 = decodevint_234356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_270117(r, LOC48, (*result).info));
	}
	LA46: ;
	{
		NI LOC53;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA51;
		(*r).pos += ((NI) 1);
		LOC53 = 0;
		LOC53 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).flags = ((NU32) (((NI32) (LOC53))));
	}
	LA51: ;
	{
		NI LOC58;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(64))) goto LA56;
		(*r).pos += ((NI) 1);
		LOC58 = 0;
		LOC58 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).magic = ((NU8) (LOC58));
	}
	LA56: ;
	{
		NI LOC63;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA61;
		(*r).pos += ((NI) 1);
		LOC63 = 0;
		LOC63 = decodevint_234356((*r).s, (&(*r).pos));
		(*result).options = ((NU32) (((NI32) (LOC63))));
	}
	goto LA59;
	LA61: ;
	{
		(*result).options = (*r).options;
	}
	LA59: ;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(37))) goto LA67;
		(*r).pos += ((NI) 1);
		(*result).position = decodevint_234356((*r).s, (&(*r).pos));
	}
	goto LA65;
	LA67: ;
	{
		if (!!(((520256 &(1<<(((*result).kind)&31)))!=0))) goto LA70;
		(*result).position = ((NI) 0);
	}
	goto LA65;
	LA70: ;
	LA65: ;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(96))) goto LA74;
		(*r).pos += ((NI) 1);
		(*result).offset = decodevint_234356((*r).s, (&(*r).pos));
	}
	goto LA72;
	LA74: ;
	{
		(*result).offset = ((NI) -1);
	}
	LA72: ;
	decodeloc_270407(r, (&(*result).loc), (*result).info);
	asgnRef((void**) (&(*result).annex), decodelib_270641(r, info));
	{
		Tlineinfo192352 LOC81;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(35))) goto LA79;
		(*r).pos += ((NI) 1);
		LOC81 = unknownlineinfo_193411();
		asgnRefNoCycle((void**) (&(*result).constraint), decodenode_270396(r, LOC81));
	}
	LA79: ;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA84;
		{
			if (!((520192 &(1<<(((*result).kind)&31)))!=0)) goto LA88;
			asgnRefNoCycle((void**) (&(*result).ast), decodenodelazybody_270243(r, (*result).info, result));
			(*result).position = (*r).readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) (&(*result).ast), decodenode_270396(r, (*result).info));
		}
		LA86: ;
	}
	LA84: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym227841*, decodesymsafepos_272328)(Trodreader270030* rd, NI offset, Tlineinfo192352 info) {
	Tsym227841* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).dataidx == ((NI) 0))) goto LA3;
		internalerror_198172(info, ((NimStringDesc*) &TMP1075));
	}
	LA3: ;
	oldpos = (*rd).pos;
	(*rd).pos = (NI)(offset + (*rd).dataidx);
	result = decodesym_270689(rd, info);
	(*rd).pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_270106)(Tsym227841* s) {
	Trodreader270030* rd;
	NI theid;
	NI d;
	Tsym227841* rs;
	Tlineinfo192352 LOC9;
	{
		if (!!(((*s).kind == ((NU8) 23)))) goto LA3;
		internalerror_198191(((NimStringDesc*) &TMP1050));
	}
	LA3: ;
	rd = gmods_272323->data[(*s).position].rd;
	theid = (*s).Sup.id;
	d = iitableget_235289((*rd).index.tab, (*s).Sup.id);
	{
		if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
		internalerror_198191(((NimStringDesc*) &TMP1051));
	}
	LA7: ;
	LOC9 = unknownlineinfo_193411();
	rs = decodesymsafepos_272328(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_198172((*rs).info, ((NimStringDesc*) &TMP1095));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.id == theid))) goto LA15;
		internalerror_198172((*rs).info, ((NimStringDesc*) &TMP1096));
	}
	goto LA10;
	LA15: ;
	LA10: ;
}

static N_INLINE(void, Gcenable_11203)(void) {
	{
		if (!(((NI) 0) < gch_51059.recgclock)) goto LA3;
		gch_51059.recgclock -= ((NI) 1);
	}
	LA3: ;
}

N_NIMCALL(void, loadstub_273053)(Tsym227841* s) {
	Gcdisable_11201();
	rawloadstub_270106(s);
	Gcenable_11203();
}

static N_INLINE(NI, getid_226404)(void) {
	NI result;
	result = 0;
	result = gfrontendid_226012;
	gfrontendid_226012 += ((NI) 1);
	return result;
}

N_NIMCALL(void, gethash_272722)(NI32 fileidx, Sha1digest203009* Result) {
	NimStringDesc* LOC12;
{	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < (gmods_272323 ? gmods_272323->Sup.len : 0));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_198279(TMP1538);
		internalerror_198191(LOC7);
	}
	LA5: ;
	{
		if (!gmods_272323->data[fileidx].hashdone) goto LA10;
		memcpy((void*)(*Result), (NIM_CONST void*)gmods_272323->data[fileidx].hash, sizeof(Sha1digest203009));
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofullpath_193665(fileidx);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI203009));
	securehashfile_203034(LOC12, Result);
	memcpy((void*)gmods_272323->data[fileidx].hash, (NIM_CONST void*)(*Result), sizeof(Sha1digest203009));
	}BeforeRet: ;
}

static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
	(*s).hasRaiseAction = NIM_FALSE;
	(*s).prev = exchandler_20843;
	exchandler_20843 = s;
}

static N_INLINE(void, popSafePoint)(void) {
	exchandler_20843 = (*exchandler_20843).prev;
}

static N_INLINE(Exception*, getCurrentException)(void) {
	Exception* result;
	result = 0;
	result = currexception_20845;
	return result;
}

static N_INLINE(void, popCurrentException)(void) {
	asgnRef((void**) (&currexception_20845), NIM_NIL);
}

N_NIMCALL(NIM_BOOL, startswith_271939)(NCSTRING buf, NimStringDesc* token, NI pos) {
	NIM_BOOL result;
	NI s;
	result = 0;
	s = ((NI) 0);
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = (s < (token ? token->Sup.len : 0));
			if (!(LOC3)) goto LA4;
			LOC3 = ((NU8)(buf[(NI)(pos + s)]) == (NU8)(token->data[s]));
			LA4: ;
			if (!LOC3) goto LA2;
			s += ((NI) 1);
		} LA2: ;
	}
	result = (s == (token ? token->Sup.len : 0));
	return result;
}

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(Trodreader270030*, newrodreader_271968)(NimStringDesc* modfilename, Sha1digest203009 hash, NI readerindex) {
	Trodreader270030* result;
	TSafePoint TMP1541;
	Trodreader270030* r;
	NimStringDesc* LOC4;
{	result = 0;
	result = (Trodreader270030*) newObj((&NTI270032), sizeof(Trodreader270030));
	(*result).Sup.m_type = (&NTI270030);
	pushSafePoint(&TMP1541);
	TMP1541.status = setjmp(TMP1541.context);
	if (TMP1541.status == 0) {
		(*result).memfile = open_268607(modfilename, ((NU8) 0), ((NI) -1), ((NI) 0), ((NI) -1));
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI4033))) {
			TMP1541.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1541.status != 0) reraiseException();
	if ((*result).files) nimGCunrefNoCycle((*result).files);
	(*result).files = (TY227932*) newSeqRC1((&NTI227932), 0);
	if ((*result).moddeps) nimGCunrefNoCycle((*result).moddeps);
	(*result).moddeps = (TY227932*) newSeqRC1((&NTI227932), 0);
	if ((*result).methods) nimGCunrefNoCycle((*result).methods);
	(*result).methods = (Tsymseq227811*) newSeqRC1((&NTI227811), 0);
	r = result;
	(*r).reason = ((NU8) 1);
	(*r).pos = ((NI) 0);
	(*r).line = ((NI) 1);
	(*r).readerindex = readerindex;
	LOC4 = 0;
	LOC4 = (*r).filename; (*r).filename = copyStringRC1(modfilename);
	if (LOC4) nimGCunrefNoCycle(LOC4);
	inittable_272032(((NI) 64), (&(*r).syms));
	(*r).s = ((NCSTRING) ((*r).memfile.mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_271939((*r).s, ((NimStringDesc*) &TMP1543), ((NI) 0));
		if (!LOC7) goto LA8;
		initiitable_235282((&(*r).index.tab));
		initiitable_235282((&(*r).imports.tab));
		(*r).pos += ((NI) 4);
		version = copyString(((NimStringDesc*) &TMP1083));
		{
			while (1) {
				if (!!((((NU8)((*r).s[(*r).pos])) == ((NU8)(0)) || ((NU8)((*r).s[(*r).pos])) == ((NU8)(10))))) goto LA11;
				version = addChar(version, (*r).s[(*r).pos]);
				(*r).pos += ((NI) 1);
			} LA11: ;
		}
		{
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(10))) goto LA14;
			(*r).pos += ((NI) 1);
		}
		LA14: ;
		{
			if (!!(eqStrings(version, ((NimStringDesc*) &TMP1544)))) goto LA18;
			result = NIM_NIL;
		}
		LA18: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_271265)(Trodreader270030* r) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1083));
	{
		while (1) {
			if (!(((NU8)((*r).s[(*r).pos])) >= ((NU8)(65)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(90)) || ((NU8)((*r).s[(*r).pos])) == ((NU8)(95)) || ((NU8)((*r).s[(*r).pos])) >= ((NU8)(97)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(122)) || ((NU8)((*r).s[(*r).pos])) >= ((NU8)(48)) && ((NU8)((*r).s[(*r).pos])) <= ((NU8)(57)))) goto LA2;
			result = addChar(result, (*r).s[(*r).pos]);
			(*r).pos += ((NI) 1);
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_271555)(NU8 old, NU8 new_271558) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!(old == new_271558)) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	switch (old) {
	case ((NU8) 1):
	case ((NU8) 2):
	case ((NU8) 3):
	case ((NU8) 4):
	case ((NU8) 5):
	{
		{
			if (!((313728 &(1<<((new_271558)&31)))!=0)) goto LA8;
			result = NIM_FALSE;
			goto BeforeRet;
		}
		LA8: ;
	}
	break;
	case ((NU8) 0):
	case ((NU8) 8):
	case ((NU8) 6):
	case ((NU8) 7):
	case ((NU8) 9):
	case ((NU8) 10):
	case ((NU8) 11):
	case ((NU8) 12):
	case ((NU8) 13):
	case ((NU8) 14):
	case ((NU8) 15):
	case ((NU8) 16):
	case ((NU8) 17):
	case ((NU8) 18):
	case ((NU8) 19):
	{
	}
	break;
	}
	result = NIM_TRUE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, skipsection_271178)(Trodreader270030* r) {
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(58))) goto LA3;
		{
			while (1) {
				if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA6;
				(*r).pos += ((NI) 1);
			} LA6: ;
		}
	}
	goto LA1;
	LA3: ;
	{
		NI c;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA8;
		c = ((NI) 0);
		(*r).pos += ((NI) 1);
		{
			while (1) {
				switch (((NU8)((*r).s[(*r).pos]))) {
				case 10:
				{
					(*r).line += ((NI) 1);
				}
				break;
				case 40:
				{
					c += ((NI) 1);
				}
				break;
				case 41:
				{
					{
						if (!(c == ((NI) 0))) goto LA17;
						(*r).pos += ((NI) 1);
						goto LA10;
					}
					goto LA15;
					LA17: ;
					{
						if (!(((NI) 0) < c)) goto LA20;
						c -= ((NI) 1);
					}
					goto LA15;
					LA20: ;
					LA15: ;
				}
				break;
				case 0:
				{
					goto LA10;
				}
				break;
				default:
				{
				}
				break;
				}
				(*r).pos += ((NI) 1);
			}
		} LA10: ;
	}
	goto LA1;
	LA8: ;
	{
		NimStringDesc* LOC25;
		NimStringDesc* LOC26;
		LOC25 = 0;
		LOC26 = 0;
		LOC26 = nimIntToStr((*r).line);
		LOC25 = rawNewString(LOC26->Sup.len + 12);
appendString(LOC25, ((NimStringDesc*) &TMP1584));
appendString(LOC25, LOC26);
		internalerror_198191(LOC25);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_271463)(Trodreader270030* r, Tindex270028* idx, FILE* outf) {
	NI key;
	NI val;
	NI tmp;
	key = 0;
	val = 0;
	tmp = 0;
	(*r).pos += ((NI) 2);
	(*r).line += ((NI) 1);
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = ((NU8)(10) < (NU8)((*r).s[(*r).pos]));
			if (!(LOC3)) goto LA4;
			LOC3 = !(((NU8)((*r).s[(*r).pos]) == (NU8)(41)));
			LA4: ;
			if (!LOC3) goto LA2;
			tmp = decodevint_234356((*r).s, (&(*r).pos));
			{
				NI LOC9;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA7;
				(*r).pos += ((NI) 1);
				key = (NI)((*idx).lastidxkey + tmp);
				LOC9 = 0;
				LOC9 = decodevint_234356((*r).s, (&(*r).pos));
				val = (NI)(LOC9 + (*idx).lastidxval);
			}
			goto LA5;
			LA7: ;
			{
				key = (NI)((*idx).lastidxkey + ((NI) 1));
				val = (NI)(tmp + (*idx).lastidxval);
			}
			LA5: ;
			iitableput_235296((&(*idx).tab), key, val);
			{
				TY196829 LOC15;
				if (!!(outf == 0)) goto LA13;
				memset((void*)LOC15, 0, sizeof(LOC15));
				LOC15[0] = nimIntToStr(key);
				LOC15[1] = copyString(((NimStringDesc*) &TMP1585));
				LOC15[2] = nimIntToStr(val);
				LOC15[3] = copyString(((NimStringDesc*) &TMP1586));
				write_16911(outf, LOC15, 4);
			}
			LA13: ;
			(*idx).lastidxkey = key;
			(*idx).lastidxval = val;
			setid_226440(key);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(10))) goto LA18;
				(*r).pos += ((NI) 1);
				(*r).line += ((NI) 1);
			}
			LA18: ;
		} LA2: ;
	}
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA22;
		(*r).pos += ((NI) 1);
	}
	LA22: ;
}

N_NIMCALL(void, processrodfile_271586)(Trodreader270030* r, Sha1digest203009 hash) {
	NimStringDesc* w;
	NI d;
	Sha1digest203009 inclhash;
	w = 0;
	d = 0;
	memset((void*)inclhash, 0, sizeof(inclhash));
	{
		while (1) {
			NimStringDesc* section;
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(0)))) goto LA2;
			section = rdword_271265(r);
			{
				if (!!(((*r).reason == ((NU8) 1)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			switch (hashString(section) & 31) {
			case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1546))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1553))) goto LA15;
break;
			case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1547))) goto LA9;
if (eqStrings(section, ((NimStringDesc*) &TMP1557))) goto LA19;
break;
			case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1548))) goto LA10;
if (eqStrings(section, ((NimStringDesc*) &TMP1550))) goto LA12;
if (eqStrings(section, ((NimStringDesc*) &TMP1560))) goto LA22;
break;
			case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1562))) goto LA24;
break;
			case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1551))) goto LA13;
if (eqStrings(section, ((NimStringDesc*) &TMP1561))) goto LA23;
break;
			case 14: 
if (eqStrings(section, ((NimStringDesc*) &TMP1545))) goto LA7;
break;
			case 17: 
if (eqStrings(section, ((NimStringDesc*) &TMP1552))) goto LA14;
break;
			case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1549))) goto LA11;
if (eqStrings(section, ((NimStringDesc*) &TMP1559))) goto LA21;
break;
			case 26: 
if (eqStrings(section, ((NimStringDesc*) &TMP1555))) goto LA17;
break;
			case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1554))) goto LA16;
break;
			case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1558))) goto LA20;
break;
			case 30: 
if (eqStrings(section, ((NimStringDesc*) &TMP1556))) goto LA18;
break;
			}
			goto LA25;
			LA7: ;
			{
				(*r).pos += ((NI) 1);
				{
					NimStringDesc* LOC30;
					Sha1digest203009 LOC31;
					NIM_BOOL LOC32;
					LOC30 = 0;
					LOC30 = decodestr_234154((*r).s, (&(*r).pos));
					memset((void*)LOC31, 0, sizeof(LOC31));
					parsesecurehash_203107(LOC30, LOC31);
					LOC32 = 0;
					LOC32 = HEX3DHEX3D_203152(hash, LOC31);
					if (!!(LOC32)) goto LA33;
					(*r).reason = ((NU8) 4);
				}
				LA33: ;
			}
			goto LA26;
			LA8: ;
			{
				(*r).pos += ((NI) 1);
				(*r).moduleid = decodevint_234356((*r).s, (&(*r).pos));
				setid_226440((*r).moduleid);
			}
			goto LA26;
			LA9: ;
			{
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*r).origfile), decodestr_234154((*r).s, (&(*r).pos)));
			}
			goto LA26;
			LA10: ;
			{
				NI LOC38;
				(*r).pos += ((NI) 1);
				LOC38 = 0;
				LOC38 = decodevint_234356((*r).s, (&(*r).pos));
				(*r).options = ((NU32) (((NI32) (LOC38))));
				{
					if (!!((goptions_169130 == (*r).options))) goto LA41;
					(*r).reason = ((NU8) 6);
				}
				LA41: ;
			}
			goto LA26;
			LA11: ;
			{
				NU32 dep;
				NI LOC44;
				(*r).pos += ((NI) 1);
				LOC44 = 0;
				LOC44 = decodevint_234356((*r).s, (&(*r).pos));
				dep = ((NU32) (((NI32) (LOC44))));
				{
					if (!!((gglobaloptions_169132 == dep))) goto LA47;
					(*r).reason = ((NU8) 6);
				}
				LA47: ;
			}
			goto LA26;
			LA12: ;
			{
				NU8 dep;
				NI LOC50;
				(*r).pos += ((NI) 1);
				LOC50 = 0;
				LOC50 = decodevint_234356((*r).s, (&(*r).pos));
				dep = ((NU8) (((NI32) (LOC50))));
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = cmdchangetriggersrecompilation_271555(dep, gcmd_169134);
					if (!LOC53) goto LA54;
					(*r).reason = ((NU8) 6);
				}
				LA54: ;
			}
			goto LA26;
			LA13: ;
			{
				(*r).pos += ((NI) 1);
				d = ((NI) 0);
				{
					while (1) {
						if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA58;
						w = decodestr_234154((*r).s, (&(*r).pos));
						d += ((NI) 1);
						{
							Tident200021* LOC61;
							NIM_BOOL LOC62;
							LOC61 = 0;
							LOC61 = getident_200463(w);
							LOC62 = 0;
							LOC62 = isdefined_201167(LOC61);
							if (!!(LOC62)) goto LA63;
							(*r).reason = ((NU8) 5);
						}
						LA63: ;
						{
							if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA67;
							(*r).pos += ((NI) 1);
						}
						LA67: ;
					} LA58: ;
				}
				{
					NI LOC71;
					LOC71 = 0;
					LOC71 = countdefinedsymbols_201211();
					if (!!((d == LOC71))) goto LA72;
					(*r).reason = ((NU8) 5);
				}
				LA72: ;
			}
			goto LA26;
			LA14: ;
			{
				(*r).pos += ((NI) 2);
				(*r).line += ((NI) 1);
				{
					while (1) {
						NimStringDesc* relativepath;
						NimStringDesc* resolvedpath;
						NimStringDesc* finalpath;
						NI32 LOC82;
						if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(41)))) goto LA76;
						relativepath = decodestr_234154((*r).s, (&(*r).pos));
						resolvedpath = findmodule_170549(relativepath, (*r).origfile);
						{
							if (!(((NI) 0) < (resolvedpath ? resolvedpath->Sup.len : 0))) goto LA79;
							finalpath = resolvedpath;
						}
						goto LA77;
						LA79: ;
						{
							finalpath = relativepath;
						}
						LA77: ;
						LOC82 = 0;
						LOC82 = fileinfoidx_193254(finalpath);
						(*r).files = (TY227932*) incrSeqV2(&((*r).files)->Sup, sizeof(NI32));
						(*r).files->data[(*r).files->Sup.len] = LOC82;
						++(*r).files->Sup.len;
						(*r).pos += ((NI) 1);
						(*r).line += ((NI) 1);
					} LA76: ;
				}
				{
					if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA85;
					(*r).pos += ((NI) 1);
				}
				LA85: ;
			}
			goto LA26;
			LA15: ;
			{
				(*r).pos += ((NI) 2);
				(*r).line += ((NI) 1);
				{
					while (1) {
						NI LOC90;
						NimStringDesc* LOC91;
						if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(41)))) goto LA89;
						LOC90 = 0;
						LOC90 = decodevint_234356((*r).s, (&(*r).pos));
						w = tofullpath_193665((*r).files->data[LOC90]);
						(*r).pos += ((NI) 1);
						LOC91 = 0;
						LOC91 = decodestr_234154((*r).s, (&(*r).pos));
						chckNil((void*)inclhash);
						memset((void*)inclhash, 0, sizeof(inclhash));
						parsesecurehash_203107(LOC91, inclhash);
						{
							if (!((*r).reason == ((NU8) 1))) goto LA94;
							{
								NIM_BOOL LOC98;
								NIM_BOOL LOC99;
								Sha1digest203009 LOC101;
								NIM_BOOL LOC102;
								LOC98 = 0;
								LOC99 = 0;
								LOC99 = nosexistsFile(w);
								LOC98 = !(LOC99);
								if (LOC98) goto LA100;
								memset((void*)LOC101, 0, sizeof(LOC101));
								securehashfile_203034(w, LOC101);
								LOC102 = 0;
								LOC102 = HEX3DHEX3D_203152(inclhash, LOC101);
								LOC98 = !(LOC102);
								LA100: ;
								if (!LOC98) goto LA103;
								(*r).reason = ((NU8) 7);
							}
							LA103: ;
						}
						LA94: ;
						{
							if (!((NU8)((*r).s[(*r).pos]) == (NU8)(10))) goto LA107;
							(*r).pos += ((NI) 1);
							(*r).line += ((NI) 1);
						}
						LA107: ;
					} LA89: ;
				}
				{
					if (!((NU8)((*r).s[(*r).pos]) == (NU8)(41))) goto LA111;
					(*r).pos += ((NI) 1);
				}
				LA111: ;
			}
			goto LA26;
			LA16: ;
			{
				(*r).pos += ((NI) 1);
				{
					while (1) {
						NI LOC116;
						if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA115;
						LOC116 = 0;
						LOC116 = decodevint_234356((*r).s, (&(*r).pos));
						(*r).moddeps = (TY227932*) incrSeqV2(&((*r).moddeps)->Sup, sizeof(NI32));
						(*r).moddeps->data[(*r).moddeps->Sup.len] = (*r).files->data[((NI32) (LOC116))];
						++(*r).moddeps->Sup.len;
						{
							if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA119;
							(*r).pos += ((NI) 1);
						}
						LA119: ;
					} LA115: ;
				}
			}
			goto LA26;
			LA17: ;
			{
				(*r).interfidx = (NI)((*r).pos + ((NI) 2));
				skipsection_271178(r);
			}
			goto LA26;
			LA18: ;
			{
				(*r).compilerprocsidx = (NI)((*r).pos + ((NI) 2));
				skipsection_271178(r);
			}
			goto LA26;
			LA19: ;
			{
				processindex_271463(r, (&(*r).index), NIM_NIL);
			}
			goto LA26;
			LA20: ;
			{
				processindex_271463(r, (&(*r).imports), NIM_NIL);
			}
			goto LA26;
			LA21: ;
			{
				(*r).convertersidx = (NI)((*r).pos + ((NI) 1));
				skipsection_271178(r);
			}
			goto LA26;
			LA22: ;
			{
				(*r).methodsidx = (NI)((*r).pos + ((NI) 1));
				skipsection_271178(r);
			}
			goto LA26;
			LA23: ;
			{
				(*r).dataidx = (NI)((*r).pos + ((NI) 2));
				goto LA1;
			}
			goto LA26;
			LA24: ;
			{
				(*r).initidx = (NI)((*r).pos + ((NI) 2));
				skipsection_271178(r);
			}
			goto LA26;
			LA25: ;
			{
				NimStringDesc* LOC130;
				NimStringDesc* LOC131;
				LOC130 = 0;
				LOC131 = 0;
				LOC131 = nimIntToStr((*r).line);
				LOC130 = rawNewString(section->Sup.len + LOC131->Sup.len + (*r).filename->Sup.len + 27);
appendString(LOC130, ((NimStringDesc*) &TMP1587));
appendString(LOC130, section);
appendString(LOC130, ((NimStringDesc*) &TMP1588));
appendString(LOC130, LOC131);
appendString(LOC130, ((NimStringDesc*) &TMP1589));
appendString(LOC130, (*r).filename);
				internalerror_198191(LOC130);
				skipsection_271178(r);
			}
			LA26: ;
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(10))) goto LA134;
				(*r).pos += ((NI) 1);
				(*r).line += ((NI) 1);
			}
			LA134: ;
		} LA2: ;
	} LA1: ;
}

N_NIMCALL(NU8, checkdep_272760)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	Sha1digest203009 hash;
	Trodreader270030* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
{	result = 0;
	{
		if (!((gmods_272323 ? gmods_272323->Sup.len : 0) <= ((NI) (fileidx)))) goto LA3;
		gmods_272323 = (Tfilemodulemap272298*) setLengthSeq(&(gmods_272323)->Sup, sizeof(Tfilemodulerec272296), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_272323->data[fileidx].reason == ((NU8) 0)))) goto LA7;
		result = gmods_272323->data[fileidx].reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_193655(fileidx);
	memset((void*)hash, 0, sizeof(hash));
	chckNil((void*)hash);
	memset((void*)hash, 0, sizeof(hash));
	gethash_272722(fileidx, hash);
	gmods_272323->data[fileidx].reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_170134(filename);
	rodfile = togeneratedfile_170148(LOC9, ((NimStringDesc*) &TMP1540));
	r = newrodreader_271968(rodfile, hash, ((NI) (fileidx)));
	{
		if (!(r == NIM_NIL)) goto LA12;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = nosexistsFile(rodfile);
			if (!LOC16) goto LA17;
			result = ((NU8) 3);
		}
		goto LA14;
		LA17: ;
		{
			result = ((NU8) 2);
		}
		LA14: ;
	}
	goto LA10;
	LA12: ;
	{
		processrodfile_271586(r, hash);
		result = (*r).reason;
		{
			NU8 res;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_272760(systemfileidx_192633);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			{
				NI i_272875;
				NI HEX3Atmp_272928;
				NI res_272931;
				i_272875 = 0;
				HEX3Atmp_272928 = 0;
				HEX3Atmp_272928 = ((*r).moddeps ? ((*r).moddeps->Sup.len-1) : -1);
				res_272931 = ((NI) 0);
				{
					while (1) {
						if (!(res_272931 <= HEX3Atmp_272928)) goto LA31;
						i_272875 = res_272931;
						res = checkdep_272760((*r).moddeps->data[i_272875]);
						{
							if (!!((res == ((NU8) 1)))) goto LA34;
							result = ((NU8) 8);
						}
						LA34: ;
						res_272931 += ((NI) 1);
					} LA31: ;
				}
			}
		}
		LA23: ;
	}
	LA10: ;
	{
		NimStringDesc* LOC40;
		if (!!((result == ((NU8) 1)))) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_270018[(result)- 0], filename);
		rawmessage_196636(((NU16) 276), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_169132 &(1<<((((NU8) 1))&31)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_269227((&(*r).memfile));
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) (&gmods_272323->data[fileidx].rd), r);
	gmods_272323->data[fileidx].reason = result;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym227841*, newstub_271302)(Trodreader270030* r, NimStringDesc* name, NI id) {
	Tsym227841* result;
	result = 0;
	result = (Tsym227841*) newObj((&NTI227807), sizeof(Tsym227841));
	(*result).Sup.Sup.m_type = (&NTI227841);
	(*result).kind = ((NU8) 23);
	(*result).Sup.id = id;
	asgnRefNoCycle((void**) (&(*result).name), getident_200463(name));
	(*result).position = (*r).readerindex;
	setid_226440(id);
	{
		Tidobj200015* LOC5;
		if (!NIM_FALSE) goto LA3;
		LOC5 = 0;
		LOC5 = &result->Sup;
		registerid_226201(LOC5);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_271325)(Trodreader270030* r, Tsym227841* module) {
	{
		if (!((*r).interfidx == ((NI) 0))) goto LA3;
		internalerror_198191(((NimStringDesc*) &TMP1599));
	}
	LA3: ;
	(*r).pos = (*r).interfidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym227841* s;
			LOC7 = 0;
			LOC7 = ((NU8)(10) < (NU8)((*r).s[(*r).pos]));
			if (!(LOC7)) goto LA8;
			LOC7 = !(((NU8)((*r).s[(*r).pos]) == (NU8)(41)));
			LA8: ;
			if (!LOC7) goto LA6;
			w = decodestr_234154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_234356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = newstub_271302(r, w, key);
			asgnRefNoCycle((void**) (&(*s).owner), module);
			strtableadd_235103((&(*module).kindU.S3.tab), s);
			HEX5BHEX5DHEX3D_270804((&(*r).syms), (*s).Sup.id, s);
		} LA6: ;
	}
}

N_NIMCALL(void, processcompilerprocs_271383)(Trodreader270030* r, Tsym227841* module) {
	{
		if (!((*r).compilerprocsidx == ((NI) 0))) goto LA3;
		internalerror_198191(((NimStringDesc*) &TMP1600));
	}
	LA3: ;
	(*r).pos = (*r).compilerprocsidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym227841* s;
			LOC7 = 0;
			LOC7 = ((NU8)(10) < (NU8)((*r).s[(*r).pos]));
			if (!(LOC7)) goto LA8;
			LOC7 = !(((NU8)((*r).s[(*r).pos]) == (NU8)(41)));
			LA8: ;
			if (!LOC7) goto LA6;
			w = decodestr_234154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_234356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = getordefault_270737((*r).syms, key);
			{
				if (!(s == NIM_NIL)) goto LA11;
				s = newstub_271302(r, w, key);
				asgnRefNoCycle((void**) (&(*s).owner), module);
				HEX5BHEX5DHEX3D_270804((&(*r).syms), (*s).Sup.id, s);
			}
			LA11: ;
			strtableadd_235103((&rodcompilerprocs_270089), s);
		} LA6: ;
	}
}

N_NIMCALL(void, loadconverters_272658)(Trodreader270030* r) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).convertersidx == ((NI) 0));
		if (LOC3) goto LA4;
		LOC3 = ((*r).dataidx == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_198191(((NimStringDesc*) &TMP1601));
	}
	LA5: ;
	(*r).pos = (*r).convertersidx;
	{
		while (1) {
			NI d;
			Tlineinfo192352 LOC9;
			Tsym227841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_234356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_193411();
			LOC10 = 0;
			LOC10 = rrgetsym_270117(r, d, LOC9);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(void, loadmethods_272685)(Trodreader270030* r) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).methodsidx == ((NI) 0));
		if (LOC3) goto LA4;
		LOC3 = ((*r).dataidx == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_198191(((NimStringDesc*) &TMP1602));
	}
	LA5: ;
	(*r).pos = (*r).methodsidx;
	{
		while (1) {
			NI d;
			Tlineinfo192352 LOC9;
			Tsym227841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_234356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_193411();
			LOC10 = 0;
			LOC10 = rrgetsym_270117(r, d, LOC9);
			(*r).methods = (Tsymseq227811*) incrSeqV2(&((*r).methods)->Sup, sizeof(Tsym227841*));
			asgnRefNoCycle((void**) (&(*r).methods->data[(*r).methods->Sup.len]), LOC10);
			++(*r).methods->Sup.len;
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(Trodreader270030*, handlesymbolfile_270094)(Tsym227841* module) {
	Trodreader270030* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
{	result = 0;
	fileidx = ((NI32) ((*module).position));
	{
		if (!!(((gglobaloptions_169132 &(1<<((((NU8) 14))&31)))!=0))) goto LA3;
		(*module).Sup.id = getid_226404();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_121890(gprojectpath_169235, gprojectname_169234);
	loadmaxids_226506(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_272760(fileidx);
	{
		if (!(gmods_272323->data[fileidx].reason == ((NU8) 0))) goto LA9;
		internalerror_198191(((NimStringDesc*) &TMP1598));
	}
	LA9: ;
	result = gmods_272323->data[fileidx].rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.id = (*result).moduleid;
		HEX5BHEX5DHEX3D_270804((&(*result).syms), (*module).Sup.id, module);
		processinterf_271325(result, module);
		processcompilerprocs_271383(result, module);
		loadconverters_272658(result);
		loadmethods_272685(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.id = getid_226404();
	}
	LA11: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode227809*, loadinitsection_270100)(Trodreader270030* r) {
	Tnode227809* result;
	NI oldpos;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).initidx == ((NI) 0));
		if (LOC3) goto LA4;
		LOC3 = ((*r).dataidx == ((NI) 0));
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_198191(((NimStringDesc*) &TMP1604));
	}
	LA5: ;
	oldpos = (*r).pos;
	(*r).pos = (*r).initidx;
	result = newnode_228401(((NU8) 115));
	{
		while (1) {
			NIM_BOOL LOC9;
			NI d;
			NI p;
			Tlineinfo192352 LOC11;
			Tnode227809* LOC12;
			LOC9 = 0;
			LOC9 = ((NU8)(10) < (NU8)((*r).s[(*r).pos]));
			if (!(LOC9)) goto LA10;
			LOC9 = !(((NU8)((*r).s[(*r).pos]) == (NU8)(41)));
			LA10: ;
			if (!LOC9) goto LA8;
			d = decodevint_234356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			p = (*r).pos;
			(*r).pos = (NI)(d + (*r).dataidx);
			LOC11 = unknownlineinfo_193411();
			LOC12 = 0;
			LOC12 = decodenode_270396(r, LOC11);
			addson_229819(result, LOC12);
			(*r).pos = p;
		} LA8: ;
	}
	(*r).pos = oldpos;
	return result;
}

static N_INLINE(NI, len_228098)(Tnode227809* n) {
	NI result;
	result = 0;
	{
		if (!(*n).kindU.S6.sons == 0) goto LA3;
		result = ((NI) 0);
	}
	goto LA1;
	LA3: ;
	{
		result = ((*n).kindU.S6.sons ? (*n).kindU.S6.sons->Sup.len : 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tnode227809*, getbody_273062)(Tsym227841* s) {
	Tnode227809* result;
{	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = (*s).ast == 0;
		if (LOC3) goto LA4;
		LOC5 = 0;
		LOC5 = len_228098((*s).ast);
		LOC3 = (LOC5 <= ((NI) 6));
		LA4: ;
		if (!LOC3) goto LA6;
		result = emptynode_228807;
		goto BeforeRet;
	}
	LA6: ;
	result = (*(*s).ast).kindU.S6.sons->data[((NI) 6)];
	{
		Trodreader270030* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA10;
		r = gmods_272323->data[(*s).position].rd;
		oldpos = (*r).pos;
		(*r).pos = (*s).offset;
		result = decodenode_270396(r, (*s).info);
		(*r).pos = oldpos;
		asgnRefNoCycle((void**) (&(*(*s).ast).kindU.S6.sons->data[((NI) 6)]), result);
		(*s).offset = ((NI) 0);
	}
	LA10: ;
	}BeforeRet: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_rodreadInit000)(void) {
	if (gmods_272323) nimGCunref(gmods_272323);
	gmods_272323 = (Tfilemodulemap272298*) newSeqRC1((&NTI272298), 0);
	initidtable_231057((&gtypetable_270112));
	initstrtable_231007((&rodcompilerprocs_270089));
}

NIM_EXTERNC N_NOINLINE(void, compiler_rodreadDatInit000)(void) {
static TNimNode* TMP903[5];
static TNimNode* TMP904[9];
NI TMP906;
static char* NIM_CONST TMP905[9] = {
"rrEmpty", 
"rrNone", 
"rrRodDoesNotExist", 
"rrRodInvalid", 
"rrHashChange", 
"rrDefines", 
"rrOptions", 
"rrInclDeps", 
"rrModDeps"};
static TNimNode* TMP907[23];
static TNimNode* TMP908[5];
static TNimNode TMP895[46];
NTI272296.size = sizeof(Tfilemodulerec272296);
NTI272296.kind = 18;
NTI272296.base = 0;
TMP903[0] = &TMP895[1];
TMP895[1].kind = 1;
TMP895[1].offset = offsetof(Tfilemodulerec272296, filename);
TMP895[1].typ = (&NTI149);
TMP895[1].name = "filename";
TMP903[1] = &TMP895[2];
NTI270005.size = sizeof(NU8);
NTI270005.kind = 14;
NTI270005.base = 0;
NTI270005.flags = 3;
for (TMP906 = 0; TMP906 < 9; TMP906++) {
TMP895[TMP906+3].kind = 1;
TMP895[TMP906+3].offset = TMP906;
TMP895[TMP906+3].name = TMP905[TMP906];
TMP904[TMP906] = &TMP895[TMP906+3];
}
TMP895[12].len = 9; TMP895[12].kind = 2; TMP895[12].sons = &TMP904[0];
NTI270005.node = &TMP895[12];
TMP895[2].kind = 1;
TMP895[2].offset = offsetof(Tfilemodulerec272296, reason);
TMP895[2].typ = (&NTI270005);
TMP895[2].name = "reason";
TMP903[2] = &TMP895[13];
NTI270030.size = sizeof(Trodreader270030);
NTI270030.kind = 17;
NTI270030.base = (&NTI4011);
TMP907[0] = &TMP895[15];
TMP895[15].kind = 1;
TMP895[15].offset = offsetof(Trodreader270030, pos);
TMP895[15].typ = (&NTI108);
TMP895[15].name = "pos";
TMP907[1] = &TMP895[16];
TMP895[16].kind = 1;
TMP895[16].offset = offsetof(Trodreader270030, s);
TMP895[16].typ = (&NTI151);
TMP895[16].name = "s";
TMP907[2] = &TMP895[17];
TMP895[17].kind = 1;
TMP895[17].offset = offsetof(Trodreader270030, options);
TMP895[17].typ = (&NTI169017);
TMP895[17].name = "options";
TMP907[3] = &TMP895[18];
TMP895[18].kind = 1;
TMP895[18].offset = offsetof(Trodreader270030, reason);
TMP895[18].typ = (&NTI270005);
TMP895[18].name = "reason";
TMP907[4] = &TMP895[19];
TMP895[19].kind = 1;
TMP895[19].offset = offsetof(Trodreader270030, moddeps);
TMP895[19].typ = (&NTI227932);
TMP895[19].name = "modDeps";
TMP907[5] = &TMP895[20];
TMP895[20].kind = 1;
TMP895[20].offset = offsetof(Trodreader270030, files);
TMP895[20].typ = (&NTI227932);
TMP895[20].name = "files";
TMP907[6] = &TMP895[21];
TMP895[21].kind = 1;
TMP895[21].offset = offsetof(Trodreader270030, dataidx);
TMP895[21].typ = (&NTI108);
TMP895[21].name = "dataIdx";
TMP907[7] = &TMP895[22];
TMP895[22].kind = 1;
TMP895[22].offset = offsetof(Trodreader270030, convertersidx);
TMP895[22].typ = (&NTI108);
TMP895[22].name = "convertersIdx";
TMP907[8] = &TMP895[23];
TMP895[23].kind = 1;
TMP895[23].offset = offsetof(Trodreader270030, initidx);
TMP895[23].typ = (&NTI108);
TMP895[23].name = "initIdx";
TMP907[9] = &TMP895[24];
TMP895[24].kind = 1;
TMP895[24].offset = offsetof(Trodreader270030, interfidx);
TMP895[24].typ = (&NTI108);
TMP895[24].name = "interfIdx";
TMP907[10] = &TMP895[25];
TMP895[25].kind = 1;
TMP895[25].offset = offsetof(Trodreader270030, compilerprocsidx);
TMP895[25].typ = (&NTI108);
TMP895[25].name = "compilerProcsIdx";
TMP907[11] = &TMP895[26];
TMP895[26].kind = 1;
TMP895[26].offset = offsetof(Trodreader270030, methodsidx);
TMP895[26].typ = (&NTI108);
TMP895[26].name = "methodsIdx";
TMP907[12] = &TMP895[27];
TMP895[27].kind = 1;
TMP895[27].offset = offsetof(Trodreader270030, filename);
TMP895[27].typ = (&NTI149);
TMP895[27].name = "filename";
TMP907[13] = &TMP895[28];
NTI270028.size = sizeof(Tindex270028);
NTI270028.kind = 18;
NTI270028.base = 0;
NTI270028.flags = 2;
TMP908[0] = &TMP895[30];
TMP895[30].kind = 1;
TMP895[30].offset = offsetof(Tindex270028, lastidxkey);
TMP895[30].typ = (&NTI108);
TMP895[30].name = "lastIdxKey";
TMP908[1] = &TMP895[31];
TMP895[31].kind = 1;
TMP895[31].offset = offsetof(Tindex270028, lastidxval);
TMP895[31].typ = (&NTI108);
TMP895[31].name = "lastIdxVal";
TMP908[2] = &TMP895[32];
TMP895[32].kind = 1;
TMP895[32].offset = offsetof(Tindex270028, tab);
TMP895[32].typ = (&NTI235274);
TMP895[32].name = "tab";
TMP908[3] = &TMP895[33];
TMP895[33].kind = 1;
TMP895[33].offset = offsetof(Tindex270028, r);
TMP895[33].typ = (&NTI149);
TMP895[33].name = "r";
TMP908[4] = &TMP895[34];
TMP895[34].kind = 1;
TMP895[34].offset = offsetof(Tindex270028, offset);
TMP895[34].typ = (&NTI108);
TMP895[34].name = "offset";
TMP895[29].len = 5; TMP895[29].kind = 2; TMP895[29].sons = &TMP908[0];
NTI270028.node = &TMP895[29];
TMP895[28].kind = 1;
TMP895[28].offset = offsetof(Trodreader270030, index);
TMP895[28].typ = (&NTI270028);
TMP895[28].name = "index";
TMP907[14] = &TMP895[35];
TMP895[35].kind = 1;
TMP895[35].offset = offsetof(Trodreader270030, imports);
TMP895[35].typ = (&NTI270028);
TMP895[35].name = "imports";
TMP907[15] = &TMP895[36];
TMP895[36].kind = 1;
TMP895[36].offset = offsetof(Trodreader270030, readerindex);
TMP895[36].typ = (&NTI108);
TMP895[36].name = "readerIndex";
TMP907[16] = &TMP895[37];
TMP895[37].kind = 1;
TMP895[37].offset = offsetof(Trodreader270030, line);
TMP895[37].typ = (&NTI108);
TMP895[37].name = "line";
TMP907[17] = &TMP895[38];
TMP895[38].kind = 1;
TMP895[38].offset = offsetof(Trodreader270030, moduleid);
TMP895[38].typ = (&NTI108);
TMP895[38].name = "moduleID";
TMP907[18] = &TMP895[39];
TMP895[39].kind = 1;
TMP895[39].offset = offsetof(Trodreader270030, syms);
TMP895[39].typ = (&NTI270063);
TMP895[39].name = "syms";
TMP907[19] = &TMP895[40];
TMP895[40].kind = 1;
TMP895[40].offset = offsetof(Trodreader270030, memfile);
TMP895[40].typ = (&NTI268208);
TMP895[40].name = "memfile";
TMP907[20] = &TMP895[41];
TMP895[41].kind = 1;
TMP895[41].offset = offsetof(Trodreader270030, methods);
TMP895[41].typ = (&NTI227811);
TMP895[41].name = "methods";
TMP907[21] = &TMP895[42];
TMP895[42].kind = 1;
TMP895[42].offset = offsetof(Trodreader270030, origfile);
TMP895[42].typ = (&NTI149);
TMP895[42].name = "origFile";
TMP907[22] = &TMP895[43];
TMP895[43].kind = 1;
TMP895[43].offset = offsetof(Trodreader270030, inviewmode);
TMP895[43].typ = (&NTI138);
TMP895[43].name = "inViewMode";
TMP895[14].len = 23; TMP895[14].kind = 2; TMP895[14].sons = &TMP907[0];
NTI270030.node = &TMP895[14];
NTI270032.size = sizeof(Trodreader270030*);
NTI270032.kind = 22;
NTI270032.base = (&NTI270030);
NTI270032.marker = TMP916;
TMP895[13].kind = 1;
TMP895[13].offset = offsetof(Tfilemodulerec272296, rd);
TMP895[13].typ = (&NTI270032);
TMP895[13].name = "rd";
TMP903[3] = &TMP895[44];
TMP895[44].kind = 1;
TMP895[44].offset = offsetof(Tfilemodulerec272296, hash);
TMP895[44].typ = (&NTI203009);
TMP895[44].name = "hash";
TMP903[4] = &TMP895[45];
TMP895[45].kind = 1;
TMP895[45].offset = offsetof(Tfilemodulerec272296, hashdone);
TMP895[45].typ = (&NTI138);
TMP895[45].name = "hashDone";
TMP895[0].len = 5; TMP895[0].kind = 2; TMP895[0].sons = &TMP903[0];
NTI272296.node = &TMP895[0];
NTI272298.size = sizeof(Tfilemodulemap272298*);
NTI272298.kind = 24;
NTI272298.base = (&NTI272296);
NTI272298.marker = TMP917;
}

