/* 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 Tstrtable224813 Tstrtable224813;
typedef struct Tsymseq224811 Tsymseq224811;
typedef struct Tidtable224859 Tidtable224859;
typedef struct Tidpairseq224857 Tidpairseq224857;
typedef struct Tfilemodulemap269298 Tfilemodulemap269298;
typedef struct Tfilemodulerec269296 Tfilemodulerec269296;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Trodreader267030 Trodreader267030;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct TY224932 TY224932;
typedef struct Tindex267028 Tindex267028;
typedef struct Tiitable232274 Tiitable232274;
typedef struct Tiipairseq232272 Tiipairseq232272;
typedef struct Table267063 Table267063;
typedef struct Keyvaluepairseq267066 Keyvaluepairseq267066;
typedef struct Memfile265208 Memfile265208;
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 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 Tsym224841 Tsym224841;
typedef struct Tidobj197015 Tidobj197015;
typedef struct Ttypeseq224843 Ttypeseq224843;
typedef struct Tscope224835 Tscope224835;
typedef struct TY224944 TY224944;
typedef struct Ttype224847 Ttype224847;
typedef struct Tident197021 Tident197021;
typedef struct Tlineinfo189352 Tlineinfo189352;
typedef struct Tnode224809 Tnode224809;
typedef struct Tloc224823 Tloc224823;
typedef struct Ropeobj175009 Ropeobj175009;
typedef struct Tlib224827 Tlib224827;
typedef struct Tnodeseq224803 Tnodeseq224803;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct TY90959 TY90959;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct Tidpair224855 Tidpair224855;
typedef struct Tiipair232270 Tiipair232270;
typedef struct Keyvaluepair267069 Keyvaluepair267069;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tinstantiation224831 Tinstantiation224831;
struct  Tstrtable224813  {
NI counter;
Tsymseq224811* data;
};
struct  Tidtable224859  {
NI counter;
Tidpairseq224857* data;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Sha1digest200009[20];
struct  Tfilemodulerec269296  {
NimStringDesc* filename;
NU8 reason;
Trodreader267030* rd;
Sha1digest200009 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  Tiitable232274  {
NI counter;
Tiipairseq232272* data;
};
struct  Tindex267028  {
NI lastidxkey;
NI lastidxval;
Tiitable232274 tab;
NimStringDesc* r;
NI offset;
};
struct  Table267063  {
Keyvaluepairseq267066* data;
NI counter;
};
struct  Memfile265208  {
void* mem;
NI size;
int handle;
};
struct  Trodreader267030  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY224932* moddeps;
TY224932* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex267028 index;
Tindex267028 imports;
NI readerindex;
NI line;
NI moduleid;
Table267063 syms;
Memfile265208 memfile;
Tsymseq224811* 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 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;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 tempstack;
NI recgclock;
Memregion30890 region;
Gcstat51014 stat;
};
struct  Tidobj197015  {
  TNimObject Sup;
NI id;
};
struct  Tlineinfo189352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc224823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype224847* t;
Ropeobj175009* r;
Ropeobj175009* heaproot;
};
struct  Tsym224841  {
  Tidobj197015 Sup;
NU8 kind;
union{
struct {Ttypeseq224843* typeinstcache;
Tscope224835* typscope;
} S1;
struct {TY224944* procinstcache;
Tsym224841* gcunsafetyreason;
} S2;
struct {TY224944* usedgenerics;
Tstrtable224813 tab;
} S3;
struct {Tsym224841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype224847* typ;
Tident197021* name;
Tlineinfo189352 info;
Tsym224841* owner;
NU32 flags;
Tnode224809* ast;
NU32 options;
NI position;
NI offset;
Tloc224823 loc;
Tlib224827* annex;
Tnode224809* constraint;
};
struct  Ttype224847  {
  Tidobj197015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq224843* sons;
Tnode224809* n;
Tsym224841* owner;
Tsym224841* sym;
Tsym224841* destructor;
Tsym224841* deepcopy;
Tsym224841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc224823 loc;
};
struct  Tnode224809  {
Ttype224847* typ;
Tlineinfo189352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym224841* sym;
} S4;
struct {Tident197021* ident;
} S5;
struct {Tnodeseq224803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tlistentry140022  {
  TNimObject Sup;
Tlistentry140022* prev;
Tlistentry140022* next;
};
struct  Tlib224827  {
  Tlistentry140022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj175009* name;
Tnode224809* 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* TY193829[4];
typedef NimStringDesc* TY267021[9];
struct  Tidpair224855  {
Tidobj197015* key;
TNimObject* val;
};
struct  Tiipair232270  {
NI key;
NI val;
};
struct Keyvaluepair267069 {
NI Field0;
NI Field1;
Tsym224841* Field2;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48955  {
Pagedesc48955* 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  Tscope224835  {
NI depthlevel;
Tstrtable224813 symbols;
Tnodeseq224803* usingsyms;
Tscope224835* parent;
};
struct  Tident197021  {
  Tidobj197015 Sup;
NimStringDesc* s;
Tident197021* next;
NI h;
};
struct  Ropeobj175009  {
  TNimObject Sup;
Ropeobj175009* left;
Ropeobj175009* right;
NI length;
NimStringDesc* data;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct  Tinstantiation224831  {
Tsym224841* sym;
Ttypeseq224843* concretetypes;
TY224932* usedby;
NI compilesid;
};
struct Tfilemodulemap269298 {
  TGenericSeq Sup;
  Tfilemodulerec269296 data[SEQ_DECL_SIZE];
};
struct TY224932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Tsymseq224811 {
  TGenericSeq Sup;
  Tsym224841* data[SEQ_DECL_SIZE];
};
struct Tidpairseq224857 {
  TGenericSeq Sup;
  Tidpair224855 data[SEQ_DECL_SIZE];
};
struct Tiipairseq232272 {
  TGenericSeq Sup;
  Tiipair232270 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq267066 {
  TGenericSeq Sup;
  Keyvaluepair267069 data[SEQ_DECL_SIZE];
};
struct Ttypeseq224843 {
  TGenericSeq Sup;
  Ttype224847* data[SEQ_DECL_SIZE];
};
struct TY224944 {
  TGenericSeq Sup;
  Tinstantiation224831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq224803 {
  TGenericSeq Sup;
  Tnode224809* 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_228057)(Tidtable224859* x);
N_NIMCALL(void, initstrtable_228007)(Tstrtable224813* x);
static N_INLINE(void, Gcdisable_11201)(void);
N_NIMCALL(void, rawloadstub_267106)(Tsym224841* s);
N_NIMCALL(void, internalerror_195191)(NimStringDesc* errmsg);
N_NIMCALL(NI, iitableget_232289)(Tiitable232274 t, NI key);
N_NIMCALL(Tsym224841*, decodesymsafepos_269328)(Trodreader267030* rd, NI offset, Tlineinfo189352 info);
N_NIMCALL(void, internalerror_195172)(Tlineinfo189352 info, NimStringDesc* errmsg);
N_NIMCALL(Tsym224841*, decodesym_267689)(Trodreader267030* r, Tlineinfo189352 info);
N_NIMCALL(NI, decodevint_231356)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_223440)(NI id);
N_NIMCALL(Tident197021*, getident_197463)(NimStringDesc* identifier);
N_NIMCALL(NimStringDesc*, decodestr_231154)(NCSTRING s, NI* pos);
N_NIMCALL(Tsym224841*, getordefault_267737)(Table267063 t, NI key);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, HEX5BHEX5DHEX3D_267804)(Table267063* t, NI key, Tsym224841* val);
N_NIMCALL(void, registerid_223201)(Tidobj197015* id);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Ttype224847*, rrgettype_267125)(Trodreader267030* r, NI id, Tlineinfo189352 info);
N_NIMCALL(TNimObject*, idtableget_232189)(Tidtable224859 t, NI key);
N_NIMCALL(Ttype224847*, decodetype_267493)(Trodreader267030* r, Tlineinfo189352 info);
N_NIMCALL(void, idtableput_232196)(Tidtable224859* t, Tidobj197015* key, TNimObject* val);
N_NIMCALL(Tnode224809*, decodenode_267396)(Trodreader267030* r, Tlineinfo189352 finfo);
N_NIMCALL(Tnode224809*, decodenodelazybody_267243)(Trodreader267030* r, Tlineinfo189352 finfo, Tsym224841* belongsto);
N_NIMCALL(Tnode224809*, newnodei_226351)(NU8 kind, Tlineinfo189352 info);
N_NIMCALL(void, decodelineinfo_267133)(Trodreader267030* r, Tlineinfo189352* info);
N_NIMCALL(Tlineinfo189352, newlineinfo_190267)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_231512)(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(Tsym224841*, rrgetsym_267117)(Trodreader267030* r, NI id, Tlineinfo189352 info);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, encodevint_231294)(NI x, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Trodreader267030*, getreader_269396)(NI moduleid);
N_NIMCALL(void, addsonnilallowed_228550)(Tnode224809* father, Tnode224809* son);
N_NIMCALL(void, skipnode_267174)(Trodreader267030* r);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(Tlineinfo189352, unknownlineinfo_190411)(void);
N_NIMCALL(void, decodeloc_267407)(Trodreader267030* r, Tloc224823* loc, Tlineinfo189352 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Ropeobj175009*, rope_175322)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_228498)(Ttype224847* father, Ttype224847* son);
N_NIMCALL(Tlib224827*, decodelib_267641)(Trodreader267030* r, Tlineinfo189352 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_223404)(void);
N_NIMCALL(void, loadmaxids_223506)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_123481)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_269760)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_190655)(NI32 fileidx);
N_NIMCALL(void, gethash_269722)(NI32 fileidx, Sha1digest200009* Result);
N_NIMCALL(NimStringDesc*, HEX24_195279)(TY90959 x);
N_NIMCALL(void, securehashfile_200034)(NimStringDesc* filename, Sha1digest200009* Result);
N_NIMCALL(NimStringDesc*, tofullpath_190665)(NI32 fileidx);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(NimStringDesc*, togeneratedfile_167158)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_167144)(NimStringDesc* path);
N_NIMCALL(Trodreader267030*, newrodreader_268968)(NimStringDesc* modfilename, Sha1digest200009 hash, NI readerindex);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(Memfile265208, open_265807)(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_269032)(NI initialsize, Table267063* Result);
N_NIMCALL(NIM_BOOL, startswith_268939)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_232282)(Tiitable232274* 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_268586)(Trodreader267030* r, Sha1digest200009 hash);
N_NIMCALL(NimStringDesc*, rdword_268265)(Trodreader267030* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_200152)(Sha1digest200009 a, Sha1digest200009 b);
N_NIMCALL(void, parsesecurehash_200107)(NimStringDesc* hash, Sha1digest200009* Result);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_268555)(NU8 old, NU8 new_268558);
N_NIMCALL(NIM_BOOL, isdefined_198167)(Tident197021* symbol);
N_NIMCALL(NI, countdefinedsymbols_198211)(void);
N_NIMCALL(NimStringDesc*, findmodule_167549)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_190254)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, skipsection_268178)(Trodreader267030* r);
N_NIMCALL(void, processindex_268463)(Trodreader267030* r, Tindex267028* idx, FILE* outf);
N_NIMCALL(void, iitableput_232296)(Tiitable232274* t, NI key, NI val);
N_NIMCALL(void, write_16911)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_193636)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_266248)(Memfile265208* f);
N_NIMCALL(void, processinterf_268325)(Trodreader267030* r, Tsym224841* module);
N_NIMCALL(Tsym224841*, newstub_268302)(Trodreader267030* r, NimStringDesc* name, NI id);
N_NIMCALL(void, strtableadd_232103)(Tstrtable224813* t, Tsym224841* n);
N_NIMCALL(void, processcompilerprocs_268383)(Trodreader267030* r, Tsym224841* module);
N_NIMCALL(void, loadconverters_269658)(Trodreader267030* r);
N_NIMCALL(void, loadmethods_269685)(Trodreader267030* r);
N_NIMCALL(Tnode224809*, newnode_225401)(NU8 kind);
N_NIMCALL(void, addson_226819)(Tnode224809* father, Tnode224809* son);
static N_INLINE(NI, len_225098)(Tnode224809* 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(TMP1532, "compiler/rodread.nim", 20);
NIM_CONST TY90959 TMP1531 = {((NimStringDesc*) &TMP1532),
((NI) 800)}
;
STRING_LITERAL(TMP1533, "rod", 3);
STRING_LITERAL(TMP1536, "NIM:", 4);
STRING_LITERAL(TMP1537, "1215", 4);
STRING_LITERAL(TMP1538, "HASH", 4);
STRING_LITERAL(TMP1539, "ID", 2);
STRING_LITERAL(TMP1540, "ORIGFILE", 8);
STRING_LITERAL(TMP1541, "OPTIONS", 7);
STRING_LITERAL(TMP1542, "GOPTIONS", 8);
STRING_LITERAL(TMP1543, "CMD", 3);
STRING_LITERAL(TMP1544, "DEFINES", 7);
STRING_LITERAL(TMP1545, "FILES", 5);
STRING_LITERAL(TMP1546, "INCLUDES", 8);
STRING_LITERAL(TMP1547, "DEPS", 4);
STRING_LITERAL(TMP1548, "INTERF", 6);
STRING_LITERAL(TMP1549, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1550, "INDEX", 5);
STRING_LITERAL(TMP1551, "IMPORTS", 7);
STRING_LITERAL(TMP1552, "CONVERTERS", 10);
STRING_LITERAL(TMP1553, "METHODS", 7);
STRING_LITERAL(TMP1554, "DATA", 4);
STRING_LITERAL(TMP1555, "INIT", 4);
STRING_LITERAL(TMP1577, "skipSection ", 12);
STRING_LITERAL(TMP1578, " ", 1);
STRING_LITERAL(TMP1579, "\012", 1);
STRING_LITERAL(TMP1580, "invalid section: \'", 18);
STRING_LITERAL(TMP1581, "\' at ", 5);
STRING_LITERAL(TMP1582, " in ", 4);
STRING_LITERAL(TMP1583, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1584, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1585, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1586, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1587, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1588, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1589, "an include file edited: $1", 26);
STRING_LITERAL(TMP1590, "a module $1 depends on has changed", 34);
NIM_CONST TY267021 reasontofrmt_267018 = {((NimStringDesc*) &TMP1075),
((NimStringDesc*) &TMP1583),
((NimStringDesc*) &TMP1584),
((NimStringDesc*) &TMP1585),
((NimStringDesc*) &TMP1586),
((NimStringDesc*) &TMP1587),
((NimStringDesc*) &TMP1588),
((NimStringDesc*) &TMP1589),
((NimStringDesc*) &TMP1590)}
;
STRING_LITERAL(TMP1591, "handleSymbolFile", 16);
STRING_LITERAL(TMP1592, "processInterf", 13);
STRING_LITERAL(TMP1593, "processCompilerProcs", 20);
STRING_LITERAL(TMP1594, "importConverters", 16);
STRING_LITERAL(TMP1595, "loadMethods", 11);
STRING_LITERAL(TMP1597, "loadInitSection", 15);
Tstrtable224813 rodcompilerprocs_267089;
Tidtable224859 gtypetable_267112;
Tfilemodulemap269298* gmods_269323;
TNimType NTI269296; /* TFileModuleRec */
extern TNimType NTI149; /* string */
TNimType NTI267005; /* TReasonForRecompile */
extern TNimType NTI4011; /* RootObj */
TNimType NTI267030; /* TRodReader */
extern TNimType NTI108; /* int */
extern TNimType NTI151; /* cstring */
extern TNimType NTI166017; /* TOptions */
extern TNimType NTI224932; /* seq[int32] */
TNimType NTI267028; /* TIndex */
extern TNimType NTI232274; /* TIITable */
extern TNimType NTI267063; /* Table */
extern TNimType NTI265208; /* MemFile */
extern TNimType NTI224811; /* TSymSeq */
extern TNimType NTI138; /* bool */
TNimType NTI267032; /* PRodReader */
extern TNimType NTI200009; /* Sha1Digest */
TNimType NTI269298; /* TFileModuleMap */
extern Gcheap51018 gch_51059;
extern NI gfrontendid_223012;
extern TNimType NTI224807; /* PSym */
extern TNimType NTI224841; /* TSym */
extern TNimType NTI224805; /* PType */
extern TNimType NTI224847; /* TType */
extern TNimType NTI224839; /* PLib */
extern TNimType NTI224827; /* TLib */
extern NU32 gglobaloptions_166132;
extern NimStringDesc* gprojectpath_166235;
extern NimStringDesc* gprojectname_166234;
extern TSafePoint* exchandler_20843;
extern TNimType NTI4033; /* OSError */
extern Exception* currexception_20845;
extern NU32 goptions_166130;
extern NU8 gcmd_166134;
extern NI32 systemfileidx_189633;
extern Tnode224809* emptynode_225807;
N_NIMCALL(void, TMP909)(void* p, NI op) {
	Trodreader267030* a;
	a = (Trodreader267030*)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) {
	Tfilemodulemap269298* a;
	NI LOC1;
	a = (Tfilemodulemap269298*)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 (!((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(Cell48947*, usrtocell_52646)(void* usr) {
	Cell48947* result;
	result = 0;
	result = ((Cell48947*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((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_223440)(NI id) {
	gfrontendid_223012 = ((gfrontendid_223012 >= (NI)(id + ((NI) 1))) ? gfrontendid_223012 : (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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_54204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, decodelineinfo_267133)(Trodreader267030* r, Tlineinfo189352* 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_231356((*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_231356((*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_231356((*r).s, (&(*r).pos));
				(*info) = newlineinfo_190267((*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 (!((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(Trodreader267030*, getreader_269396)(NI moduleid) {
	Trodreader267030* result;
{	result = 0;
	{
		NI i_269426;
		NI HEX3Atmp_269440;
		NI res_269443;
		i_269426 = 0;
		HEX3Atmp_269440 = 0;
		HEX3Atmp_269440 = ((gmods_269323 ? gmods_269323->Sup.len : 0) - 1);
		res_269443 = ((NI) 0);
		{
			while (1) {
				if (!(res_269443 <= HEX3Atmp_269440)) goto LA3;
				i_269426 = res_269443;
				result = gmods_269323->data[i_269426].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_269443 += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym224841*, rrgetsym_267117)(Trodreader267030* r, NI id, Tlineinfo189352 info) {
	Tsym224841* result;
	result = 0;
	result = getordefault_267737((*r).syms, id);
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA3;
		d = iitableget_232289((*r).index.tab, id);
		{
			NI moduleid;
			Trodreader267030* rd;
			if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
			moduleid = iitableget_232289((*r).imports.tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC13;
				if (!(moduleid < ((NI) 0))) goto LA11;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_231294(id, (&x));
				LOC13 = 0;
				LOC13 = rawNewString(x->Sup.len + 28);
appendString(LOC13, ((NimStringDesc*) &TMP1078));
appendString(LOC13, x);
				internalerror_195172(info, LOC13);
			}
			LA11: ;
			rd = getreader_269396(moduleid);
			d = iitableget_232289((*rd).index.tab, id);
			{
				if (!!((d == ((NI) (-2147483647 -1))))) goto LA16;
				result = decodesymsafepos_269328(rd, d, info);
			}
			goto LA14;
			LA16: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC19;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_231294(id, (&x));
				LOC19 = 0;
				LOC19 = rawNewString(x->Sup.len + 28);
appendString(LOC19, ((NimStringDesc*) &TMP1079));
appendString(LOC19, x);
				internalerror_195172(info, LOC19);
			}
			LA14: ;
		}
		goto LA5;
		LA7: ;
		{
			result = decodesymsafepos_269328(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_267106(result);
	}
	LA25: ;
	return result;
}

N_NIMCALL(void, skipnode_267174)(Trodreader267030* 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(Tnode224809*, decodenodelazybody_267243)(Trodreader267030* r, Tlineinfo189352 finfo, Tsym224841* belongsto) {
	Tnode224809* 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_231356((*r).s, (&(*r).pos));
		result = newnodei_226351(((NU8) (LOC9)), finfo);
		decodelineinfo_267133(r, (&(*result).info));
		{
			NI LOC14;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA12;
			(*r).pos += ((NI) 1);
			LOC14 = 0;
			LOC14 = decodevint_231356((*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_231356((*r).s, (&(*r).pos));
			asgnRefNoCycle((void**) (&(*result).typ), rrgettype_267125(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_231512((*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_231154((*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_231154((*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_231154((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S5.ident), getident_197463(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_195172((*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_231356((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S4.sym), rrgetsym_267117(r, id, (*result).info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_195172((*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_228550(result, NIM_NIL);
						(*belongsto).offset = (*r).pos;
						skipnode_267174(r);
					}
					goto LA51;
					LA55: ;
					{
						Tnode224809* LOC58;
						LOC58 = 0;
						LOC58 = decodenodelazybody_267243(r, (*result).info, NIM_NIL);
						addsonnilallowed_228550(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_195172((*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_195172(finfo, LOC65);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode224809*, decodenode_267396)(Trodreader267030* r, Tlineinfo189352 finfo) {
	Tnode224809* result;
	result = 0;
	result = decodenodelazybody_267243(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_267407)(Trodreader267030* r, Tloc224823* loc, Tlineinfo189352 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_231356((*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_231356((*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_231356((*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_231356((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).t), rrgettype_267125(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_231154((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).r), rope_175322(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_195172(info, LOC40);
		}
		LA35: ;
	}
	LA3: ;
}

N_NIMCALL(Ttype224847*, decodetype_267493)(Trodreader267030* r, Tlineinfo189352 info) {
	Ttype224847* result;
	NI LOC9;
	Tidobj197015* 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 = (Ttype224847*) newObj((&NTI224805), sizeof(Ttype224847));
	(*result).Sup.Sup.m_type = (&NTI224847);
	LOC9 = 0;
	LOC9 = decodevint_231356((*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_231356((*r).s, (&(*r).pos));
		setid_223440((*result).Sup.id);
		{
			Tidobj197015* LOC18;
			if (!NIM_FALSE) goto LA16;
			LOC18 = 0;
			LOC18 = &result->Sup;
			registerid_223201(LOC18);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_195172(info, ((NimStringDesc*) &TMP1073));
	}
	LA10: ;
	LOC20 = 0;
	LOC20 = &result->Sup;
	LOC21 = 0;
	LOC21 = &result->Sup.Sup;
	idtableput_232196((&gtypetable_267112), LOC20, LOC21);
	{
		Tlineinfo189352 LOC26;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA24;
		LOC26 = unknownlineinfo_190411();
		asgnRefNoCycle((void**) (&(*result).n), decodenode_267396(r, LOC26));
	}
	LA24: ;
	{
		NI LOC31;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA29;
		(*r).pos += ((NI) 1);
		LOC31 = 0;
		LOC31 = decodevint_231356((*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_231356((*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_231356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_267117(r, LOC41, info));
	}
	LA39: ;
	{
		NI LOC46;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA44;
		(*r).pos += ((NI) 1);
		LOC46 = 0;
		LOC46 = decodevint_231356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).sym), rrgetsym_267117(r, LOC46, info));
	}
	LA44: ;
	{
		NI LOC51;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(47))) goto LA49;
		(*r).pos += ((NI) 1);
		LOC51 = 0;
		LOC51 = decodevint_231356((*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_231356((*r).s, (&(*r).pos));
		(*result).align = ((NI16) (LOC57));
	}
	goto LA53;
	LA55: ;
	{
		(*result).align = ((NI16) 2);
	}
	LA53: ;
	decodeloc_267407(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_195172(info, LOC70);
				}
				LA65: ;
				rawaddson_228498(result, NIM_NIL);
			}
			goto LA61;
			LA63: ;
			{
				NI d;
				Ttype224847* LOC72;
				d = decodevint_231356((*r).s, (&(*r).pos));
				LOC72 = 0;
				LOC72 = rrgettype_267125(r, d, info);
				rawaddson_228498(result, LOC72);
			}
			LA61: ;
		} LA60: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ttype224847*, rrgettype_267125)(Trodreader267030* r, NI id, Tlineinfo189352 info) {
	Ttype224847* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_232189(gtypetable_267112, id);
	result = ((Ttype224847*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).pos;
		d = iitableget_232289((*r).index.tab, id);
		{
			if (!(d == ((NI) (-2147483647 -1)))) goto LA8;
			internalerror_195172(info, ((NimStringDesc*) &TMP1072));
		}
		LA8: ;
		(*r).pos = (NI)(d + (*r).dataidx);
		result = decodetype_267493(r, info);
		(*r).pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(Tlib224827*, decodelib_267641)(Trodreader267030* r, Tlineinfo189352 info) {
	Tlib224827* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(124))) goto LA3;
		result = (Tlib224827*) newObj((&NTI224839), sizeof(Tlib224827));
		(*result).Sup.Sup.m_type = (&NTI224827);
		(*r).pos += ((NI) 1);
		LOC5 = 0;
		LOC5 = decodevint_231356((*r).s, (&(*r).pos));
		(*result).kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA8;
			internalerror_195191(((NimStringDesc*) &TMP1085));
		}
		LA8: ;
		(*r).pos += ((NI) 1);
		LOC10 = 0;
		LOC10 = decodestr_231154((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).name), rope_175322(LOC10));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA13;
			internalerror_195191(((NimStringDesc*) &TMP1086));
		}
		LA13: ;
		(*r).pos += ((NI) 1);
		asgnRefNoCycle((void**) (&(*result).path), decodenode_267396(r, info));
	}
	LA3: ;
	return result;
}

static N_INLINE(void, incref_55022)(Cell48947* 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) {
	{
		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(Tsym224841*, decodesym_267689)(Trodreader267030* r, Tlineinfo189352 info) {
	Tsym224841* result;
	NI id;
	Tident197021* 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_231356((*r).s, (&(*r).pos));
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		id = decodevint_231356((*r).s, (&(*r).pos));
		setid_223440(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_195172(info, ((NimStringDesc*) &TMP1068));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA17;
		(*r).pos += ((NI) 1);
		LOC19 = 0;
		LOC19 = decodestr_231154((*r).s, (&(*r).pos));
		ident = getident_197463(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_195172(info, ((NimStringDesc*) &TMP1070));
	}
	LA15: ;
	result = getordefault_267737((*r).syms, id);
	{
		if (!(result == NIM_NIL)) goto LA23;
		result = (Tsym224841*) newObj((&NTI224807), sizeof(Tsym224841));
		(*result).Sup.Sup.m_type = (&NTI224841);
		(*result).Sup.id = id;
		HEX5BHEX5DHEX3D_267804((&(*r).syms), (*result).Sup.id, result);
		{
			Tidobj197015* LOC29;
			if (!NIM_FALSE) goto LA27;
			LOC29 = 0;
			LOC29 = &result->Sup;
			registerid_223201(LOC29);
		}
		LA27: ;
	}
	goto LA21;
	LA23: ;
	{
		if (!!(((*result).Sup.id == id))) goto LA31;
		internalerror_195172(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)), (&NTI224841));
		(*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_231356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).typ), rrgettype_267125(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_267133(r, (&(*result).info));
	{
		NI LOC48;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA46;
		(*r).pos += ((NI) 1);
		LOC48 = 0;
		LOC48 = decodevint_231356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_267117(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_231356((*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_231356((*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_231356((*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_231356((*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_231356((*r).s, (&(*r).pos));
	}
	goto LA72;
	LA74: ;
	{
		(*result).offset = ((NI) -1);
	}
	LA72: ;
	decodeloc_267407(r, (&(*result).loc), (*result).info);
	asgnRef((void**) (&(*result).annex), decodelib_267641(r, info));
	{
		Tlineinfo189352 LOC81;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(35))) goto LA79;
		(*r).pos += ((NI) 1);
		LOC81 = unknownlineinfo_190411();
		asgnRefNoCycle((void**) (&(*result).constraint), decodenode_267396(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_267243(r, (*result).info, result));
			(*result).position = (*r).readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) (&(*result).ast), decodenode_267396(r, (*result).info));
		}
		LA86: ;
	}
	LA84: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym224841*, decodesymsafepos_269328)(Trodreader267030* rd, NI offset, Tlineinfo189352 info) {
	Tsym224841* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).dataidx == ((NI) 0))) goto LA3;
		internalerror_195172(info, ((NimStringDesc*) &TMP1067));
	}
	LA3: ;
	oldpos = (*rd).pos;
	(*rd).pos = (NI)(offset + (*rd).dataidx);
	result = decodesym_267689(rd, info);
	(*rd).pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_267106)(Tsym224841* s) {
	Trodreader267030* rd;
	NI theid;
	NI d;
	Tsym224841* rs;
	Tlineinfo189352 LOC9;
	{
		if (!!(((*s).kind == ((NU8) 23)))) goto LA3;
		internalerror_195191(((NimStringDesc*) &TMP1043));
	}
	LA3: ;
	rd = gmods_269323->data[(*s).position].rd;
	theid = (*s).Sup.id;
	d = iitableget_232289((*rd).index.tab, (*s).Sup.id);
	{
		if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
		internalerror_195191(((NimStringDesc*) &TMP1044));
	}
	LA7: ;
	LOC9 = unknownlineinfo_190411();
	rs = decodesymsafepos_269328(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_195172((*rs).info, ((NimStringDesc*) &TMP1087));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.id == theid))) goto LA15;
		internalerror_195172((*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_270053)(Tsym224841* s) {
	Gcdisable_11201();
	rawloadstub_267106(s);
	Gcenable_11203();
}

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

N_NIMCALL(void, gethash_269722)(NI32 fileidx, Sha1digest200009* Result) {
	NimStringDesc* LOC12;
{	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < (gmods_269323 ? gmods_269323->Sup.len : 0));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_195279(TMP1531);
		internalerror_195191(LOC7);
	}
	LA5: ;
	{
		if (!gmods_269323->data[fileidx].hashdone) goto LA10;
		memcpy((void*)(*Result), (NIM_CONST void*)gmods_269323->data[fileidx].hash, sizeof(Sha1digest200009));
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofullpath_190665(fileidx);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI200009));
	securehashfile_200034(LOC12, Result);
	memcpy((void*)gmods_269323->data[fileidx].hash, (NIM_CONST void*)(*Result), sizeof(Sha1digest200009));
	}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_268939)(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(Trodreader267030*, newrodreader_268968)(NimStringDesc* modfilename, Sha1digest200009 hash, NI readerindex) {
	Trodreader267030* result;
	TSafePoint TMP1534;
	Trodreader267030* r;
	NimStringDesc* LOC4;
{	result = 0;
	result = (Trodreader267030*) newObj((&NTI267032), sizeof(Trodreader267030));
	(*result).Sup.m_type = (&NTI267030);
	pushSafePoint(&TMP1534);
	TMP1534.status = _setjmp(TMP1534.context);
	if (TMP1534.status == 0) {
		(*result).memfile = open_265807(modfilename, ((NU8) 0), ((NI) -1), ((NI) 0), ((NI) -1));
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI4033))) {
			TMP1534.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1534.status != 0) reraiseException();
	if ((*result).files) nimGCunrefNoCycle((*result).files);
	(*result).files = (TY224932*) newSeqRC1((&NTI224932), 0);
	if ((*result).moddeps) nimGCunrefNoCycle((*result).moddeps);
	(*result).moddeps = (TY224932*) newSeqRC1((&NTI224932), 0);
	if ((*result).methods) nimGCunrefNoCycle((*result).methods);
	(*result).methods = (Tsymseq224811*) newSeqRC1((&NTI224811), 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_269032(((NI) 64), (&(*r).syms));
	(*r).s = ((NCSTRING) ((*r).memfile.mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_268939((*r).s, ((NimStringDesc*) &TMP1536), ((NI) 0));
		if (!LOC7) goto LA8;
		initiitable_232282((&(*r).index.tab));
		initiitable_232282((&(*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*) &TMP1537)))) goto LA18;
			result = NIM_NIL;
		}
		LA18: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_268265)(Trodreader267030* 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_268555)(NU8 old, NU8 new_268558) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!(old == new_268558)) 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_268558)&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_268178)(Trodreader267030* 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*) &TMP1577));
appendString(LOC25, LOC26);
		internalerror_195191(LOC25);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_268463)(Trodreader267030* r, Tindex267028* 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_231356((*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_231356((*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_232296((&(*idx).tab), key, val);
			{
				TY193829 LOC15;
				if (!!(outf == 0)) goto LA13;
				memset((void*)LOC15, 0, sizeof(LOC15));
				LOC15[0] = nimIntToStr(key);
				LOC15[1] = copyString(((NimStringDesc*) &TMP1578));
				LOC15[2] = nimIntToStr(val);
				LOC15[3] = copyString(((NimStringDesc*) &TMP1579));
				write_16911(outf, LOC15, 4);
			}
			LA13: ;
			(*idx).lastidxkey = key;
			(*idx).lastidxval = val;
			setid_223440(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_268586)(Trodreader267030* r, Sha1digest200009 hash) {
	NimStringDesc* w;
	NI d;
	Sha1digest200009 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_268265(r);
			{
				if (!!(((*r).reason == ((NU8) 1)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			switch (hashString(section) & 31) {
			case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1539))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1546))) goto LA15;
break;
			case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1540))) goto LA9;
if (eqStrings(section, ((NimStringDesc*) &TMP1550))) goto LA19;
break;
			case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1541))) goto LA10;
if (eqStrings(section, ((NimStringDesc*) &TMP1543))) goto LA12;
if (eqStrings(section, ((NimStringDesc*) &TMP1553))) goto LA22;
break;
			case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1555))) goto LA24;
break;
			case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1544))) goto LA13;
if (eqStrings(section, ((NimStringDesc*) &TMP1554))) goto LA23;
break;
			case 14: 
if (eqStrings(section, ((NimStringDesc*) &TMP1538))) goto LA7;
break;
			case 17: 
if (eqStrings(section, ((NimStringDesc*) &TMP1545))) goto LA14;
break;
			case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1542))) goto LA11;
if (eqStrings(section, ((NimStringDesc*) &TMP1552))) goto LA21;
break;
			case 26: 
if (eqStrings(section, ((NimStringDesc*) &TMP1548))) goto LA17;
break;
			case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1547))) goto LA16;
break;
			case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1551))) goto LA20;
break;
			case 30: 
if (eqStrings(section, ((NimStringDesc*) &TMP1549))) goto LA18;
break;
			}
			goto LA25;
			LA7: ;
			{
				(*r).pos += ((NI) 1);
				{
					NimStringDesc* LOC30;
					Sha1digest200009 LOC31;
					NIM_BOOL LOC32;
					LOC30 = 0;
					LOC30 = decodestr_231154((*r).s, (&(*r).pos));
					memset((void*)LOC31, 0, sizeof(LOC31));
					parsesecurehash_200107(LOC30, LOC31);
					LOC32 = 0;
					LOC32 = HEX3DHEX3D_200152(hash, LOC31);
					if (!!(LOC32)) goto LA33;
					(*r).reason = ((NU8) 4);
				}
				LA33: ;
			}
			goto LA26;
			LA8: ;
			{
				(*r).pos += ((NI) 1);
				(*r).moduleid = decodevint_231356((*r).s, (&(*r).pos));
				setid_223440((*r).moduleid);
			}
			goto LA26;
			LA9: ;
			{
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*r).origfile), decodestr_231154((*r).s, (&(*r).pos)));
			}
			goto LA26;
			LA10: ;
			{
				NI LOC38;
				(*r).pos += ((NI) 1);
				LOC38 = 0;
				LOC38 = decodevint_231356((*r).s, (&(*r).pos));
				(*r).options = ((NU32) (((NI32) (LOC38))));
				{
					if (!!((goptions_166130 == (*r).options))) goto LA41;
					(*r).reason = ((NU8) 6);
				}
				LA41: ;
			}
			goto LA26;
			LA11: ;
			{
				NU32 dep;
				NI LOC44;
				(*r).pos += ((NI) 1);
				LOC44 = 0;
				LOC44 = decodevint_231356((*r).s, (&(*r).pos));
				dep = ((NU32) (((NI32) (LOC44))));
				{
					if (!!((gglobaloptions_166132 == dep))) goto LA47;
					(*r).reason = ((NU8) 6);
				}
				LA47: ;
			}
			goto LA26;
			LA12: ;
			{
				NU8 dep;
				NI LOC50;
				(*r).pos += ((NI) 1);
				LOC50 = 0;
				LOC50 = decodevint_231356((*r).s, (&(*r).pos));
				dep = ((NU8) (((NI32) (LOC50))));
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = cmdchangetriggersrecompilation_268555(dep, gcmd_166134);
					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_231154((*r).s, (&(*r).pos));
						d += ((NI) 1);
						{
							Tident197021* LOC61;
							NIM_BOOL LOC62;
							LOC61 = 0;
							LOC61 = getident_197463(w);
							LOC62 = 0;
							LOC62 = isdefined_198167(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_198211();
					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_231154((*r).s, (&(*r).pos));
						resolvedpath = findmodule_167549(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_190254(finalpath);
						(*r).files = (TY224932*) 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_231356((*r).s, (&(*r).pos));
						w = tofullpath_190665((*r).files->data[LOC90]);
						(*r).pos += ((NI) 1);
						LOC91 = 0;
						LOC91 = decodestr_231154((*r).s, (&(*r).pos));
						chckNil((void*)inclhash);
						memset((void*)inclhash, 0, sizeof(inclhash));
						parsesecurehash_200107(LOC91, inclhash);
						{
							if (!((*r).reason == ((NU8) 1))) goto LA94;
							{
								NIM_BOOL LOC98;
								NIM_BOOL LOC99;
								Sha1digest200009 LOC101;
								NIM_BOOL LOC102;
								LOC98 = 0;
								LOC99 = 0;
								LOC99 = nosexistsFile(w);
								LOC98 = !(LOC99);
								if (LOC98) goto LA100;
								memset((void*)LOC101, 0, sizeof(LOC101));
								securehashfile_200034(w, LOC101);
								LOC102 = 0;
								LOC102 = HEX3DHEX3D_200152(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_231356((*r).s, (&(*r).pos));
						(*r).moddeps = (TY224932*) 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_268178(r);
			}
			goto LA26;
			LA18: ;
			{
				(*r).compilerprocsidx = (NI)((*r).pos + ((NI) 2));
				skipsection_268178(r);
			}
			goto LA26;
			LA19: ;
			{
				processindex_268463(r, (&(*r).index), NIM_NIL);
			}
			goto LA26;
			LA20: ;
			{
				processindex_268463(r, (&(*r).imports), NIM_NIL);
			}
			goto LA26;
			LA21: ;
			{
				(*r).convertersidx = (NI)((*r).pos + ((NI) 1));
				skipsection_268178(r);
			}
			goto LA26;
			LA22: ;
			{
				(*r).methodsidx = (NI)((*r).pos + ((NI) 1));
				skipsection_268178(r);
			}
			goto LA26;
			LA23: ;
			{
				(*r).dataidx = (NI)((*r).pos + ((NI) 2));
				goto LA1;
			}
			goto LA26;
			LA24: ;
			{
				(*r).initidx = (NI)((*r).pos + ((NI) 2));
				skipsection_268178(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*) &TMP1580));
appendString(LOC130, section);
appendString(LOC130, ((NimStringDesc*) &TMP1581));
appendString(LOC130, LOC131);
appendString(LOC130, ((NimStringDesc*) &TMP1582));
appendString(LOC130, (*r).filename);
				internalerror_195191(LOC130);
				skipsection_268178(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_269760)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	Sha1digest200009 hash;
	Trodreader267030* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
{	result = 0;
	{
		if (!((gmods_269323 ? gmods_269323->Sup.len : 0) <= ((NI) (fileidx)))) goto LA3;
		gmods_269323 = (Tfilemodulemap269298*) setLengthSeq(&(gmods_269323)->Sup, sizeof(Tfilemodulerec269296), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_269323->data[fileidx].reason == ((NU8) 0)))) goto LA7;
		result = gmods_269323->data[fileidx].reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_190655(fileidx);
	memset((void*)hash, 0, sizeof(hash));
	chckNil((void*)hash);
	memset((void*)hash, 0, sizeof(hash));
	gethash_269722(fileidx, hash);
	gmods_269323->data[fileidx].reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_167144(filename);
	rodfile = togeneratedfile_167158(LOC9, ((NimStringDesc*) &TMP1533));
	r = newrodreader_268968(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_268586(r, hash);
		result = (*r).reason;
		{
			NU8 res;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_269760(systemfileidx_189633);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			{
				NI i_269875;
				NI HEX3Atmp_269928;
				NI res_269931;
				i_269875 = 0;
				HEX3Atmp_269928 = 0;
				HEX3Atmp_269928 = ((*r).moddeps ? ((*r).moddeps->Sup.len-1) : -1);
				res_269931 = ((NI) 0);
				{
					while (1) {
						if (!(res_269931 <= HEX3Atmp_269928)) goto LA31;
						i_269875 = res_269931;
						res = checkdep_269760((*r).moddeps->data[i_269875]);
						{
							if (!!((res == ((NU8) 1)))) goto LA34;
							result = ((NU8) 8);
						}
						LA34: ;
						res_269931 += ((NI) 1);
					} LA31: ;
				}
			}
		}
		LA23: ;
	}
	LA10: ;
	{
		NimStringDesc* LOC40;
		if (!!((result == ((NU8) 1)))) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_267018[(result)- 0], filename);
		rawmessage_193636(((NU16) 276), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_166132 &(1<<((((NU8) 1))&31)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_266248((&(*r).memfile));
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) (&gmods_269323->data[fileidx].rd), r);
	gmods_269323->data[fileidx].reason = result;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym224841*, newstub_268302)(Trodreader267030* r, NimStringDesc* name, NI id) {
	Tsym224841* result;
	result = 0;
	result = (Tsym224841*) newObj((&NTI224807), sizeof(Tsym224841));
	(*result).Sup.Sup.m_type = (&NTI224841);
	(*result).kind = ((NU8) 23);
	(*result).Sup.id = id;
	asgnRefNoCycle((void**) (&(*result).name), getident_197463(name));
	(*result).position = (*r).readerindex;
	setid_223440(id);
	{
		Tidobj197015* LOC5;
		if (!NIM_FALSE) goto LA3;
		LOC5 = 0;
		LOC5 = &result->Sup;
		registerid_223201(LOC5);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_268325)(Trodreader267030* r, Tsym224841* module) {
	{
		if (!((*r).interfidx == ((NI) 0))) goto LA3;
		internalerror_195191(((NimStringDesc*) &TMP1592));
	}
	LA3: ;
	(*r).pos = (*r).interfidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym224841* 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_231154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_231356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = newstub_268302(r, w, key);
			asgnRefNoCycle((void**) (&(*s).owner), module);
			strtableadd_232103((&(*module).kindU.S3.tab), s);
			HEX5BHEX5DHEX3D_267804((&(*r).syms), (*s).Sup.id, s);
		} LA6: ;
	}
}

N_NIMCALL(void, processcompilerprocs_268383)(Trodreader267030* r, Tsym224841* module) {
	{
		if (!((*r).compilerprocsidx == ((NI) 0))) goto LA3;
		internalerror_195191(((NimStringDesc*) &TMP1593));
	}
	LA3: ;
	(*r).pos = (*r).compilerprocsidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym224841* 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_231154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_231356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = getordefault_267737((*r).syms, key);
			{
				if (!(s == NIM_NIL)) goto LA11;
				s = newstub_268302(r, w, key);
				asgnRefNoCycle((void**) (&(*s).owner), module);
				HEX5BHEX5DHEX3D_267804((&(*r).syms), (*s).Sup.id, s);
			}
			LA11: ;
			strtableadd_232103((&rodcompilerprocs_267089), s);
		} LA6: ;
	}
}

N_NIMCALL(void, loadconverters_269658)(Trodreader267030* 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_195191(((NimStringDesc*) &TMP1594));
	}
	LA5: ;
	(*r).pos = (*r).convertersidx;
	{
		while (1) {
			NI d;
			Tlineinfo189352 LOC9;
			Tsym224841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_231356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_190411();
			LOC10 = 0;
			LOC10 = rrgetsym_267117(r, d, LOC9);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(void, loadmethods_269685)(Trodreader267030* 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_195191(((NimStringDesc*) &TMP1595));
	}
	LA5: ;
	(*r).pos = (*r).methodsidx;
	{
		while (1) {
			NI d;
			Tlineinfo189352 LOC9;
			Tsym224841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_231356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_190411();
			LOC10 = 0;
			LOC10 = rrgetsym_267117(r, d, LOC9);
			(*r).methods = (Tsymseq224811*) incrSeqV2(&((*r).methods)->Sup, sizeof(Tsym224841*));
			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(Trodreader267030*, handlesymbolfile_267094)(Tsym224841* module) {
	Trodreader267030* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
{	result = 0;
	fileidx = ((NI32) ((*module).position));
	{
		if (!!(((gglobaloptions_166132 &(1<<((((NU8) 14))&31)))!=0))) goto LA3;
		(*module).Sup.id = getid_223404();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_123481(gprojectpath_166235, gprojectname_166234);
	loadmaxids_223506(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_269760(fileidx);
	{
		if (!(gmods_269323->data[fileidx].reason == ((NU8) 0))) goto LA9;
		internalerror_195191(((NimStringDesc*) &TMP1591));
	}
	LA9: ;
	result = gmods_269323->data[fileidx].rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.id = (*result).moduleid;
		HEX5BHEX5DHEX3D_267804((&(*result).syms), (*module).Sup.id, module);
		processinterf_268325(result, module);
		processcompilerprocs_268383(result, module);
		loadconverters_269658(result);
		loadmethods_269685(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.id = getid_223404();
	}
	LA11: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode224809*, loadinitsection_267100)(Trodreader267030* r) {
	Tnode224809* 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_195191(((NimStringDesc*) &TMP1597));
	}
	LA5: ;
	oldpos = (*r).pos;
	(*r).pos = (*r).initidx;
	result = newnode_225401(((NU8) 115));
	{
		while (1) {
			NIM_BOOL LOC9;
			NI d;
			NI p;
			Tlineinfo189352 LOC11;
			Tnode224809* 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_231356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			p = (*r).pos;
			(*r).pos = (NI)(d + (*r).dataidx);
			LOC11 = unknownlineinfo_190411();
			LOC12 = 0;
			LOC12 = decodenode_267396(r, LOC11);
			addson_226819(result, LOC12);
			(*r).pos = p;
		} LA8: ;
	}
	(*r).pos = oldpos;
	return result;
}

static N_INLINE(NI, len_225098)(Tnode224809* 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(Tnode224809*, getbody_270062)(Tsym224841* s) {
	Tnode224809* result;
{	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = (*s).ast == 0;
		if (LOC3) goto LA4;
		LOC5 = 0;
		LOC5 = len_225098((*s).ast);
		LOC3 = (LOC5 <= ((NI) 6));
		LA4: ;
		if (!LOC3) goto LA6;
		result = emptynode_225807;
		goto BeforeRet;
	}
	LA6: ;
	result = (*(*s).ast).kindU.S6.sons->data[((NI) 6)];
	{
		Trodreader267030* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA10;
		r = gmods_269323->data[(*s).position].rd;
		oldpos = (*r).pos;
		(*r).pos = (*s).offset;
		result = decodenode_267396(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_269323) nimGCunref(gmods_269323);
	gmods_269323 = (Tfilemodulemap269298*) newSeqRC1((&NTI269298), 0);
	initidtable_228057((&gtypetable_267112));
	initstrtable_228007((&rodcompilerprocs_267089));
}

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];
NTI269296.size = sizeof(Tfilemodulerec269296);
NTI269296.kind = 18;
NTI269296.base = 0;
TMP896[0] = &TMP888[1];
TMP888[1].kind = 1;
TMP888[1].offset = offsetof(Tfilemodulerec269296, filename);
TMP888[1].typ = (&NTI149);
TMP888[1].name = "filename";
TMP896[1] = &TMP888[2];
NTI267005.size = sizeof(NU8);
NTI267005.kind = 14;
NTI267005.base = 0;
NTI267005.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];
NTI267005.node = &TMP888[12];
TMP888[2].kind = 1;
TMP888[2].offset = offsetof(Tfilemodulerec269296, reason);
TMP888[2].typ = (&NTI267005);
TMP888[2].name = "reason";
TMP896[2] = &TMP888[13];
NTI267030.size = sizeof(Trodreader267030);
NTI267030.kind = 17;
NTI267030.base = (&NTI4011);
TMP900[0] = &TMP888[15];
TMP888[15].kind = 1;
TMP888[15].offset = offsetof(Trodreader267030, pos);
TMP888[15].typ = (&NTI108);
TMP888[15].name = "pos";
TMP900[1] = &TMP888[16];
TMP888[16].kind = 1;
TMP888[16].offset = offsetof(Trodreader267030, s);
TMP888[16].typ = (&NTI151);
TMP888[16].name = "s";
TMP900[2] = &TMP888[17];
TMP888[17].kind = 1;
TMP888[17].offset = offsetof(Trodreader267030, options);
TMP888[17].typ = (&NTI166017);
TMP888[17].name = "options";
TMP900[3] = &TMP888[18];
TMP888[18].kind = 1;
TMP888[18].offset = offsetof(Trodreader267030, reason);
TMP888[18].typ = (&NTI267005);
TMP888[18].name = "reason";
TMP900[4] = &TMP888[19];
TMP888[19].kind = 1;
TMP888[19].offset = offsetof(Trodreader267030, moddeps);
TMP888[19].typ = (&NTI224932);
TMP888[19].name = "modDeps";
TMP900[5] = &TMP888[20];
TMP888[20].kind = 1;
TMP888[20].offset = offsetof(Trodreader267030, files);
TMP888[20].typ = (&NTI224932);
TMP888[20].name = "files";
TMP900[6] = &TMP888[21];
TMP888[21].kind = 1;
TMP888[21].offset = offsetof(Trodreader267030, dataidx);
TMP888[21].typ = (&NTI108);
TMP888[21].name = "dataIdx";
TMP900[7] = &TMP888[22];
TMP888[22].kind = 1;
TMP888[22].offset = offsetof(Trodreader267030, convertersidx);
TMP888[22].typ = (&NTI108);
TMP888[22].name = "convertersIdx";
TMP900[8] = &TMP888[23];
TMP888[23].kind = 1;
TMP888[23].offset = offsetof(Trodreader267030, initidx);
TMP888[23].typ = (&NTI108);
TMP888[23].name = "initIdx";
TMP900[9] = &TMP888[24];
TMP888[24].kind = 1;
TMP888[24].offset = offsetof(Trodreader267030, interfidx);
TMP888[24].typ = (&NTI108);
TMP888[24].name = "interfIdx";
TMP900[10] = &TMP888[25];
TMP888[25].kind = 1;
TMP888[25].offset = offsetof(Trodreader267030, compilerprocsidx);
TMP888[25].typ = (&NTI108);
TMP888[25].name = "compilerProcsIdx";
TMP900[11] = &TMP888[26];
TMP888[26].kind = 1;
TMP888[26].offset = offsetof(Trodreader267030, methodsidx);
TMP888[26].typ = (&NTI108);
TMP888[26].name = "methodsIdx";
TMP900[12] = &TMP888[27];
TMP888[27].kind = 1;
TMP888[27].offset = offsetof(Trodreader267030, filename);
TMP888[27].typ = (&NTI149);
TMP888[27].name = "filename";
TMP900[13] = &TMP888[28];
NTI267028.size = sizeof(Tindex267028);
NTI267028.kind = 18;
NTI267028.base = 0;
NTI267028.flags = 2;
TMP901[0] = &TMP888[30];
TMP888[30].kind = 1;
TMP888[30].offset = offsetof(Tindex267028, lastidxkey);
TMP888[30].typ = (&NTI108);
TMP888[30].name = "lastIdxKey";
TMP901[1] = &TMP888[31];
TMP888[31].kind = 1;
TMP888[31].offset = offsetof(Tindex267028, lastidxval);
TMP888[31].typ = (&NTI108);
TMP888[31].name = "lastIdxVal";
TMP901[2] = &TMP888[32];
TMP888[32].kind = 1;
TMP888[32].offset = offsetof(Tindex267028, tab);
TMP888[32].typ = (&NTI232274);
TMP888[32].name = "tab";
TMP901[3] = &TMP888[33];
TMP888[33].kind = 1;
TMP888[33].offset = offsetof(Tindex267028, r);
TMP888[33].typ = (&NTI149);
TMP888[33].name = "r";
TMP901[4] = &TMP888[34];
TMP888[34].kind = 1;
TMP888[34].offset = offsetof(Tindex267028, offset);
TMP888[34].typ = (&NTI108);
TMP888[34].name = "offset";
TMP888[29].len = 5; TMP888[29].kind = 2; TMP888[29].sons = &TMP901[0];
NTI267028.node = &TMP888[29];
TMP888[28].kind = 1;
TMP888[28].offset = offsetof(Trodreader267030, index);
TMP888[28].typ = (&NTI267028);
TMP888[28].name = "index";
TMP900[14] = &TMP888[35];
TMP888[35].kind = 1;
TMP888[35].offset = offsetof(Trodreader267030, imports);
TMP888[35].typ = (&NTI267028);
TMP888[35].name = "imports";
TMP900[15] = &TMP888[36];
TMP888[36].kind = 1;
TMP888[36].offset = offsetof(Trodreader267030, readerindex);
TMP888[36].typ = (&NTI108);
TMP888[36].name = "readerIndex";
TMP900[16] = &TMP888[37];
TMP888[37].kind = 1;
TMP888[37].offset = offsetof(Trodreader267030, line);
TMP888[37].typ = (&NTI108);
TMP888[37].name = "line";
TMP900[17] = &TMP888[38];
TMP888[38].kind = 1;
TMP888[38].offset = offsetof(Trodreader267030, moduleid);
TMP888[38].typ = (&NTI108);
TMP888[38].name = "moduleID";
TMP900[18] = &TMP888[39];
TMP888[39].kind = 1;
TMP888[39].offset = offsetof(Trodreader267030, syms);
TMP888[39].typ = (&NTI267063);
TMP888[39].name = "syms";
TMP900[19] = &TMP888[40];
TMP888[40].kind = 1;
TMP888[40].offset = offsetof(Trodreader267030, memfile);
TMP888[40].typ = (&NTI265208);
TMP888[40].name = "memfile";
TMP900[20] = &TMP888[41];
TMP888[41].kind = 1;
TMP888[41].offset = offsetof(Trodreader267030, methods);
TMP888[41].typ = (&NTI224811);
TMP888[41].name = "methods";
TMP900[21] = &TMP888[42];
TMP888[42].kind = 1;
TMP888[42].offset = offsetof(Trodreader267030, origfile);
TMP888[42].typ = (&NTI149);
TMP888[42].name = "origFile";
TMP900[22] = &TMP888[43];
TMP888[43].kind = 1;
TMP888[43].offset = offsetof(Trodreader267030, inviewmode);
TMP888[43].typ = (&NTI138);
TMP888[43].name = "inViewMode";
TMP888[14].len = 23; TMP888[14].kind = 2; TMP888[14].sons = &TMP900[0];
NTI267030.node = &TMP888[14];
NTI267032.size = sizeof(Trodreader267030*);
NTI267032.kind = 22;
NTI267032.base = (&NTI267030);
NTI267032.marker = TMP909;
TMP888[13].kind = 1;
TMP888[13].offset = offsetof(Tfilemodulerec269296, rd);
TMP888[13].typ = (&NTI267032);
TMP888[13].name = "rd";
TMP896[3] = &TMP888[44];
TMP888[44].kind = 1;
TMP888[44].offset = offsetof(Tfilemodulerec269296, hash);
TMP888[44].typ = (&NTI200009);
TMP888[44].name = "hash";
TMP896[4] = &TMP888[45];
TMP888[45].kind = 1;
TMP888[45].offset = offsetof(Tfilemodulerec269296, hashdone);
TMP888[45].typ = (&NTI138);
TMP888[45].name = "hashDone";
TMP888[0].len = 5; TMP888[0].kind = 2; TMP888[0].sons = &TMP896[0];
NTI269296.node = &TMP888[0];
NTI269298.size = sizeof(Tfilemodulemap269298*);
NTI269298.kind = 24;
NTI269298.base = (&NTI269296);
NTI269298.marker = TMP910;
}

