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

#include "nimbase.h"
#include <string.h>
#include <setjmp.h>
#include <stdio.h>
typedef struct Tstrtable223813 Tstrtable223813;
typedef struct Tsymseq223811 Tsymseq223811;
typedef struct Tidtable223859 Tidtable223859;
typedef struct Tidpairseq223857 Tidpairseq223857;
typedef struct Tfilemodulemap268298 Tfilemodulemap268298;
typedef struct Tfilemodulerec268296 Tfilemodulerec268296;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Trodreader266030 Trodreader266030;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct TY223932 TY223932;
typedef struct Tindex266028 Tindex266028;
typedef struct Tiitable231274 Tiitable231274;
typedef struct Tiipairseq231272 Tiipairseq231272;
typedef struct Table266063 Table266063;
typedef struct Keyvaluepairseq266066 Keyvaluepairseq266066;
typedef struct Memfile264208 Memfile264208;
typedef struct Cell48947 Cell48947;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48959 Cellset48959;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct Memregion30891 Memregion30891;
typedef struct Smallchunk30843 Smallchunk30843;
typedef struct Llchunk30885 Llchunk30885;
typedef struct Bigchunk30845 Bigchunk30845;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30889 Avlnode30889;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Tsym223841 Tsym223841;
typedef struct Tidobj196015 Tidobj196015;
typedef struct Ttypeseq223843 Ttypeseq223843;
typedef struct Tscope223835 Tscope223835;
typedef struct TY223944 TY223944;
typedef struct Ttype223847 Ttype223847;
typedef struct Tident196021 Tident196021;
typedef struct Tlineinfo188352 Tlineinfo188352;
typedef struct Tnode223809 Tnode223809;
typedef struct Tloc223823 Tloc223823;
typedef struct Ropeobj174009 Ropeobj174009;
typedef struct Tlib223827 Tlib223827;
typedef struct Tnodeseq223803 Tnodeseq223803;
typedef struct Tlistentry139022 Tlistentry139022;
typedef struct TY90959 TY90959;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct Tidpair223855 Tidpair223855;
typedef struct Tiipair231270 Tiipair231270;
typedef struct Keyvaluepair266069 Keyvaluepair266069;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Tinstantiation223831 Tinstantiation223831;
struct  Tstrtable223813  {
NI counter;
Tsymseq223811* data;
};
struct  Tidtable223859  {
NI counter;
Tidpairseq223857* data;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Sha1digest199009[20];
struct  Tfilemodulerec268296  {
NimStringDesc* filename;
NU8 reason;
Trodreader266030* rd;
Sha1digest199009 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  Tiitable231274  {
NI counter;
Tiipairseq231272* data;
};
struct  Tindex266028  {
NI lastidxkey;
NI lastidxval;
Tiitable231274 tab;
NimStringDesc* r;
NI offset;
};
struct  Table266063  {
Keyvaluepairseq266066* data;
NI counter;
};
struct  Memfile264208  {
void* mem;
NI size;
int handle;
};
struct  Trodreader266030  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY223932* moddeps;
TY223932* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex266028 index;
Tindex266028 imports;
NI readerindex;
NI line;
NI moduleid;
Table266063 syms;
Memfile264208 memfile;
Tsymseq223811* methods;
NimStringDesc* origfile;
NIM_BOOL inviewmode;
};
struct  Cell48947  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48963  {
NI len;
NI cap;
Cell48947** d;
};
struct  Cellset48959  {
NI counter;
NI max;
Pagedesc48955* head;
Pagedesc48955** data;
};
typedef Smallchunk30843* TY30906[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30891  {
NI minlargeobj;
NI maxlargeobj;
TY30906 freesmallchunks;
Llchunk30885* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30845* freechunkslist;
Intset30817 chunkstarts;
Avlnode30889* root;
Avlnode30889* deleted;
Avlnode30889* last;
Avlnode30889* 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;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 tempstack;
NI recgclock;
Memregion30891 region;
Gcstat51014 stat;
};
struct  Tidobj196015  {
  TNimObject Sup;
NI id;
};
struct  Tlineinfo188352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc223823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype223847* t;
Ropeobj174009* r;
Ropeobj174009* heaproot;
};
struct  Tsym223841  {
  Tidobj196015 Sup;
NU8 kind;
union{
struct {Ttypeseq223843* typeinstcache;
Tscope223835* typscope;
} S1;
struct {TY223944* procinstcache;
Tsym223841* gcunsafetyreason;
} S2;
struct {TY223944* usedgenerics;
Tstrtable223813 tab;
} S3;
struct {Tsym223841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype223847* typ;
Tident196021* name;
Tlineinfo188352 info;
Tsym223841* owner;
NU32 flags;
Tnode223809* ast;
NU32 options;
NI position;
NI offset;
Tloc223823 loc;
Tlib223827* annex;
Tnode223809* constraint;
};
struct  Ttype223847  {
  Tidobj196015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq223843* sons;
Tnode223809* n;
Tsym223841* owner;
Tsym223841* sym;
Tsym223841* destructor;
Tsym223841* deepcopy;
Tsym223841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc223823 loc;
};
struct  Tnode223809  {
Ttype223847* typ;
Tlineinfo188352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym223841* sym;
} S4;
struct {Tident196021* ident;
} S5;
struct {Tnodeseq223803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tlistentry139022  {
  TNimObject Sup;
Tlistentry139022* prev;
Tlistentry139022* next;
};
struct  Tlib223827  {
  Tlistentry139022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj174009* name;
Tnode223809* path;
};
struct TY90959 {
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* TY192829[4];
typedef NimStringDesc* TY266021[9];
struct  Tidpair223855  {
Tidobj196015* key;
TNimObject* val;
};
struct  Tiipair231270  {
NI key;
NI val;
};
struct Keyvaluepair266069 {
NI Field0;
NI Field1;
Tsym223841* Field2;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30822[8];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30822 bits;
};
struct  Basechunk30841  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30843  {
  Basechunk30841 Sup;
Smallchunk30843* next;
Smallchunk30843* prev;
Freecell30833* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30885  {
NI size;
NI acc;
Llchunk30885* next;
};
struct  Bigchunk30845  {
  Basechunk30841 Sup;
Bigchunk30845* next;
Bigchunk30845* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30822 bits;
};
typedef Avlnode30889* TY30896[2];
struct  Avlnode30889  {
TY30896 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope223835  {
NI depthlevel;
Tstrtable223813 symbols;
Tnodeseq223803* usingsyms;
Tscope223835* parent;
};
struct  Tident196021  {
  Tidobj196015 Sup;
NimStringDesc* s;
Tident196021* next;
NI h;
};
struct  Ropeobj174009  {
  TNimObject Sup;
Ropeobj174009* left;
Ropeobj174009* right;
NI length;
NimStringDesc* data;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Tinstantiation223831  {
Tsym223841* sym;
Ttypeseq223843* concretetypes;
TY223932* usedby;
NI compilesid;
};
struct Tfilemodulemap268298 {
  TGenericSeq Sup;
  Tfilemodulerec268296 data[SEQ_DECL_SIZE];
};
struct TY223932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Tsymseq223811 {
  TGenericSeq Sup;
  Tsym223841* data[SEQ_DECL_SIZE];
};
struct Tidpairseq223857 {
  TGenericSeq Sup;
  Tidpair223855 data[SEQ_DECL_SIZE];
};
struct Tiipairseq231272 {
  TGenericSeq Sup;
  Tiipair231270 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq266066 {
  TGenericSeq Sup;
  Keyvaluepair266069 data[SEQ_DECL_SIZE];
};
struct Ttypeseq223843 {
  TGenericSeq Sup;
  Ttype223847* data[SEQ_DECL_SIZE];
};
struct TY223944 {
  TGenericSeq Sup;
  Tinstantiation223831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq223803 {
  TGenericSeq Sup;
  Tnode223809* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP909)(void* p, NI op);
N_NIMCALL(void, TMP910)(void* p, NI op);
static N_INLINE(void, nimGCunref)(void* p);
static N_INLINE(void, decref_54604)(Cell48947* c);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
static N_INLINE(NIM_BOOL, canbecycleroot_52667)(Cell48947* c);
static N_INLINE(void, rtladdcycleroot_53423)(Cell48947* c);
N_NOINLINE(void, incl_49665)(Cellset48959* s, Cell48947* cell);
static N_INLINE(Cell48947*, usrtocell_52646)(void* usr);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, initidtable_227057)(Tidtable223859* x);
N_NIMCALL(void, initstrtable_227007)(Tstrtable223813* x);
static N_INLINE(void, Gcdisable_11201)(void);
N_NIMCALL(void, rawloadstub_266106)(Tsym223841* s);
N_NIMCALL(void, internalerror_194191)(NimStringDesc* errmsg);
N_NIMCALL(NI, iitableget_231289)(Tiitable231274 t, NI key);
N_NIMCALL(Tsym223841*, decodesymsafepos_268328)(Trodreader266030* rd, NI offset, Tlineinfo188352 info);
N_NIMCALL(void, internalerror_194172)(Tlineinfo188352 info, NimStringDesc* errmsg);
N_NIMCALL(Tsym223841*, decodesym_266686)(Trodreader266030* r, Tlineinfo188352 info);
N_NIMCALL(NI, decodevint_230356)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_222440)(NI id);
N_NIMCALL(Tident196021*, getident_196463)(NimStringDesc* identifier);
N_NIMCALL(NimStringDesc*, decodestr_230154)(NCSTRING s, NI* pos);
N_NIMCALL(Tsym223841*, getordefault_266734)(Table266063 t, NI key);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, HEX5BHEX5DHEX3D_266801)(Table266063* t, NI key, Tsym223841* val);
N_NIMCALL(void, registerid_222201)(Tidobj196015* id);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Ttype223847*, rrgettype_266125)(Trodreader266030* r, NI id, Tlineinfo188352 info);
N_NIMCALL(TNimObject*, idtableget_231189)(Tidtable223859 t, NI key);
N_NIMCALL(Ttype223847*, decodetype_266491)(Trodreader266030* r, Tlineinfo188352 info);
N_NIMCALL(void, idtableput_231196)(Tidtable223859* t, Tidobj196015* key, TNimObject* val);
N_NIMCALL(Tnode223809*, decodenode_266395)(Trodreader266030* r, Tlineinfo188352 finfo);
N_NIMCALL(Tnode223809*, decodenodelazybody_266243)(Trodreader266030* r, Tlineinfo188352 finfo, Tsym223841* belongsto);
N_NIMCALL(Tnode223809*, newnodei_225351)(NU8 kind, Tlineinfo188352 info);
N_NIMCALL(void, decodelineinfo_266133)(Trodreader266030* r, Tlineinfo188352* info);
N_NIMCALL(Tlineinfo188352, newlineinfo_189266)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_230512)(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(Tsym223841*, rrgetsym_266117)(Trodreader266030* r, NI id, Tlineinfo188352 info);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, encodevint_230294)(NI x, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Trodreader266030*, getreader_268396)(NI moduleid);
N_NIMCALL(void, addsonnilallowed_227550)(Tnode223809* father, Tnode223809* son);
N_NIMCALL(void, skipnode_266174)(Trodreader266030* r);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(Tlineinfo188352, unknownlineinfo_189408)(void);
N_NIMCALL(void, decodeloc_266406)(Trodreader266030* r, Tloc223823* loc, Tlineinfo188352 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Ropeobj174009*, rope_174322)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_227498)(Ttype223847* father, Ttype223847* son);
N_NIMCALL(Tlib223827*, decodelib_266638)(Trodreader266030* r, Tlineinfo188352 info);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_55022)(Cell48947* c);
static N_INLINE(void, Gcenable_11203)(void);
static N_INLINE(NI, getid_222404)(void);
N_NIMCALL(void, loadmaxids_222506)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_122481)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_268760)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_189652)(NI32 fileidx);
N_NIMCALL(void, gethash_268722)(NI32 fileidx, Sha1digest199009* Result);
N_NIMCALL(NimStringDesc*, HEX24_194279)(TY90959 x);
N_NIMCALL(void, securehashfile_199034)(NimStringDesc* filename, Sha1digest199009* Result);
N_NIMCALL(NimStringDesc*, tofullpath_189662)(NI32 fileidx);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(NimStringDesc*, togeneratedfile_166158)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_166144)(NimStringDesc* path);
N_NIMCALL(Trodreader266030*, newrodreader_267959)(NimStringDesc* modfilename, Sha1digest199009 hash, NI readerindex);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(Memfile264208, open_264807)(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_268023)(NI initialsize, Table266063* Result);
N_NIMCALL(NIM_BOOL, startswith_267930)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_231282)(Tiitable231274* 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_267581)(Trodreader266030* r, Sha1digest199009 hash);
N_NIMCALL(NimStringDesc*, rdword_267260)(Trodreader266030* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_199152)(Sha1digest199009 a, Sha1digest199009 b);
N_NIMCALL(void, parsesecurehash_199107)(NimStringDesc* hash, Sha1digest199009* Result);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_267550)(NU8 old, NU8 new_267553);
N_NIMCALL(NIM_BOOL, isdefined_197167)(Tident196021* symbol);
N_NIMCALL(NI, countdefinedsymbols_197211)(void);
N_NIMCALL(NimStringDesc*, findmodule_166549)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_189253)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, skipsection_267173)(Trodreader266030* r);
N_NIMCALL(void, processindex_267458)(Trodreader266030* r, Tindex266028* idx, FILE* outf);
N_NIMCALL(void, iitableput_231296)(Tiitable231274* t, NI key, NI val);
N_NIMCALL(void, write_16911)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_192636)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_265249)(Memfile264208* f);
N_NIMCALL(void, processinterf_267320)(Trodreader266030* r, Tsym223841* module);
N_NIMCALL(Tsym223841*, newstub_267297)(Trodreader266030* r, NimStringDesc* name, NI id);
N_NIMCALL(void, strtableadd_231103)(Tstrtable223813* t, Tsym223841* n);
N_NIMCALL(void, processcompilerprocs_267378)(Trodreader266030* r, Tsym223841* module);
N_NIMCALL(void, loadconverters_268658)(Trodreader266030* r);
N_NIMCALL(void, loadmethods_268685)(Trodreader266030* r);
N_NIMCALL(Tnode223809*, newnode_224401)(NU8 kind);
N_NIMCALL(void, addson_225819)(Tnode223809* father, Tnode223809* son);
static N_INLINE(NI, len_224098)(Tnode223809* n);
STRING_LITERAL(TMP1043, "loadStub", 8);
STRING_LITERAL(TMP1044, "loadStub: invalid key", 21);
STRING_LITERAL(TMP1067, "dataIdx == 0", 12);
STRING_LITERAL(TMP1068, "decodeSym: no id", 16);
STRING_LITERAL(TMP1070, "decodeSym: no ident", 19);
STRING_LITERAL(TMP1071, "decodeSym: wrong id", 19);
STRING_LITERAL(TMP1072, "rrGetType", 9);
STRING_LITERAL(TMP1073, "decodeType: no id", 17);
STRING_LITERAL(TMP1075, "", 0);
STRING_LITERAL(TMP1076, "decodeNode: nkIdent", 19);
STRING_LITERAL(TMP1078, "missing from both indexes: +", 28);
STRING_LITERAL(TMP1079, "rrGetSym: no reader found: +", 28);
STRING_LITERAL(TMP1080, "decodeNode: nkSym", 17);
STRING_LITERAL(TMP1081, "decodeNode: \')\' missing", 23);
STRING_LITERAL(TMP1082, "decodeNode: \'(\' missing ", 24);
STRING_LITERAL(TMP1083, "decodeLoc ", 10);
STRING_LITERAL(TMP1084, "decodeType ^(", 13);
STRING_LITERAL(TMP1085, "decodeLib: 1", 12);
STRING_LITERAL(TMP1086, "decodeLib: 2", 12);
STRING_LITERAL(TMP1087, "loadStub: wrong symbol", 22);
STRING_LITERAL(TMP1088, "loadStub: wrong ID", 18);
STRING_LITERAL(TMP1531, "compiler/rodread.nim", 20);
NIM_CONST TY90959 TMP1530 = {((NimStringDesc*) &TMP1531),
((NI) 800)}
;
STRING_LITERAL(TMP1532, "rod", 3);
STRING_LITERAL(TMP1535, "NIM:", 4);
STRING_LITERAL(TMP1536, "1215", 4);
STRING_LITERAL(TMP1537, "HASH", 4);
STRING_LITERAL(TMP1538, "ID", 2);
STRING_LITERAL(TMP1539, "ORIGFILE", 8);
STRING_LITERAL(TMP1540, "OPTIONS", 7);
STRING_LITERAL(TMP1541, "GOPTIONS", 8);
STRING_LITERAL(TMP1542, "CMD", 3);
STRING_LITERAL(TMP1543, "DEFINES", 7);
STRING_LITERAL(TMP1544, "FILES", 5);
STRING_LITERAL(TMP1545, "INCLUDES", 8);
STRING_LITERAL(TMP1546, "DEPS", 4);
STRING_LITERAL(TMP1547, "INTERF", 6);
STRING_LITERAL(TMP1548, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1549, "INDEX", 5);
STRING_LITERAL(TMP1550, "IMPORTS", 7);
STRING_LITERAL(TMP1551, "CONVERTERS", 10);
STRING_LITERAL(TMP1552, "METHODS", 7);
STRING_LITERAL(TMP1553, "DATA", 4);
STRING_LITERAL(TMP1554, "INIT", 4);
STRING_LITERAL(TMP1576, "skipSection ", 12);
STRING_LITERAL(TMP1577, " ", 1);
STRING_LITERAL(TMP1578, "\012", 1);
STRING_LITERAL(TMP1579, "invalid section: \'", 18);
STRING_LITERAL(TMP1580, "\' at ", 5);
STRING_LITERAL(TMP1581, " in ", 4);
STRING_LITERAL(TMP1582, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1583, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1584, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1585, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1586, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1587, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1588, "an include file edited: $1", 26);
STRING_LITERAL(TMP1589, "a module $1 depends on has changed", 34);
NIM_CONST TY266021 reasontofrmt_266018 = {((NimStringDesc*) &TMP1075),
((NimStringDesc*) &TMP1582),
((NimStringDesc*) &TMP1583),
((NimStringDesc*) &TMP1584),
((NimStringDesc*) &TMP1585),
((NimStringDesc*) &TMP1586),
((NimStringDesc*) &TMP1587),
((NimStringDesc*) &TMP1588),
((NimStringDesc*) &TMP1589)}
;
STRING_LITERAL(TMP1590, "handleSymbolFile", 16);
STRING_LITERAL(TMP1591, "processInterf", 13);
STRING_LITERAL(TMP1592, "processCompilerProcs", 20);
STRING_LITERAL(TMP1593, "importConverters", 16);
STRING_LITERAL(TMP1594, "loadMethods", 11);
STRING_LITERAL(TMP1596, "loadInitSection", 15);
Tstrtable223813 rodcompilerprocs_266089;
Tidtable223859 gtypetable_266112;
Tfilemodulemap268298* gmods_268323;
TNimType NTI268296; /* TFileModuleRec */
extern TNimType NTI149; /* string */
TNimType NTI266005; /* TReasonForRecompile */
extern TNimType NTI4011; /* RootObj */
TNimType NTI266030; /* TRodReader */
extern TNimType NTI108; /* int */
extern TNimType NTI151; /* cstring */
extern TNimType NTI165017; /* TOptions */
extern TNimType NTI223932; /* seq[int32] */
TNimType NTI266028; /* TIndex */
extern TNimType NTI231274; /* TIITable */
extern TNimType NTI266063; /* Table */
extern TNimType NTI264208; /* MemFile */
extern TNimType NTI223811; /* TSymSeq */
extern TNimType NTI138; /* bool */
TNimType NTI266032; /* PRodReader */
extern TNimType NTI199009; /* Sha1Digest */
TNimType NTI268298; /* TFileModuleMap */
extern Gcheap51018 gch_51059;
extern NI gfrontendid_222012;
extern TNimType NTI223807; /* PSym */
extern TNimType NTI223841; /* TSym */
extern TNimType NTI223805; /* PType */
extern TNimType NTI223847; /* TType */
extern TNimType NTI223839; /* PLib */
extern TNimType NTI223827; /* TLib */
extern NU32 gglobaloptions_165132;
extern NimStringDesc* gprojectpath_165235;
extern NimStringDesc* gprojectname_165234;
extern TSafePoint* exchandler_20843;
extern TNimType NTI4033; /* OSError */
extern Exception* currexception_20845;
extern NU32 goptions_165130;
extern NU8 gcmd_165134;
extern NI32 systemfileidx_188633;
extern Tnode223809* emptynode_224807;
N_NIMCALL(void, TMP909)(void* p, NI op) {
	Trodreader266030* a;
	a = (Trodreader266030*)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, TMP910)(void* p, NI op) {
	Tfilemodulemap268298* a;
	NI LOC1;
	a = (Tfilemodulemap268298*)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)(Cell48947* c) {
	addzct_52617((&gch_51059.zct), c);
}

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

static N_INLINE(void, rtladdcycleroot_53423)(Cell48947* 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)(Cell48947* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((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(Cell48947*, usrtocell_52646)(void* usr) {
	Cell48947* result;
	result = 0;
	result = ((Cell48947*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(Cell48947))))));
	return result;
}

static N_INLINE(void, nimGCunref)(void* p) {
	Cell48947* 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_222440)(NI id) {
	gfrontendid_222012 = ((gfrontendid_222012 >= (NI)(id + ((NI) 1))) ? gfrontendid_222012 : (NI)(id + ((NI) 1)));
}

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

N_NIMCALL(void, decodelineinfo_266133)(Trodreader266030* r, Tlineinfo188352* 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_230356((*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_230356((*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_230356((*r).s, (&(*r).pos));
				(*info) = newlineinfo_189266((*r).files->data[LOC25], ((NI) ((*info).line)), ((NI) ((*info).col)));
			}
			LA23: ;
		}
		LA13: ;
	}
	LA3: ;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell48947* c;
	c = usrtocell_52646(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((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(Trodreader266030*, getreader_268396)(NI moduleid) {
	Trodreader266030* result;
{	result = 0;
	{
		NI i_268426;
		NI HEX3Atmp_268440;
		NI res_268443;
		i_268426 = 0;
		HEX3Atmp_268440 = 0;
		HEX3Atmp_268440 = ((gmods_268323 ? gmods_268323->Sup.len : 0) - 1);
		res_268443 = ((NI) 0);
		{
			while (1) {
				if (!(res_268443 <= HEX3Atmp_268440)) goto LA3;
				i_268426 = res_268443;
				result = gmods_268323->data[i_268426].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_268443 += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym223841*, rrgetsym_266117)(Trodreader266030* r, NI id, Tlineinfo188352 info) {
	Tsym223841* result;
	result = 0;
	result = getordefault_266734((*r).syms, id);
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA3;
		d = iitableget_231289((*r).index.tab, id);
		{
			NI moduleid;
			Trodreader266030* rd;
			if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA7;
			moduleid = iitableget_231289((*r).imports.tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC13;
				if (!(moduleid < ((NI) 0))) goto LA11;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_230294(id, (&x));
				LOC13 = 0;
				LOC13 = rawNewString(x->Sup.len + 28);
appendString(LOC13, ((NimStringDesc*) &TMP1078));
appendString(LOC13, x);
				internalerror_194172(info, LOC13);
			}
			LA11: ;
			rd = getreader_268396(moduleid);
			d = iitableget_231289((*rd).index.tab, id);
			{
				if (!!((d == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA16;
				result = decodesymsafepos_268328(rd, d, info);
			}
			goto LA14;
			LA16: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC19;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_230294(id, (&x));
				LOC19 = 0;
				LOC19 = rawNewString(x->Sup.len + 28);
appendString(LOC19, ((NimStringDesc*) &TMP1079));
appendString(LOC19, x);
				internalerror_194172(info, LOC19);
			}
			LA14: ;
		}
		goto LA5;
		LA7: ;
		{
			result = decodesymsafepos_268328(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_266106(result);
	}
	LA25: ;
	return result;
}

N_NIMCALL(void, skipnode_266174)(Trodreader266030* 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(Tnode223809*, decodenodelazybody_266243)(Trodreader266030* r, Tlineinfo188352 finfo, Tsym223841* belongsto) {
	Tnode223809* 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_230356((*r).s, (&(*r).pos));
		result = newnodei_225351(((NU8) (LOC9)), finfo);
		decodelineinfo_266133(r, (&(*result).info));
		{
			NI LOC14;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA12;
			(*r).pos += ((NI) 1);
			LOC14 = 0;
			LOC14 = decodevint_230356((*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_230356((*r).s, (&(*r).pos));
			asgnRefNoCycle((void**) (&(*result).typ), rrgettype_266125(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_230512((*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_230154((*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_230154((*r).s, (&(*r).pos)));
			}
			goto LA30;
			LA32: ;
			{
				NimStringDesc* LOC35;
				LOC35 = 0;
				LOC35 = (*result).kindU.S3.strval; (*result).kindU.S3.strval = copyStringRC1(((NimStringDesc*) &TMP1075));
				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_230154((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S5.ident), getident_196463(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_194172((*result).info, ((NimStringDesc*) &TMP1076));
			}
			LA37: ;
		}
		break;
		case ((NU8) 3):
		{
			{
				NI id;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA45;
				(*r).pos += ((NI) 1);
				id = decodevint_230356((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S4.sym), rrgetsym_266117(r, id, (*result).info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_194172((*result).info, ((NimStringDesc*) &TMP1080));
			}
			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_227550(result, NIM_NIL);
						(*belongsto).offset = (*r).pos;
						skipnode_266174(r);
					}
					goto LA51;
					LA55: ;
					{
						Tnode223809* LOC58;
						LOC58 = 0;
						LOC58 = decodenodelazybody_266243(r, (*result).info, NIM_NIL);
						addsonnilallowed_227550(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_194172((*result).info, ((NimStringDesc*) &TMP1081));
		}
		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*) &TMP1082));
appendString(LOC65, LOC66);
		internalerror_194172(finfo, LOC65);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode223809*, decodenode_266395)(Trodreader266030* r, Tlineinfo188352 finfo) {
	Tnode223809* result;
	result = 0;
	result = decodenodelazybody_266243(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_266406)(Trodreader266030* r, Tloc223823* loc, Tlineinfo188352 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_230356((*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_230356((*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_230356((*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_230356((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).t), rrgettype_266125(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_230154((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).r), rope_174322(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*) &TMP1083));
appendChar(LOC40, (*r).s[(*r).pos]);
			internalerror_194172(info, LOC40);
		}
		LA35: ;
	}
	LA3: ;
}

N_NIMCALL(Ttype223847*, decodetype_266491)(Trodreader266030* r, Tlineinfo188352 info) {
	Ttype223847* result;
	NI LOC9;
	Tidobj196015* 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 = (Ttype223847*) newObj((&NTI223805), sizeof(Ttype223847));
	(*result).Sup.Sup.m_type = (&NTI223847);
	LOC9 = 0;
	LOC9 = decodevint_230356((*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_230356((*r).s, (&(*r).pos));
		setid_222440((*result).Sup.id);
		{
			Tidobj196015* LOC18;
			if (!NIM_FALSE) goto LA16;
			LOC18 = 0;
			LOC18 = &result->Sup;
			registerid_222201(LOC18);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_194172(info, ((NimStringDesc*) &TMP1073));
	}
	LA10: ;
	LOC20 = 0;
	LOC20 = &result->Sup;
	LOC21 = 0;
	LOC21 = &result->Sup.Sup;
	idtableput_231196((&gtypetable_266112), LOC20, LOC21);
	{
		Tlineinfo188352 LOC26;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA24;
		LOC26 = unknownlineinfo_189408();
		asgnRefNoCycle((void**) (&(*result).n), decodenode_266395(r, LOC26));
	}
	LA24: ;
	{
		NI LOC31;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA29;
		(*r).pos += ((NI) 1);
		LOC31 = 0;
		LOC31 = decodevint_230356((*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_230356((*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_230356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_266117(r, LOC41, info));
	}
	LA39: ;
	{
		NI LOC46;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA44;
		(*r).pos += ((NI) 1);
		LOC46 = 0;
		LOC46 = decodevint_230356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).sym), rrgetsym_266117(r, LOC46, info));
	}
	LA44: ;
	{
		NI LOC51;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(47))) goto LA49;
		(*r).pos += ((NI) 1);
		LOC51 = 0;
		LOC51 = decodevint_230356((*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_230356((*r).s, (&(*r).pos));
		(*result).align = ((NI16) (LOC57));
	}
	goto LA53;
	LA55: ;
	{
		(*result).align = ((NI16) 2);
	}
	LA53: ;
	decodeloc_266406(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*) &TMP1084));
appendChar(LOC70, (*r).s[(*r).pos]);
					internalerror_194172(info, LOC70);
				}
				LA65: ;
				rawaddson_227498(result, NIM_NIL);
			}
			goto LA61;
			LA63: ;
			{
				NI d;
				Ttype223847* LOC72;
				d = decodevint_230356((*r).s, (&(*r).pos));
				LOC72 = 0;
				LOC72 = rrgettype_266125(r, d, info);
				rawaddson_227498(result, LOC72);
			}
			LA61: ;
		} LA60: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ttype223847*, rrgettype_266125)(Trodreader266030* r, NI id, Tlineinfo188352 info) {
	Ttype223847* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_231189(gtypetable_266112, id);
	result = ((Ttype223847*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).pos;
		d = iitableget_231289((*r).index.tab, id);
		{
			if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA8;
			internalerror_194172(info, ((NimStringDesc*) &TMP1072));
		}
		LA8: ;
		(*r).pos = (NI)(d + (*r).dataidx);
		result = decodetype_266491(r, info);
		(*r).pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(Tlib223827*, decodelib_266638)(Trodreader266030* r, Tlineinfo188352 info) {
	Tlib223827* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(124))) goto LA3;
		result = (Tlib223827*) newObj((&NTI223839), sizeof(Tlib223827));
		(*result).Sup.Sup.m_type = (&NTI223827);
		(*r).pos += ((NI) 1);
		LOC5 = 0;
		LOC5 = decodevint_230356((*r).s, (&(*r).pos));
		(*result).kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA8;
			internalerror_194191(((NimStringDesc*) &TMP1085));
		}
		LA8: ;
		(*r).pos += ((NI) 1);
		LOC10 = 0;
		LOC10 = decodestr_230154((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).name), rope_174322(LOC10));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA13;
			internalerror_194191(((NimStringDesc*) &TMP1086));
		}
		LA13: ;
		(*r).pos += ((NI) 1);
		asgnRefNoCycle((void**) (&(*result).path), decodenode_266395(r, info));
	}
	LA3: ;
	return result;
}

static N_INLINE(void, incref_55022)(Cell48947* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((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) {
	{
		Cell48947* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_52646(src);
		incref_55022(LOC5);
	}
	LA3: ;
	{
		Cell48947* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_52646((*dest));
		decref_54604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Tsym223841*, decodesym_266686)(Trodreader266030* r, Tlineinfo188352 info) {
	Tsym223841* result;
	NI id;
	Tident196021* 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_230356((*r).s, (&(*r).pos));
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		id = decodevint_230356((*r).s, (&(*r).pos));
		setid_222440(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_194172(info, ((NimStringDesc*) &TMP1068));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA17;
		(*r).pos += ((NI) 1);
		LOC19 = 0;
		LOC19 = decodestr_230154((*r).s, (&(*r).pos));
		ident = getident_196463(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_194172(info, ((NimStringDesc*) &TMP1070));
	}
	LA15: ;
	result = getordefault_266734((*r).syms, id);
	{
		if (!(result == NIM_NIL)) goto LA23;
		result = (Tsym223841*) newObj((&NTI223807), sizeof(Tsym223841));
		(*result).Sup.Sup.m_type = (&NTI223841);
		(*result).Sup.id = id;
		HEX5BHEX5DHEX3D_266801((&(*r).syms), (*result).Sup.id, result);
		{
			Tidobj196015* LOC29;
			if (!NIM_FALSE) goto LA27;
			LOC29 = 0;
			LOC29 = &result->Sup;
			registerid_222201(LOC29);
		}
		LA27: ;
	}
	goto LA21;
	LA23: ;
	{
		if (!!(((*result).Sup.id == id))) goto LA31;
		internalerror_194172(info, ((NimStringDesc*) &TMP1071));
	}
	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)), (&NTI223841));
		(*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_230356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).typ), rrgettype_266125(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_266133(r, (&(*result).info));
	{
		NI LOC48;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA46;
		(*r).pos += ((NI) 1);
		LOC48 = 0;
		LOC48 = decodevint_230356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_266117(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_230356((*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_230356((*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_230356((*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_230356((*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_230356((*r).s, (&(*r).pos));
	}
	goto LA72;
	LA74: ;
	{
		(*result).offset = ((NI) -1);
	}
	LA72: ;
	decodeloc_266406(r, (&(*result).loc), (*result).info);
	asgnRef((void**) (&(*result).annex), decodelib_266638(r, info));
	{
		Tlineinfo188352 LOC81;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(35))) goto LA79;
		(*r).pos += ((NI) 1);
		LOC81 = unknownlineinfo_189408();
		asgnRefNoCycle((void**) (&(*result).constraint), decodenode_266395(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_266243(r, (*result).info, result));
			(*result).position = (*r).readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) (&(*result).ast), decodenode_266395(r, (*result).info));
		}
		LA86: ;
	}
	LA84: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym223841*, decodesymsafepos_268328)(Trodreader266030* rd, NI offset, Tlineinfo188352 info) {
	Tsym223841* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).dataidx == ((NI) 0))) goto LA3;
		internalerror_194172(info, ((NimStringDesc*) &TMP1067));
	}
	LA3: ;
	oldpos = (*rd).pos;
	(*rd).pos = (NI)(offset + (*rd).dataidx);
	result = decodesym_266686(rd, info);
	(*rd).pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_266106)(Tsym223841* s) {
	Trodreader266030* rd;
	NI theid;
	NI d;
	Tsym223841* rs;
	Tlineinfo188352 LOC9;
	{
		if (!!(((*s).kind == ((NU8) 23)))) goto LA3;
		internalerror_194191(((NimStringDesc*) &TMP1043));
	}
	LA3: ;
	rd = gmods_268323->data[(*s).position].rd;
	theid = (*s).Sup.id;
	d = iitableget_231289((*rd).index.tab, (*s).Sup.id);
	{
		if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA7;
		internalerror_194191(((NimStringDesc*) &TMP1044));
	}
	LA7: ;
	LOC9 = unknownlineinfo_189408();
	rs = decodesymsafepos_268328(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_194172((*rs).info, ((NimStringDesc*) &TMP1087));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.id == theid))) goto LA15;
		internalerror_194172((*rs).info, ((NimStringDesc*) &TMP1088));
	}
	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_269052)(Tsym223841* s) {
	Gcdisable_11201();
	rawloadstub_266106(s);
	Gcenable_11203();
}

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

N_NIMCALL(void, gethash_268722)(NI32 fileidx, Sha1digest199009* Result) {
	NimStringDesc* LOC12;
{	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < (gmods_268323 ? gmods_268323->Sup.len : 0));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_194279(TMP1530);
		internalerror_194191(LOC7);
	}
	LA5: ;
	{
		if (!gmods_268323->data[fileidx].hashdone) goto LA10;
		memcpy((void*)(*Result), (NIM_CONST void*)gmods_268323->data[fileidx].hash, sizeof(Sha1digest199009));
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofullpath_189662(fileidx);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI199009));
	securehashfile_199034(LOC12, Result);
	memcpy((void*)gmods_268323->data[fileidx].hash, (NIM_CONST void*)(*Result), sizeof(Sha1digest199009));
	}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_267930)(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(Trodreader266030*, newrodreader_267959)(NimStringDesc* modfilename, Sha1digest199009 hash, NI readerindex) {
	Trodreader266030* result;
	TSafePoint TMP1533;
	Trodreader266030* r;
	NimStringDesc* LOC4;
{	result = 0;
	result = (Trodreader266030*) newObj((&NTI266032), sizeof(Trodreader266030));
	(*result).Sup.m_type = (&NTI266030);
	pushSafePoint(&TMP1533);
	TMP1533.status = _setjmp(TMP1533.context);
	if (TMP1533.status == 0) {
		(*result).memfile = open_264807(modfilename, ((NU8) 0), ((NI) -1), ((NI) 0), ((NI) -1));
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI4033))) {
			TMP1533.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1533.status != 0) reraiseException();
	if ((*result).files) nimGCunrefNoCycle((*result).files);
	(*result).files = (TY223932*) newSeqRC1((&NTI223932), 0);
	if ((*result).moddeps) nimGCunrefNoCycle((*result).moddeps);
	(*result).moddeps = (TY223932*) newSeqRC1((&NTI223932), 0);
	if ((*result).methods) nimGCunrefNoCycle((*result).methods);
	(*result).methods = (Tsymseq223811*) newSeqRC1((&NTI223811), 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_268023(((NI) 64), (&(*r).syms));
	(*r).s = ((NCSTRING) ((*r).memfile.mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_267930((*r).s, ((NimStringDesc*) &TMP1535), ((NI) 0));
		if (!LOC7) goto LA8;
		initiitable_231282((&(*r).index.tab));
		initiitable_231282((&(*r).imports.tab));
		(*r).pos += ((NI) 4);
		version = copyString(((NimStringDesc*) &TMP1075));
		{
			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*) &TMP1536)))) goto LA18;
			result = NIM_NIL;
		}
		LA18: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_267260)(Trodreader266030* r) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1075));
	{
		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_267550)(NU8 old, NU8 new_267553) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!(old == new_267553)) 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_267553)&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_267173)(Trodreader266030* 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*) &TMP1576));
appendString(LOC25, LOC26);
		internalerror_194191(LOC25);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_267458)(Trodreader266030* r, Tindex266028* 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_230356((*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_230356((*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_231296((&(*idx).tab), key, val);
			{
				TY192829 LOC15;
				if (!!(outf == 0)) goto LA13;
				memset((void*)LOC15, 0, sizeof(LOC15));
				LOC15[0] = nimIntToStr(key);
				LOC15[1] = copyString(((NimStringDesc*) &TMP1577));
				LOC15[2] = nimIntToStr(val);
				LOC15[3] = copyString(((NimStringDesc*) &TMP1578));
				write_16911(outf, LOC15, 4);
			}
			LA13: ;
			(*idx).lastidxkey = key;
			(*idx).lastidxval = val;
			setid_222440(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_267581)(Trodreader266030* r, Sha1digest199009 hash) {
	NimStringDesc* w;
	NI d;
	Sha1digest199009 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_267260(r);
			{
				if (!!(((*r).reason == ((NU8) 1)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			switch (hashString(section) & 31) {
			case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1538))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1539))) goto LA9;
break;
			case 1: 
if (eqStrings(section, ((NimStringDesc*) &TMP1541))) goto LA11;
break;
			case 4: 
if (eqStrings(section, ((NimStringDesc*) &TMP1545))) goto LA15;
break;
			case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1544))) goto LA14;
break;
			case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1542))) goto LA12;
break;
			case 11: 
if (eqStrings(section, ((NimStringDesc*) &TMP1543))) goto LA13;
break;
			case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1554))) goto LA24;
break;
			case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1553))) goto LA23;
break;
			case 14: 
if (eqStrings(section, ((NimStringDesc*) &TMP1537))) goto LA7;
if (eqStrings(section, ((NimStringDesc*) &TMP1540))) goto LA10;
break;
			case 21: 
if (eqStrings(section, ((NimStringDesc*) &TMP1550))) goto LA20;
break;
			case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1548))) goto LA18;
if (eqStrings(section, ((NimStringDesc*) &TMP1549))) goto LA19;
break;
			case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1546))) goto LA16;
break;
			case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1551))) goto LA21;
break;
			case 31: 
if (eqStrings(section, ((NimStringDesc*) &TMP1547))) goto LA17;
if (eqStrings(section, ((NimStringDesc*) &TMP1552))) goto LA22;
break;
			}
			goto LA25;
			LA7: ;
			{
				(*r).pos += ((NI) 1);
				{
					NimStringDesc* LOC30;
					Sha1digest199009 LOC31;
					NIM_BOOL LOC32;
					LOC30 = 0;
					LOC30 = decodestr_230154((*r).s, (&(*r).pos));
					memset((void*)LOC31, 0, sizeof(LOC31));
					parsesecurehash_199107(LOC30, LOC31);
					LOC32 = 0;
					LOC32 = HEX3DHEX3D_199152(hash, LOC31);
					if (!!(LOC32)) goto LA33;
					(*r).reason = ((NU8) 4);
				}
				LA33: ;
			}
			goto LA26;
			LA8: ;
			{
				(*r).pos += ((NI) 1);
				(*r).moduleid = decodevint_230356((*r).s, (&(*r).pos));
				setid_222440((*r).moduleid);
			}
			goto LA26;
			LA9: ;
			{
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*r).origfile), decodestr_230154((*r).s, (&(*r).pos)));
			}
			goto LA26;
			LA10: ;
			{
				NI LOC38;
				(*r).pos += ((NI) 1);
				LOC38 = 0;
				LOC38 = decodevint_230356((*r).s, (&(*r).pos));
				(*r).options = ((NU32) (((NI32) (LOC38))));
				{
					if (!!((goptions_165130 == (*r).options))) goto LA41;
					(*r).reason = ((NU8) 6);
				}
				LA41: ;
			}
			goto LA26;
			LA11: ;
			{
				NU32 dep;
				NI LOC44;
				(*r).pos += ((NI) 1);
				LOC44 = 0;
				LOC44 = decodevint_230356((*r).s, (&(*r).pos));
				dep = ((NU32) (((NI32) (LOC44))));
				{
					if (!!((gglobaloptions_165132 == dep))) goto LA47;
					(*r).reason = ((NU8) 6);
				}
				LA47: ;
			}
			goto LA26;
			LA12: ;
			{
				NU8 dep;
				NI LOC50;
				(*r).pos += ((NI) 1);
				LOC50 = 0;
				LOC50 = decodevint_230356((*r).s, (&(*r).pos));
				dep = ((NU8) (((NI32) (LOC50))));
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = cmdchangetriggersrecompilation_267550(dep, gcmd_165134);
					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_230154((*r).s, (&(*r).pos));
						d += ((NI) 1);
						{
							Tident196021* LOC61;
							NIM_BOOL LOC62;
							LOC61 = 0;
							LOC61 = getident_196463(w);
							LOC62 = 0;
							LOC62 = isdefined_197167(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_197211();
					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_230154((*r).s, (&(*r).pos));
						resolvedpath = findmodule_166549(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_189253(finalpath);
						(*r).files = (TY223932*) 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_230356((*r).s, (&(*r).pos));
						w = tofullpath_189662((*r).files->data[LOC90]);
						(*r).pos += ((NI) 1);
						LOC91 = 0;
						LOC91 = decodestr_230154((*r).s, (&(*r).pos));
						chckNil((void*)inclhash);
						memset((void*)inclhash, 0, sizeof(inclhash));
						parsesecurehash_199107(LOC91, inclhash);
						{
							if (!((*r).reason == ((NU8) 1))) goto LA94;
							{
								NIM_BOOL LOC98;
								NIM_BOOL LOC99;
								Sha1digest199009 LOC101;
								NIM_BOOL LOC102;
								LOC98 = 0;
								LOC99 = 0;
								LOC99 = nosexistsFile(w);
								LOC98 = !(LOC99);
								if (LOC98) goto LA100;
								memset((void*)LOC101, 0, sizeof(LOC101));
								securehashfile_199034(w, LOC101);
								LOC102 = 0;
								LOC102 = HEX3DHEX3D_199152(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_230356((*r).s, (&(*r).pos));
						(*r).moddeps = (TY223932*) 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_267173(r);
			}
			goto LA26;
			LA18: ;
			{
				(*r).compilerprocsidx = (NI)((*r).pos + ((NI) 2));
				skipsection_267173(r);
			}
			goto LA26;
			LA19: ;
			{
				processindex_267458(r, (&(*r).index), NIM_NIL);
			}
			goto LA26;
			LA20: ;
			{
				processindex_267458(r, (&(*r).imports), NIM_NIL);
			}
			goto LA26;
			LA21: ;
			{
				(*r).convertersidx = (NI)((*r).pos + ((NI) 1));
				skipsection_267173(r);
			}
			goto LA26;
			LA22: ;
			{
				(*r).methodsidx = (NI)((*r).pos + ((NI) 1));
				skipsection_267173(r);
			}
			goto LA26;
			LA23: ;
			{
				(*r).dataidx = (NI)((*r).pos + ((NI) 2));
				goto LA1;
			}
			goto LA26;
			LA24: ;
			{
				(*r).initidx = (NI)((*r).pos + ((NI) 2));
				skipsection_267173(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*) &TMP1579));
appendString(LOC130, section);
appendString(LOC130, ((NimStringDesc*) &TMP1580));
appendString(LOC130, LOC131);
appendString(LOC130, ((NimStringDesc*) &TMP1581));
appendString(LOC130, (*r).filename);
				internalerror_194191(LOC130);
				skipsection_267173(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_268760)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	Sha1digest199009 hash;
	Trodreader266030* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
{	result = 0;
	{
		if (!((gmods_268323 ? gmods_268323->Sup.len : 0) <= ((NI) (fileidx)))) goto LA3;
		gmods_268323 = (Tfilemodulemap268298*) setLengthSeq(&(gmods_268323)->Sup, sizeof(Tfilemodulerec268296), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_268323->data[fileidx].reason == ((NU8) 0)))) goto LA7;
		result = gmods_268323->data[fileidx].reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_189652(fileidx);
	memset((void*)hash, 0, sizeof(hash));
	chckNil((void*)hash);
	memset((void*)hash, 0, sizeof(hash));
	gethash_268722(fileidx, hash);
	gmods_268323->data[fileidx].reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_166144(filename);
	rodfile = togeneratedfile_166158(LOC9, ((NimStringDesc*) &TMP1532));
	r = newrodreader_267959(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_267581(r, hash);
		result = (*r).reason;
		{
			NU8 res;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_268760(systemfileidx_188633);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			{
				NI i_268875;
				NI HEX3Atmp_268928;
				NI res_268931;
				i_268875 = 0;
				HEX3Atmp_268928 = 0;
				HEX3Atmp_268928 = ((*r).moddeps ? ((*r).moddeps->Sup.len-1) : -1);
				res_268931 = ((NI) 0);
				{
					while (1) {
						if (!(res_268931 <= HEX3Atmp_268928)) goto LA31;
						i_268875 = res_268931;
						res = checkdep_268760((*r).moddeps->data[i_268875]);
						{
							if (!!((res == ((NU8) 1)))) goto LA34;
							result = ((NU8) 8);
						}
						LA34: ;
						res_268931 += ((NI) 1);
					} LA31: ;
				}
			}
		}
		LA23: ;
	}
	LA10: ;
	{
		NimStringDesc* LOC40;
		if (!!((result == ((NU8) 1)))) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_266018[(result)- 0], filename);
		rawmessage_192636(((NU16) 276), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_165132 &(1<<((((NU8) 1))&31)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_265249((&(*r).memfile));
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) (&gmods_268323->data[fileidx].rd), r);
	gmods_268323->data[fileidx].reason = result;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym223841*, newstub_267297)(Trodreader266030* r, NimStringDesc* name, NI id) {
	Tsym223841* result;
	result = 0;
	result = (Tsym223841*) newObj((&NTI223807), sizeof(Tsym223841));
	(*result).Sup.Sup.m_type = (&NTI223841);
	(*result).kind = ((NU8) 23);
	(*result).Sup.id = id;
	asgnRefNoCycle((void**) (&(*result).name), getident_196463(name));
	(*result).position = (*r).readerindex;
	setid_222440(id);
	{
		Tidobj196015* LOC5;
		if (!NIM_FALSE) goto LA3;
		LOC5 = 0;
		LOC5 = &result->Sup;
		registerid_222201(LOC5);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_267320)(Trodreader266030* r, Tsym223841* module) {
	{
		if (!((*r).interfidx == ((NI) 0))) goto LA3;
		internalerror_194191(((NimStringDesc*) &TMP1591));
	}
	LA3: ;
	(*r).pos = (*r).interfidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym223841* 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_230154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_230356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = newstub_267297(r, w, key);
			asgnRefNoCycle((void**) (&(*s).owner), module);
			strtableadd_231103((&(*module).kindU.S3.tab), s);
			HEX5BHEX5DHEX3D_266801((&(*r).syms), (*s).Sup.id, s);
		} LA6: ;
	}
}

N_NIMCALL(void, processcompilerprocs_267378)(Trodreader266030* r, Tsym223841* module) {
	{
		if (!((*r).compilerprocsidx == ((NI) 0))) goto LA3;
		internalerror_194191(((NimStringDesc*) &TMP1592));
	}
	LA3: ;
	(*r).pos = (*r).compilerprocsidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym223841* 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_230154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_230356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = getordefault_266734((*r).syms, key);
			{
				if (!(s == NIM_NIL)) goto LA11;
				s = newstub_267297(r, w, key);
				asgnRefNoCycle((void**) (&(*s).owner), module);
				HEX5BHEX5DHEX3D_266801((&(*r).syms), (*s).Sup.id, s);
			}
			LA11: ;
			strtableadd_231103((&rodcompilerprocs_266089), s);
		} LA6: ;
	}
}

N_NIMCALL(void, loadconverters_268658)(Trodreader266030* 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_194191(((NimStringDesc*) &TMP1593));
	}
	LA5: ;
	(*r).pos = (*r).convertersidx;
	{
		while (1) {
			NI d;
			Tlineinfo188352 LOC9;
			Tsym223841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_230356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_189408();
			LOC10 = 0;
			LOC10 = rrgetsym_266117(r, d, LOC9);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(void, loadmethods_268685)(Trodreader266030* 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_194191(((NimStringDesc*) &TMP1594));
	}
	LA5: ;
	(*r).pos = (*r).methodsidx;
	{
		while (1) {
			NI d;
			Tlineinfo188352 LOC9;
			Tsym223841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_230356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_189408();
			LOC10 = 0;
			LOC10 = rrgetsym_266117(r, d, LOC9);
			(*r).methods = (Tsymseq223811*) incrSeqV2(&((*r).methods)->Sup, sizeof(Tsym223841*));
			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(Trodreader266030*, handlesymbolfile_266094)(Tsym223841* module) {
	Trodreader266030* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
{	result = 0;
	fileidx = ((NI32) ((*module).position));
	{
		if (!!(((gglobaloptions_165132 &(1<<((((NU8) 14))&31)))!=0))) goto LA3;
		(*module).Sup.id = getid_222404();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_122481(gprojectpath_165235, gprojectname_165234);
	loadmaxids_222506(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_268760(fileidx);
	{
		if (!(gmods_268323->data[fileidx].reason == ((NU8) 0))) goto LA9;
		internalerror_194191(((NimStringDesc*) &TMP1590));
	}
	LA9: ;
	result = gmods_268323->data[fileidx].rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.id = (*result).moduleid;
		HEX5BHEX5DHEX3D_266801((&(*result).syms), (*module).Sup.id, module);
		processinterf_267320(result, module);
		processcompilerprocs_267378(result, module);
		loadconverters_268658(result);
		loadmethods_268685(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.id = getid_222404();
	}
	LA11: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode223809*, loadinitsection_266100)(Trodreader266030* r) {
	Tnode223809* 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_194191(((NimStringDesc*) &TMP1596));
	}
	LA5: ;
	oldpos = (*r).pos;
	(*r).pos = (*r).initidx;
	result = newnode_224401(((NU8) 115));
	{
		while (1) {
			NIM_BOOL LOC9;
			NI d;
			NI p;
			Tlineinfo188352 LOC11;
			Tnode223809* 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_230356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			p = (*r).pos;
			(*r).pos = (NI)(d + (*r).dataidx);
			LOC11 = unknownlineinfo_189408();
			LOC12 = 0;
			LOC12 = decodenode_266395(r, LOC11);
			addson_225819(result, LOC12);
			(*r).pos = p;
		} LA8: ;
	}
	(*r).pos = oldpos;
	return result;
}

static N_INLINE(NI, len_224098)(Tnode223809* 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(Tnode223809*, getbody_269061)(Tsym223841* s) {
	Tnode223809* result;
{	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = (*s).ast == 0;
		if (LOC3) goto LA4;
		LOC5 = 0;
		LOC5 = len_224098((*s).ast);
		LOC3 = (LOC5 <= ((NI) 6));
		LA4: ;
		if (!LOC3) goto LA6;
		result = emptynode_224807;
		goto BeforeRet;
	}
	LA6: ;
	result = (*(*s).ast).kindU.S6.sons->data[((NI) 6)];
	{
		Trodreader266030* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA10;
		r = gmods_268323->data[(*s).position].rd;
		oldpos = (*r).pos;
		(*r).pos = (*s).offset;
		result = decodenode_266395(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_268323) nimGCunref(gmods_268323);
	gmods_268323 = (Tfilemodulemap268298*) newSeqRC1((&NTI268298), 0);
	initidtable_227057((&gtypetable_266112));
	initstrtable_227007((&rodcompilerprocs_266089));
}

NIM_EXTERNC N_NOINLINE(void, compiler_rodreadDatInit000)(void) {
static TNimNode* TMP896[5];
static TNimNode* TMP897[9];
NI TMP899;
static char* NIM_CONST TMP898[9] = {
"rrEmpty", 
"rrNone", 
"rrRodDoesNotExist", 
"rrRodInvalid", 
"rrHashChange", 
"rrDefines", 
"rrOptions", 
"rrInclDeps", 
"rrModDeps"};
static TNimNode* TMP900[23];
static TNimNode* TMP901[5];
static TNimNode TMP888[46];
NTI268296.size = sizeof(Tfilemodulerec268296);
NTI268296.kind = 18;
NTI268296.base = 0;
TMP896[0] = &TMP888[1];
TMP888[1].kind = 1;
TMP888[1].offset = offsetof(Tfilemodulerec268296, filename);
TMP888[1].typ = (&NTI149);
TMP888[1].name = "filename";
TMP896[1] = &TMP888[2];
NTI266005.size = sizeof(NU8);
NTI266005.kind = 14;
NTI266005.base = 0;
NTI266005.flags = 3;
for (TMP899 = 0; TMP899 < 9; TMP899++) {
TMP888[TMP899+3].kind = 1;
TMP888[TMP899+3].offset = TMP899;
TMP888[TMP899+3].name = TMP898[TMP899];
TMP897[TMP899] = &TMP888[TMP899+3];
}
TMP888[12].len = 9; TMP888[12].kind = 2; TMP888[12].sons = &TMP897[0];
NTI266005.node = &TMP888[12];
TMP888[2].kind = 1;
TMP888[2].offset = offsetof(Tfilemodulerec268296, reason);
TMP888[2].typ = (&NTI266005);
TMP888[2].name = "reason";
TMP896[2] = &TMP888[13];
NTI266030.size = sizeof(Trodreader266030);
NTI266030.kind = 17;
NTI266030.base = (&NTI4011);
TMP900[0] = &TMP888[15];
TMP888[15].kind = 1;
TMP888[15].offset = offsetof(Trodreader266030, pos);
TMP888[15].typ = (&NTI108);
TMP888[15].name = "pos";
TMP900[1] = &TMP888[16];
TMP888[16].kind = 1;
TMP888[16].offset = offsetof(Trodreader266030, s);
TMP888[16].typ = (&NTI151);
TMP888[16].name = "s";
TMP900[2] = &TMP888[17];
TMP888[17].kind = 1;
TMP888[17].offset = offsetof(Trodreader266030, options);
TMP888[17].typ = (&NTI165017);
TMP888[17].name = "options";
TMP900[3] = &TMP888[18];
TMP888[18].kind = 1;
TMP888[18].offset = offsetof(Trodreader266030, reason);
TMP888[18].typ = (&NTI266005);
TMP888[18].name = "reason";
TMP900[4] = &TMP888[19];
TMP888[19].kind = 1;
TMP888[19].offset = offsetof(Trodreader266030, moddeps);
TMP888[19].typ = (&NTI223932);
TMP888[19].name = "modDeps";
TMP900[5] = &TMP888[20];
TMP888[20].kind = 1;
TMP888[20].offset = offsetof(Trodreader266030, files);
TMP888[20].typ = (&NTI223932);
TMP888[20].name = "files";
TMP900[6] = &TMP888[21];
TMP888[21].kind = 1;
TMP888[21].offset = offsetof(Trodreader266030, dataidx);
TMP888[21].typ = (&NTI108);
TMP888[21].name = "dataIdx";
TMP900[7] = &TMP888[22];
TMP888[22].kind = 1;
TMP888[22].offset = offsetof(Trodreader266030, convertersidx);
TMP888[22].typ = (&NTI108);
TMP888[22].name = "convertersIdx";
TMP900[8] = &TMP888[23];
TMP888[23].kind = 1;
TMP888[23].offset = offsetof(Trodreader266030, initidx);
TMP888[23].typ = (&NTI108);
TMP888[23].name = "initIdx";
TMP900[9] = &TMP888[24];
TMP888[24].kind = 1;
TMP888[24].offset = offsetof(Trodreader266030, interfidx);
TMP888[24].typ = (&NTI108);
TMP888[24].name = "interfIdx";
TMP900[10] = &TMP888[25];
TMP888[25].kind = 1;
TMP888[25].offset = offsetof(Trodreader266030, compilerprocsidx);
TMP888[25].typ = (&NTI108);
TMP888[25].name = "compilerProcsIdx";
TMP900[11] = &TMP888[26];
TMP888[26].kind = 1;
TMP888[26].offset = offsetof(Trodreader266030, methodsidx);
TMP888[26].typ = (&NTI108);
TMP888[26].name = "methodsIdx";
TMP900[12] = &TMP888[27];
TMP888[27].kind = 1;
TMP888[27].offset = offsetof(Trodreader266030, filename);
TMP888[27].typ = (&NTI149);
TMP888[27].name = "filename";
TMP900[13] = &TMP888[28];
NTI266028.size = sizeof(Tindex266028);
NTI266028.kind = 18;
NTI266028.base = 0;
NTI266028.flags = 2;
TMP901[0] = &TMP888[30];
TMP888[30].kind = 1;
TMP888[30].offset = offsetof(Tindex266028, lastidxkey);
TMP888[30].typ = (&NTI108);
TMP888[30].name = "lastIdxKey";
TMP901[1] = &TMP888[31];
TMP888[31].kind = 1;
TMP888[31].offset = offsetof(Tindex266028, lastidxval);
TMP888[31].typ = (&NTI108);
TMP888[31].name = "lastIdxVal";
TMP901[2] = &TMP888[32];
TMP888[32].kind = 1;
TMP888[32].offset = offsetof(Tindex266028, tab);
TMP888[32].typ = (&NTI231274);
TMP888[32].name = "tab";
TMP901[3] = &TMP888[33];
TMP888[33].kind = 1;
TMP888[33].offset = offsetof(Tindex266028, r);
TMP888[33].typ = (&NTI149);
TMP888[33].name = "r";
TMP901[4] = &TMP888[34];
TMP888[34].kind = 1;
TMP888[34].offset = offsetof(Tindex266028, offset);
TMP888[34].typ = (&NTI108);
TMP888[34].name = "offset";
TMP888[29].len = 5; TMP888[29].kind = 2; TMP888[29].sons = &TMP901[0];
NTI266028.node = &TMP888[29];
TMP888[28].kind = 1;
TMP888[28].offset = offsetof(Trodreader266030, index);
TMP888[28].typ = (&NTI266028);
TMP888[28].name = "index";
TMP900[14] = &TMP888[35];
TMP888[35].kind = 1;
TMP888[35].offset = offsetof(Trodreader266030, imports);
TMP888[35].typ = (&NTI266028);
TMP888[35].name = "imports";
TMP900[15] = &TMP888[36];
TMP888[36].kind = 1;
TMP888[36].offset = offsetof(Trodreader266030, readerindex);
TMP888[36].typ = (&NTI108);
TMP888[36].name = "readerIndex";
TMP900[16] = &TMP888[37];
TMP888[37].kind = 1;
TMP888[37].offset = offsetof(Trodreader266030, line);
TMP888[37].typ = (&NTI108);
TMP888[37].name = "line";
TMP900[17] = &TMP888[38];
TMP888[38].kind = 1;
TMP888[38].offset = offsetof(Trodreader266030, moduleid);
TMP888[38].typ = (&NTI108);
TMP888[38].name = "moduleID";
TMP900[18] = &TMP888[39];
TMP888[39].kind = 1;
TMP888[39].offset = offsetof(Trodreader266030, syms);
TMP888[39].typ = (&NTI266063);
TMP888[39].name = "syms";
TMP900[19] = &TMP888[40];
TMP888[40].kind = 1;
TMP888[40].offset = offsetof(Trodreader266030, memfile);
TMP888[40].typ = (&NTI264208);
TMP888[40].name = "memfile";
TMP900[20] = &TMP888[41];
TMP888[41].kind = 1;
TMP888[41].offset = offsetof(Trodreader266030, methods);
TMP888[41].typ = (&NTI223811);
TMP888[41].name = "methods";
TMP900[21] = &TMP888[42];
TMP888[42].kind = 1;
TMP888[42].offset = offsetof(Trodreader266030, origfile);
TMP888[42].typ = (&NTI149);
TMP888[42].name = "origFile";
TMP900[22] = &TMP888[43];
TMP888[43].kind = 1;
TMP888[43].offset = offsetof(Trodreader266030, inviewmode);
TMP888[43].typ = (&NTI138);
TMP888[43].name = "inViewMode";
TMP888[14].len = 23; TMP888[14].kind = 2; TMP888[14].sons = &TMP900[0];
NTI266030.node = &TMP888[14];
NTI266032.size = sizeof(Trodreader266030*);
NTI266032.kind = 22;
NTI266032.base = (&NTI266030);
NTI266032.marker = TMP909;
TMP888[13].kind = 1;
TMP888[13].offset = offsetof(Tfilemodulerec268296, rd);
TMP888[13].typ = (&NTI266032);
TMP888[13].name = "rd";
TMP896[3] = &TMP888[44];
TMP888[44].kind = 1;
TMP888[44].offset = offsetof(Tfilemodulerec268296, hash);
TMP888[44].typ = (&NTI199009);
TMP888[44].name = "hash";
TMP896[4] = &TMP888[45];
TMP888[45].kind = 1;
TMP888[45].offset = offsetof(Tfilemodulerec268296, hashdone);
TMP888[45].typ = (&NTI138);
TMP888[45].name = "hashDone";
TMP888[0].len = 5; TMP888[0].kind = 2; TMP888[0].sons = &TMP896[0];
NTI268296.node = &TMP888[0];
NTI268298.size = sizeof(Tfilemodulemap268298*);
NTI268298.kind = 24;
NTI268298.base = (&NTI268296);
NTI268298.marker = TMP910;
}

