/* 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 Tstrtable225813 Tstrtable225813;
typedef struct Tsymseq225811 Tsymseq225811;
typedef struct Tidtable225859 Tidtable225859;
typedef struct Tidpairseq225857 Tidpairseq225857;
typedef struct Tfilemodulemap270298 Tfilemodulemap270298;
typedef struct Tfilemodulerec270296 Tfilemodulerec270296;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Trodreader268030 Trodreader268030;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct TY225932 TY225932;
typedef struct Tindex268028 Tindex268028;
typedef struct Tiitable233274 Tiitable233274;
typedef struct Tiipairseq233272 Tiipairseq233272;
typedef struct Table268063 Table268063;
typedef struct Keyvaluepairseq268066 Keyvaluepairseq268066;
typedef struct Memfile266208 Memfile266208;
typedef struct Cell49146 Cell49146;
typedef struct Cellseq49162 Cellseq49162;
typedef struct Gcheap51218 Gcheap51218;
typedef struct Gcstack51216 Gcstack51216;
typedef struct Cellset49158 Cellset49158;
typedef struct Pagedesc49154 Pagedesc49154;
typedef struct Memregion31091 Memregion31091;
typedef struct Smallchunk31043 Smallchunk31043;
typedef struct Llchunk31085 Llchunk31085;
typedef struct Bigchunk31045 Bigchunk31045;
typedef struct Intset31017 Intset31017;
typedef struct Trunk31013 Trunk31013;
typedef struct Avlnode31089 Avlnode31089;
typedef struct Gcstat51214 Gcstat51214;
typedef struct Tsym225841 Tsym225841;
typedef struct Tidobj198015 Tidobj198015;
typedef struct Ttypeseq225843 Ttypeseq225843;
typedef struct Tscope225835 Tscope225835;
typedef struct TY225944 TY225944;
typedef struct Ttype225847 Ttype225847;
typedef struct Tident198021 Tident198021;
typedef struct Tlineinfo190352 Tlineinfo190352;
typedef struct Tnode225809 Tnode225809;
typedef struct Tloc225823 Tloc225823;
typedef struct Ropeobj176009 Ropeobj176009;
typedef struct Tlib225827 Tlib225827;
typedef struct Tnodeseq225803 Tnodeseq225803;
typedef struct Tlistentry141022 Tlistentry141022;
typedef struct TY91159 TY91159;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct Tidpair225855 Tidpair225855;
typedef struct Tiipair233270 Tiipair233270;
typedef struct Keyvaluepair268069 Keyvaluepair268069;
typedef struct Basechunk31041 Basechunk31041;
typedef struct Freecell31033 Freecell31033;
typedef struct Tinstantiation225831 Tinstantiation225831;
struct  Tstrtable225813  {
NI counter;
Tsymseq225811* data;
};
struct  Tidtable225859  {
NI counter;
Tidpairseq225857* data;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Sha1digest201009[20];
struct  Tfilemodulerec270296  {
NimStringDesc* filename;
NU8 reason;
Trodreader268030* rd;
Sha1digest201009 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  Tiitable233274  {
NI counter;
Tiipairseq233272* data;
};
struct  Tindex268028  {
NI lastidxkey;
NI lastidxval;
Tiitable233274 tab;
NimStringDesc* r;
NI offset;
};
struct  Table268063  {
Keyvaluepairseq268066* data;
NI counter;
};
struct  Memfile266208  {
void* mem;
NI size;
int handle;
};
struct  Trodreader268030  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY225932* moddeps;
TY225932* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex268028 index;
Tindex268028 imports;
NI readerindex;
NI line;
NI moduleid;
Table268063 syms;
Memfile266208 memfile;
Tsymseq225811* methods;
NimStringDesc* origfile;
NIM_BOOL inviewmode;
};
struct  Cell49146  {
NI refcount;
TNimType* typ;
};
struct  Cellseq49162  {
NI len;
NI cap;
Cell49146** d;
};
struct  Cellset49158  {
NI counter;
NI max;
Pagedesc49154* head;
Pagedesc49154** data;
};
typedef Smallchunk31043* TY31106[512];
typedef Trunk31013* Trunkbuckets31015[256];
struct  Intset31017  {
Trunkbuckets31015 data;
};
struct  Memregion31091  {
NI minlargeobj;
NI maxlargeobj;
TY31106 freesmallchunks;
Llchunk31085* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk31045* freechunkslist;
Intset31017 chunkstarts;
Avlnode31089* root;
Avlnode31089* deleted;
Avlnode31089* last;
Avlnode31089* freeavlnodes;
};
struct  Gcstat51214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51218  {
Gcstack51216* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq49162 zct;
Cellseq49162 decstack;
Cellset49158 cycleroots;
Cellseq49162 tempstack;
NI recgclock;
Memregion31091 region;
Gcstat51214 stat;
};
struct  Tidobj198015  {
  TNimObject Sup;
NI id;
};
struct  Tlineinfo190352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc225823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype225847* t;
Ropeobj176009* r;
Ropeobj176009* heaproot;
};
struct  Tsym225841  {
  Tidobj198015 Sup;
NU8 kind;
union{
struct {Ttypeseq225843* typeinstcache;
Tscope225835* typscope;
} S1;
struct {TY225944* procinstcache;
Tsym225841* gcunsafetyreason;
} S2;
struct {TY225944* usedgenerics;
Tstrtable225813 tab;
} S3;
struct {Tsym225841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype225847* typ;
Tident198021* name;
Tlineinfo190352 info;
Tsym225841* owner;
NU32 flags;
Tnode225809* ast;
NU32 options;
NI position;
NI offset;
Tloc225823 loc;
Tlib225827* annex;
Tnode225809* constraint;
};
struct  Ttype225847  {
  Tidobj198015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq225843* sons;
Tnode225809* n;
Tsym225841* owner;
Tsym225841* sym;
Tsym225841* destructor;
Tsym225841* deepcopy;
Tsym225841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc225823 loc;
};
struct  Tnode225809  {
Ttype225847* typ;
Tlineinfo190352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym225841* sym;
} S4;
struct {Tident198021* ident;
} S5;
struct {Tnodeseq225803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tlistentry141022  {
  TNimObject Sup;
Tlistentry141022* prev;
Tlistentry141022* next;
};
struct  Tlib225827  {
  Tlistentry141022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj176009* name;
Tnode225809* path;
};
struct TY91159 {
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;
} TY19411;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY19411 raiseAction;
};
typedef NimStringDesc* TY194829[4];
typedef NimStringDesc* TY268021[9];
struct  Tidpair225855  {
Tidobj198015* key;
TNimObject* val;
};
struct  Tiipair233270  {
NI key;
NI val;
};
struct Keyvaluepair268069 {
NI Field0;
NI Field1;
Tsym225841* Field2;
};
struct  Gcstack51216  {
Gcstack51216* prev;
Gcstack51216* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY31022[8];
struct  Pagedesc49154  {
Pagedesc49154* next;
NI key;
TY31022 bits;
};
struct  Basechunk31041  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk31043  {
  Basechunk31041 Sup;
Smallchunk31043* next;
Smallchunk31043* prev;
Freecell31033* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk31085  {
NI size;
NI acc;
Llchunk31085* next;
};
struct  Bigchunk31045  {
  Basechunk31041 Sup;
Bigchunk31045* next;
Bigchunk31045* prev;
NI align;
NF data;
};
struct  Trunk31013  {
Trunk31013* next;
NI key;
TY31022 bits;
};
typedef Avlnode31089* TY31096[2];
struct  Avlnode31089  {
TY31096 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope225835  {
NI depthlevel;
Tstrtable225813 symbols;
Tnodeseq225803* usingsyms;
Tscope225835* parent;
};
struct  Tident198021  {
  Tidobj198015 Sup;
NimStringDesc* s;
Tident198021* next;
NI h;
};
struct  Ropeobj176009  {
  TNimObject Sup;
Ropeobj176009* left;
Ropeobj176009* right;
NI length;
NimStringDesc* data;
};
struct  Freecell31033  {
Freecell31033* next;
NI zerofield;
};
struct  Tinstantiation225831  {
Tsym225841* sym;
Ttypeseq225843* concretetypes;
TY225932* usedby;
NI compilesid;
};
struct Tfilemodulemap270298 {
  TGenericSeq Sup;
  Tfilemodulerec270296 data[SEQ_DECL_SIZE];
};
struct TY225932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Tsymseq225811 {
  TGenericSeq Sup;
  Tsym225841* data[SEQ_DECL_SIZE];
};
struct Tidpairseq225857 {
  TGenericSeq Sup;
  Tidpair225855 data[SEQ_DECL_SIZE];
};
struct Tiipairseq233272 {
  TGenericSeq Sup;
  Tiipair233270 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq268066 {
  TGenericSeq Sup;
  Keyvaluepair268069 data[SEQ_DECL_SIZE];
};
struct Ttypeseq225843 {
  TGenericSeq Sup;
  Ttype225847* data[SEQ_DECL_SIZE];
};
struct TY225944 {
  TGenericSeq Sup;
  Tinstantiation225831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq225803 {
  TGenericSeq Sup;
  Tnode225809* 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_54804)(Cell49146* c);
static N_INLINE(void, rtladdzct_54404)(Cell49146* c);
N_NOINLINE(void, addzct_52817)(Cellseq49162* s, Cell49146* c);
static N_INLINE(NIM_BOOL, canbecycleroot_52867)(Cell49146* c);
static N_INLINE(void, rtladdcycleroot_53623)(Cell49146* c);
N_NOINLINE(void, incl_49865)(Cellset49158* s, Cell49146* cell);
static N_INLINE(Cell49146*, usrtocell_52846)(void* usr);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, initidtable_229057)(Tidtable225859* x);
N_NIMCALL(void, initstrtable_229007)(Tstrtable225813* x);
static N_INLINE(void, Gcdisable_11201)(void);
N_NIMCALL(void, rawloadstub_268106)(Tsym225841* s);
N_NIMCALL(void, internalerror_196191)(NimStringDesc* errmsg);
N_NIMCALL(NI, iitableget_233289)(Tiitable233274 t, NI key);
N_NIMCALL(Tsym225841*, decodesymsafepos_270328)(Trodreader268030* rd, NI offset, Tlineinfo190352 info);
N_NIMCALL(void, internalerror_196172)(Tlineinfo190352 info, NimStringDesc* errmsg);
N_NIMCALL(Tsym225841*, decodesym_268686)(Trodreader268030* r, Tlineinfo190352 info);
N_NIMCALL(NI, decodevint_232356)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_224440)(NI id);
N_NIMCALL(Tident198021*, getident_198463)(NimStringDesc* identifier);
N_NIMCALL(NimStringDesc*, decodestr_232154)(NCSTRING s, NI* pos);
N_NIMCALL(Tsym225841*, getordefault_268734)(Table268063 t, NI key);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, HEX5BHEX5DHEX3D_268801)(Table268063* t, NI key, Tsym225841* val);
N_NIMCALL(void, registerid_224201)(Tidobj198015* id);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Ttype225847*, rrgettype_268125)(Trodreader268030* r, NI id, Tlineinfo190352 info);
N_NIMCALL(TNimObject*, idtableget_233189)(Tidtable225859 t, NI key);
N_NIMCALL(Ttype225847*, decodetype_268491)(Trodreader268030* r, Tlineinfo190352 info);
N_NIMCALL(void, idtableput_233196)(Tidtable225859* t, Tidobj198015* key, TNimObject* val);
N_NIMCALL(Tnode225809*, decodenode_268395)(Trodreader268030* r, Tlineinfo190352 finfo);
N_NIMCALL(Tnode225809*, decodenodelazybody_268243)(Trodreader268030* r, Tlineinfo190352 finfo, Tsym225841* belongsto);
N_NIMCALL(Tnode225809*, newnodei_227351)(NU8 kind, Tlineinfo190352 info);
N_NIMCALL(void, decodelineinfo_268133)(Trodreader268030* r, Tlineinfo190352* info);
N_NIMCALL(Tlineinfo190352, newlineinfo_191266)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_232512)(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(Tsym225841*, rrgetsym_268117)(Trodreader268030* r, NI id, Tlineinfo190352 info);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, encodevint_232294)(NI x, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Trodreader268030*, getreader_270396)(NI moduleid);
N_NIMCALL(void, addsonnilallowed_229550)(Tnode225809* father, Tnode225809* son);
N_NIMCALL(void, skipnode_268174)(Trodreader268030* r);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(Tlineinfo190352, unknownlineinfo_191408)(void);
N_NIMCALL(void, decodeloc_268406)(Trodreader268030* r, Tloc225823* loc, Tlineinfo190352 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Ropeobj176009*, rope_176322)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_229498)(Ttype225847* father, Ttype225847* son);
N_NIMCALL(Tlib225827*, decodelib_268638)(Trodreader268030* r, Tlineinfo190352 info);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_55222)(Cell49146* c);
static N_INLINE(void, Gcenable_11203)(void);
static N_INLINE(NI, getid_224404)(void);
N_NIMCALL(void, loadmaxids_224506)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_124681)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_270760)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_191652)(NI32 fileidx);
N_NIMCALL(void, gethash_270722)(NI32 fileidx, Sha1digest201009* Result);
N_NIMCALL(NimStringDesc*, HEX24_196279)(TY91159 x);
N_NIMCALL(void, securehashfile_201034)(NimStringDesc* filename, Sha1digest201009* Result);
N_NIMCALL(NimStringDesc*, tofullpath_191662)(NI32 fileidx);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(NimStringDesc*, togeneratedfile_168158)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_168144)(NimStringDesc* path);
N_NIMCALL(Trodreader268030*, newrodreader_269959)(NimStringDesc* modfilename, Sha1digest201009 hash, NI readerindex);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(Memfile266208, open_266807)(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_270023)(NI initialsize, Table268063* Result);
N_NIMCALL(NIM_BOOL, startswith_269930)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_233282)(Tiitable233274* 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_269581)(Trodreader268030* r, Sha1digest201009 hash);
N_NIMCALL(NimStringDesc*, rdword_269260)(Trodreader268030* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_201152)(Sha1digest201009 a, Sha1digest201009 b);
N_NIMCALL(void, parsesecurehash_201107)(NimStringDesc* hash, Sha1digest201009* Result);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_269550)(NU8 old, NU8 new_269553);
N_NIMCALL(NIM_BOOL, isdefined_199167)(Tident198021* symbol);
N_NIMCALL(NI, countdefinedsymbols_199211)(void);
N_NIMCALL(NimStringDesc*, findmodule_168549)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_191253)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, skipsection_269173)(Trodreader268030* r);
N_NIMCALL(void, processindex_269458)(Trodreader268030* r, Tindex268028* idx, FILE* outf);
N_NIMCALL(void, iitableput_233296)(Tiitable233274* t, NI key, NI val);
N_NIMCALL(void, write_17111)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_194636)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_267249)(Memfile266208* f);
N_NIMCALL(void, processinterf_269320)(Trodreader268030* r, Tsym225841* module);
N_NIMCALL(Tsym225841*, newstub_269297)(Trodreader268030* r, NimStringDesc* name, NI id);
N_NIMCALL(void, strtableadd_233103)(Tstrtable225813* t, Tsym225841* n);
N_NIMCALL(void, processcompilerprocs_269378)(Trodreader268030* r, Tsym225841* module);
N_NIMCALL(void, loadconverters_270658)(Trodreader268030* r);
N_NIMCALL(void, loadmethods_270685)(Trodreader268030* r);
N_NIMCALL(Tnode225809*, newnode_226401)(NU8 kind);
N_NIMCALL(void, addson_227819)(Tnode225809* father, Tnode225809* son);
static N_INLINE(NI, len_226098)(Tnode225809* 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(TMP1527, "compiler/rodread.nim", 20);
NIM_CONST TY91159 TMP1526 = {((NimStringDesc*) &TMP1527),
((NI) 800)}
;
STRING_LITERAL(TMP1528, "rod", 3);
STRING_LITERAL(TMP1531, "NIM:", 4);
STRING_LITERAL(TMP1532, "1215", 4);
STRING_LITERAL(TMP1533, "HASH", 4);
STRING_LITERAL(TMP1534, "ID", 2);
STRING_LITERAL(TMP1535, "ORIGFILE", 8);
STRING_LITERAL(TMP1536, "OPTIONS", 7);
STRING_LITERAL(TMP1537, "GOPTIONS", 8);
STRING_LITERAL(TMP1538, "CMD", 3);
STRING_LITERAL(TMP1539, "DEFINES", 7);
STRING_LITERAL(TMP1540, "FILES", 5);
STRING_LITERAL(TMP1541, "INCLUDES", 8);
STRING_LITERAL(TMP1542, "DEPS", 4);
STRING_LITERAL(TMP1543, "INTERF", 6);
STRING_LITERAL(TMP1544, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1545, "INDEX", 5);
STRING_LITERAL(TMP1546, "IMPORTS", 7);
STRING_LITERAL(TMP1547, "CONVERTERS", 10);
STRING_LITERAL(TMP1548, "METHODS", 7);
STRING_LITERAL(TMP1549, "DATA", 4);
STRING_LITERAL(TMP1550, "INIT", 4);
STRING_LITERAL(TMP1572, "skipSection ", 12);
STRING_LITERAL(TMP1573, " ", 1);
STRING_LITERAL(TMP1574, "\012", 1);
STRING_LITERAL(TMP1575, "invalid section: \'", 18);
STRING_LITERAL(TMP1576, "\' at ", 5);
STRING_LITERAL(TMP1577, " in ", 4);
STRING_LITERAL(TMP1578, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1579, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1580, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1581, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1582, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1583, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1584, "an include file edited: $1", 26);
STRING_LITERAL(TMP1585, "a module $1 depends on has changed", 34);
NIM_CONST TY268021 reasontofrmt_268018 = {((NimStringDesc*) &TMP1075),
((NimStringDesc*) &TMP1578),
((NimStringDesc*) &TMP1579),
((NimStringDesc*) &TMP1580),
((NimStringDesc*) &TMP1581),
((NimStringDesc*) &TMP1582),
((NimStringDesc*) &TMP1583),
((NimStringDesc*) &TMP1584),
((NimStringDesc*) &TMP1585)}
;
STRING_LITERAL(TMP1586, "handleSymbolFile", 16);
STRING_LITERAL(TMP1587, "processInterf", 13);
STRING_LITERAL(TMP1588, "processCompilerProcs", 20);
STRING_LITERAL(TMP1589, "importConverters", 16);
STRING_LITERAL(TMP1590, "loadMethods", 11);
STRING_LITERAL(TMP1592, "loadInitSection", 15);
Tstrtable225813 rodcompilerprocs_268089;
Tidtable225859 gtypetable_268112;
Tfilemodulemap270298* gmods_270323;
TNimType NTI270296; /* TFileModuleRec */
extern TNimType NTI149; /* string */
TNimType NTI268005; /* TReasonForRecompile */
extern TNimType NTI4011; /* RootObj */
TNimType NTI268030; /* TRodReader */
extern TNimType NTI108; /* int */
extern TNimType NTI151; /* cstring */
extern TNimType NTI167017; /* TOptions */
extern TNimType NTI225932; /* seq[int32] */
TNimType NTI268028; /* TIndex */
extern TNimType NTI233274; /* TIITable */
extern TNimType NTI268063; /* Table */
extern TNimType NTI266208; /* MemFile */
extern TNimType NTI225811; /* TSymSeq */
extern TNimType NTI138; /* bool */
TNimType NTI268032; /* PRodReader */
extern TNimType NTI201009; /* Sha1Digest */
TNimType NTI270298; /* TFileModuleMap */
extern Gcheap51218 gch_51259;
extern NI gfrontendid_224012;
extern TNimType NTI225807; /* PSym */
extern TNimType NTI225841; /* TSym */
extern TNimType NTI225805; /* PType */
extern TNimType NTI225847; /* TType */
extern TNimType NTI225839; /* PLib */
extern TNimType NTI225827; /* TLib */
extern NU32 gglobaloptions_167132;
extern NimStringDesc* gprojectpath_167235;
extern NimStringDesc* gprojectname_167234;
extern TSafePoint* exchandler_21043;
extern TNimType NTI4033; /* OSError */
extern Exception* currexception_21045;
extern NU32 goptions_167130;
extern NU8 gcmd_167134;
extern NI32 systemfileidx_190633;
extern Tnode225809* emptynode_226807;
N_NIMCALL(void, TMP909)(void* p, NI op) {
	Trodreader268030* a;
	a = (Trodreader268030*)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) {
	Tfilemodulemap270298* a;
	NI LOC1;
	a = (Tfilemodulemap270298*)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_54404)(Cell49146* c) {
	addzct_52817((&gch_51259.zct), c);
}

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

static N_INLINE(void, rtladdcycleroot_53623)(Cell49146* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_49865((&gch_51259.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_54804)(Cell49146* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_54404(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_52867(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_53623(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(Cell49146*, usrtocell_52846)(void* usr) {
	Cell49146* result;
	result = 0;
	result = ((Cell49146*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((NI)sizeof(Cell49146))))));
	return result;
}

static N_INLINE(void, nimGCunref)(void* p) {
	Cell49146* LOC1;
	LOC1 = 0;
	LOC1 = usrtocell_52846(p);
	decref_54804(LOC1);
}

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

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

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

N_NIMCALL(void, decodelineinfo_268133)(Trodreader268030* r, Tlineinfo190352* 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_232356((*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_232356((*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_232356((*r).s, (&(*r).pos));
				(*info) = newlineinfo_191266((*r).files->data[LOC25], ((NI) ((*info).line)), ((NI) ((*info).col)));
			}
			LA23: ;
		}
		LA13: ;
	}
	LA3: ;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell49146* c;
	c = usrtocell_52846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_54404(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(Trodreader268030*, getreader_270396)(NI moduleid) {
	Trodreader268030* result;
{	result = 0;
	{
		NI i_270426;
		NI HEX3Atmp_270440;
		NI res_270443;
		i_270426 = 0;
		HEX3Atmp_270440 = 0;
		HEX3Atmp_270440 = ((gmods_270323 ? gmods_270323->Sup.len : 0) - 1);
		res_270443 = ((NI) 0);
		{
			while (1) {
				if (!(res_270443 <= HEX3Atmp_270440)) goto LA3;
				i_270426 = res_270443;
				result = gmods_270323->data[i_270426].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_270443 += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym225841*, rrgetsym_268117)(Trodreader268030* r, NI id, Tlineinfo190352 info) {
	Tsym225841* result;
	result = 0;
	result = getordefault_268734((*r).syms, id);
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA3;
		d = iitableget_233289((*r).index.tab, id);
		{
			NI moduleid;
			Trodreader268030* rd;
			if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA7;
			moduleid = iitableget_233289((*r).imports.tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC13;
				if (!(moduleid < ((NI) 0))) goto LA11;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_232294(id, (&x));
				LOC13 = 0;
				LOC13 = rawNewString(x->Sup.len + 28);
appendString(LOC13, ((NimStringDesc*) &TMP1078));
appendString(LOC13, x);
				internalerror_196172(info, LOC13);
			}
			LA11: ;
			rd = getreader_270396(moduleid);
			d = iitableget_233289((*rd).index.tab, id);
			{
				if (!!((d == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA16;
				result = decodesymsafepos_270328(rd, d, info);
			}
			goto LA14;
			LA16: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC19;
				x = copyString(((NimStringDesc*) &TMP1075));
				encodevint_232294(id, (&x));
				LOC19 = 0;
				LOC19 = rawNewString(x->Sup.len + 28);
appendString(LOC19, ((NimStringDesc*) &TMP1079));
appendString(LOC19, x);
				internalerror_196172(info, LOC19);
			}
			LA14: ;
		}
		goto LA5;
		LA7: ;
		{
			result = decodesymsafepos_270328(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_268106(result);
	}
	LA25: ;
	return result;
}

N_NIMCALL(void, skipnode_268174)(Trodreader268030* 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(Tnode225809*, decodenodelazybody_268243)(Trodreader268030* r, Tlineinfo190352 finfo, Tsym225841* belongsto) {
	Tnode225809* 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_232356((*r).s, (&(*r).pos));
		result = newnodei_227351(((NU8) (LOC9)), finfo);
		decodelineinfo_268133(r, (&(*result).info));
		{
			NI LOC14;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA12;
			(*r).pos += ((NI) 1);
			LOC14 = 0;
			LOC14 = decodevint_232356((*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_232356((*r).s, (&(*r).pos));
			asgnRefNoCycle((void**) (&(*result).typ), rrgettype_268125(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_232512((*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_232154((*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_232154((*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_232154((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S5.ident), getident_198463(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_196172((*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_232356((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S4.sym), rrgetsym_268117(r, id, (*result).info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_196172((*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_229550(result, NIM_NIL);
						(*belongsto).offset = (*r).pos;
						skipnode_268174(r);
					}
					goto LA51;
					LA55: ;
					{
						Tnode225809* LOC58;
						LOC58 = 0;
						LOC58 = decodenodelazybody_268243(r, (*result).info, NIM_NIL);
						addsonnilallowed_229550(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_196172((*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_196172(finfo, LOC65);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode225809*, decodenode_268395)(Trodreader268030* r, Tlineinfo190352 finfo) {
	Tnode225809* result;
	result = 0;
	result = decodenodelazybody_268243(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_268406)(Trodreader268030* r, Tloc225823* loc, Tlineinfo190352 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_232356((*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_232356((*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_232356((*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_232356((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).t), rrgettype_268125(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_232154((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).r), rope_176322(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_196172(info, LOC40);
		}
		LA35: ;
	}
	LA3: ;
}

N_NIMCALL(Ttype225847*, decodetype_268491)(Trodreader268030* r, Tlineinfo190352 info) {
	Ttype225847* result;
	NI LOC9;
	Tidobj198015* 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 = (Ttype225847*) newObj((&NTI225805), sizeof(Ttype225847));
	(*result).Sup.Sup.m_type = (&NTI225847);
	LOC9 = 0;
	LOC9 = decodevint_232356((*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_232356((*r).s, (&(*r).pos));
		setid_224440((*result).Sup.id);
		{
			Tidobj198015* LOC18;
			if (!NIM_FALSE) goto LA16;
			LOC18 = 0;
			LOC18 = &result->Sup;
			registerid_224201(LOC18);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_196172(info, ((NimStringDesc*) &TMP1073));
	}
	LA10: ;
	LOC20 = 0;
	LOC20 = &result->Sup;
	LOC21 = 0;
	LOC21 = &result->Sup.Sup;
	idtableput_233196((&gtypetable_268112), LOC20, LOC21);
	{
		Tlineinfo190352 LOC26;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA24;
		LOC26 = unknownlineinfo_191408();
		asgnRefNoCycle((void**) (&(*result).n), decodenode_268395(r, LOC26));
	}
	LA24: ;
	{
		NI LOC31;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA29;
		(*r).pos += ((NI) 1);
		LOC31 = 0;
		LOC31 = decodevint_232356((*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_232356((*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_232356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_268117(r, LOC41, info));
	}
	LA39: ;
	{
		NI LOC46;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA44;
		(*r).pos += ((NI) 1);
		LOC46 = 0;
		LOC46 = decodevint_232356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).sym), rrgetsym_268117(r, LOC46, info));
	}
	LA44: ;
	{
		NI LOC51;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(47))) goto LA49;
		(*r).pos += ((NI) 1);
		LOC51 = 0;
		LOC51 = decodevint_232356((*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_232356((*r).s, (&(*r).pos));
		(*result).align = ((NI16) (LOC57));
	}
	goto LA53;
	LA55: ;
	{
		(*result).align = ((NI16) 2);
	}
	LA53: ;
	decodeloc_268406(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_196172(info, LOC70);
				}
				LA65: ;
				rawaddson_229498(result, NIM_NIL);
			}
			goto LA61;
			LA63: ;
			{
				NI d;
				Ttype225847* LOC72;
				d = decodevint_232356((*r).s, (&(*r).pos));
				LOC72 = 0;
				LOC72 = rrgettype_268125(r, d, info);
				rawaddson_229498(result, LOC72);
			}
			LA61: ;
		} LA60: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ttype225847*, rrgettype_268125)(Trodreader268030* r, NI id, Tlineinfo190352 info) {
	Ttype225847* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_233189(gtypetable_268112, id);
	result = ((Ttype225847*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).pos;
		d = iitableget_233289((*r).index.tab, id);
		{
			if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA8;
			internalerror_196172(info, ((NimStringDesc*) &TMP1072));
		}
		LA8: ;
		(*r).pos = (NI)(d + (*r).dataidx);
		result = decodetype_268491(r, info);
		(*r).pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(Tlib225827*, decodelib_268638)(Trodreader268030* r, Tlineinfo190352 info) {
	Tlib225827* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(124))) goto LA3;
		result = (Tlib225827*) newObj((&NTI225839), sizeof(Tlib225827));
		(*result).Sup.Sup.m_type = (&NTI225827);
		(*r).pos += ((NI) 1);
		LOC5 = 0;
		LOC5 = decodevint_232356((*r).s, (&(*r).pos));
		(*result).kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA8;
			internalerror_196191(((NimStringDesc*) &TMP1085));
		}
		LA8: ;
		(*r).pos += ((NI) 1);
		LOC10 = 0;
		LOC10 = decodestr_232154((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).name), rope_176322(LOC10));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA13;
			internalerror_196191(((NimStringDesc*) &TMP1086));
		}
		LA13: ;
		(*r).pos += ((NI) 1);
		asgnRefNoCycle((void**) (&(*result).path), decodenode_268395(r, info));
	}
	LA3: ;
	return result;
}

static N_INLINE(void, incref_55222)(Cell49146* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_52867(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_53623(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell49146* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_52846(src);
		incref_55222(LOC5);
	}
	LA3: ;
	{
		Cell49146* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_52846((*dest));
		decref_54804(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Tsym225841*, decodesym_268686)(Trodreader268030* r, Tlineinfo190352 info) {
	Tsym225841* result;
	NI id;
	Tident198021* 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_232356((*r).s, (&(*r).pos));
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		id = decodevint_232356((*r).s, (&(*r).pos));
		setid_224440(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_196172(info, ((NimStringDesc*) &TMP1068));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA17;
		(*r).pos += ((NI) 1);
		LOC19 = 0;
		LOC19 = decodestr_232154((*r).s, (&(*r).pos));
		ident = getident_198463(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_196172(info, ((NimStringDesc*) &TMP1070));
	}
	LA15: ;
	result = getordefault_268734((*r).syms, id);
	{
		if (!(result == NIM_NIL)) goto LA23;
		result = (Tsym225841*) newObj((&NTI225807), sizeof(Tsym225841));
		(*result).Sup.Sup.m_type = (&NTI225841);
		(*result).Sup.id = id;
		HEX5BHEX5DHEX3D_268801((&(*r).syms), (*result).Sup.id, result);
		{
			Tidobj198015* LOC29;
			if (!NIM_FALSE) goto LA27;
			LOC29 = 0;
			LOC29 = &result->Sup;
			registerid_224201(LOC29);
		}
		LA27: ;
	}
	goto LA21;
	LA23: ;
	{
		if (!!(((*result).Sup.id == id))) goto LA31;
		internalerror_196172(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)), (&NTI225841));
		(*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_232356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).typ), rrgettype_268125(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_268133(r, (&(*result).info));
	{
		NI LOC48;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA46;
		(*r).pos += ((NI) 1);
		LOC48 = 0;
		LOC48 = decodevint_232356((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_268117(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_232356((*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_232356((*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_232356((*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_232356((*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_232356((*r).s, (&(*r).pos));
	}
	goto LA72;
	LA74: ;
	{
		(*result).offset = ((NI) -1);
	}
	LA72: ;
	decodeloc_268406(r, (&(*result).loc), (*result).info);
	asgnRef((void**) (&(*result).annex), decodelib_268638(r, info));
	{
		Tlineinfo190352 LOC81;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(35))) goto LA79;
		(*r).pos += ((NI) 1);
		LOC81 = unknownlineinfo_191408();
		asgnRefNoCycle((void**) (&(*result).constraint), decodenode_268395(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_268243(r, (*result).info, result));
			(*result).position = (*r).readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) (&(*result).ast), decodenode_268395(r, (*result).info));
		}
		LA86: ;
	}
	LA84: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym225841*, decodesymsafepos_270328)(Trodreader268030* rd, NI offset, Tlineinfo190352 info) {
	Tsym225841* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).dataidx == ((NI) 0))) goto LA3;
		internalerror_196172(info, ((NimStringDesc*) &TMP1067));
	}
	LA3: ;
	oldpos = (*rd).pos;
	(*rd).pos = (NI)(offset + (*rd).dataidx);
	result = decodesym_268686(rd, info);
	(*rd).pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_268106)(Tsym225841* s) {
	Trodreader268030* rd;
	NI theid;
	NI d;
	Tsym225841* rs;
	Tlineinfo190352 LOC9;
	{
		if (!!(((*s).kind == ((NU8) 23)))) goto LA3;
		internalerror_196191(((NimStringDesc*) &TMP1043));
	}
	LA3: ;
	rd = gmods_270323->data[(*s).position].rd;
	theid = (*s).Sup.id;
	d = iitableget_233289((*rd).index.tab, (*s).Sup.id);
	{
		if (!(d == ((NI) (IL64(-9223372036854775807) - IL64(1))))) goto LA7;
		internalerror_196191(((NimStringDesc*) &TMP1044));
	}
	LA7: ;
	LOC9 = unknownlineinfo_191408();
	rs = decodesymsafepos_270328(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_196172((*rs).info, ((NimStringDesc*) &TMP1087));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.id == theid))) goto LA15;
		internalerror_196172((*rs).info, ((NimStringDesc*) &TMP1088));
	}
	goto LA10;
	LA15: ;
	LA10: ;
}

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

N_NIMCALL(void, loadstub_271052)(Tsym225841* s) {
	Gcdisable_11201();
	rawloadstub_268106(s);
	Gcenable_11203();
}

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

N_NIMCALL(void, gethash_270722)(NI32 fileidx, Sha1digest201009* Result) {
	NimStringDesc* LOC12;
{	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < (gmods_270323 ? gmods_270323->Sup.len : 0));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_196279(TMP1526);
		internalerror_196191(LOC7);
	}
	LA5: ;
	{
		if (!gmods_270323->data[fileidx].hashdone) goto LA10;
		memcpy((void*)(*Result), (NIM_CONST void*)gmods_270323->data[fileidx].hash, sizeof(Sha1digest201009));
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofullpath_191662(fileidx);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI201009));
	securehashfile_201034(LOC12, Result);
	memcpy((void*)gmods_270323->data[fileidx].hash, (NIM_CONST void*)(*Result), sizeof(Sha1digest201009));
	}BeforeRet: ;
}

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

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

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

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

N_NIMCALL(NIM_BOOL, startswith_269930)(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(Trodreader268030*, newrodreader_269959)(NimStringDesc* modfilename, Sha1digest201009 hash, NI readerindex) {
	Trodreader268030* result;
	TSafePoint TMP1529;
	Trodreader268030* r;
	NimStringDesc* LOC4;
{	result = 0;
	result = (Trodreader268030*) newObj((&NTI268032), sizeof(Trodreader268030));
	(*result).Sup.m_type = (&NTI268030);
	pushSafePoint(&TMP1529);
	TMP1529.status = _setjmp(TMP1529.context);
	if (TMP1529.status == 0) {
		(*result).memfile = open_266807(modfilename, ((NU8) 0), ((NI) -1), ((NI) 0), ((NI) -1));
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI4033))) {
			TMP1529.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1529.status != 0) reraiseException();
	if ((*result).files) nimGCunrefNoCycle((*result).files);
	(*result).files = (TY225932*) newSeqRC1((&NTI225932), 0);
	if ((*result).moddeps) nimGCunrefNoCycle((*result).moddeps);
	(*result).moddeps = (TY225932*) newSeqRC1((&NTI225932), 0);
	if ((*result).methods) nimGCunrefNoCycle((*result).methods);
	(*result).methods = (Tsymseq225811*) newSeqRC1((&NTI225811), 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_270023(((NI) 64), (&(*r).syms));
	(*r).s = ((NCSTRING) ((*r).memfile.mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_269930((*r).s, ((NimStringDesc*) &TMP1531), ((NI) 0));
		if (!LOC7) goto LA8;
		initiitable_233282((&(*r).index.tab));
		initiitable_233282((&(*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*) &TMP1532)))) goto LA18;
			result = NIM_NIL;
		}
		LA18: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_269260)(Trodreader268030* 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_269550)(NU8 old, NU8 new_269553) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!(old == new_269553)) 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_269553)&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_269173)(Trodreader268030* 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*) &TMP1572));
appendString(LOC25, LOC26);
		internalerror_196191(LOC25);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_269458)(Trodreader268030* r, Tindex268028* 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_232356((*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_232356((*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_233296((&(*idx).tab), key, val);
			{
				TY194829 LOC15;
				if (!!(outf == 0)) goto LA13;
				memset((void*)LOC15, 0, sizeof(LOC15));
				LOC15[0] = nimIntToStr(key);
				LOC15[1] = copyString(((NimStringDesc*) &TMP1573));
				LOC15[2] = nimIntToStr(val);
				LOC15[3] = copyString(((NimStringDesc*) &TMP1574));
				write_17111(outf, LOC15, 4);
			}
			LA13: ;
			(*idx).lastidxkey = key;
			(*idx).lastidxval = val;
			setid_224440(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_269581)(Trodreader268030* r, Sha1digest201009 hash) {
	NimStringDesc* w;
	NI d;
	Sha1digest201009 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_269260(r);
			{
				if (!!(((*r).reason == ((NU8) 1)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			switch (hashString(section) & 31) {
			case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1534))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1535))) goto LA9;
break;
			case 1: 
if (eqStrings(section, ((NimStringDesc*) &TMP1537))) goto LA11;
break;
			case 4: 
if (eqStrings(section, ((NimStringDesc*) &TMP1541))) goto LA15;
break;
			case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1540))) goto LA14;
break;
			case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1538))) goto LA12;
break;
			case 11: 
if (eqStrings(section, ((NimStringDesc*) &TMP1539))) goto LA13;
break;
			case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1550))) goto LA24;
break;
			case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1549))) goto LA23;
break;
			case 14: 
if (eqStrings(section, ((NimStringDesc*) &TMP1533))) goto LA7;
if (eqStrings(section, ((NimStringDesc*) &TMP1536))) goto LA10;
break;
			case 21: 
if (eqStrings(section, ((NimStringDesc*) &TMP1546))) goto LA20;
break;
			case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1544))) goto LA18;
if (eqStrings(section, ((NimStringDesc*) &TMP1545))) goto LA19;
break;
			case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1542))) goto LA16;
break;
			case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1547))) goto LA21;
break;
			case 31: 
if (eqStrings(section, ((NimStringDesc*) &TMP1543))) goto LA17;
if (eqStrings(section, ((NimStringDesc*) &TMP1548))) goto LA22;
break;
			}
			goto LA25;
			LA7: ;
			{
				(*r).pos += ((NI) 1);
				{
					NimStringDesc* LOC30;
					Sha1digest201009 LOC31;
					NIM_BOOL LOC32;
					LOC30 = 0;
					LOC30 = decodestr_232154((*r).s, (&(*r).pos));
					memset((void*)LOC31, 0, sizeof(LOC31));
					parsesecurehash_201107(LOC30, LOC31);
					LOC32 = 0;
					LOC32 = HEX3DHEX3D_201152(hash, LOC31);
					if (!!(LOC32)) goto LA33;
					(*r).reason = ((NU8) 4);
				}
				LA33: ;
			}
			goto LA26;
			LA8: ;
			{
				(*r).pos += ((NI) 1);
				(*r).moduleid = decodevint_232356((*r).s, (&(*r).pos));
				setid_224440((*r).moduleid);
			}
			goto LA26;
			LA9: ;
			{
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*r).origfile), decodestr_232154((*r).s, (&(*r).pos)));
			}
			goto LA26;
			LA10: ;
			{
				NI LOC38;
				(*r).pos += ((NI) 1);
				LOC38 = 0;
				LOC38 = decodevint_232356((*r).s, (&(*r).pos));
				(*r).options = ((NU32) (((NI32) (LOC38))));
				{
					if (!!((goptions_167130 == (*r).options))) goto LA41;
					(*r).reason = ((NU8) 6);
				}
				LA41: ;
			}
			goto LA26;
			LA11: ;
			{
				NU32 dep;
				NI LOC44;
				(*r).pos += ((NI) 1);
				LOC44 = 0;
				LOC44 = decodevint_232356((*r).s, (&(*r).pos));
				dep = ((NU32) (((NI32) (LOC44))));
				{
					if (!!((gglobaloptions_167132 == dep))) goto LA47;
					(*r).reason = ((NU8) 6);
				}
				LA47: ;
			}
			goto LA26;
			LA12: ;
			{
				NU8 dep;
				NI LOC50;
				(*r).pos += ((NI) 1);
				LOC50 = 0;
				LOC50 = decodevint_232356((*r).s, (&(*r).pos));
				dep = ((NU8) (((NI32) (LOC50))));
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = cmdchangetriggersrecompilation_269550(dep, gcmd_167134);
					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_232154((*r).s, (&(*r).pos));
						d += ((NI) 1);
						{
							Tident198021* LOC61;
							NIM_BOOL LOC62;
							LOC61 = 0;
							LOC61 = getident_198463(w);
							LOC62 = 0;
							LOC62 = isdefined_199167(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_199211();
					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_232154((*r).s, (&(*r).pos));
						resolvedpath = findmodule_168549(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_191253(finalpath);
						(*r).files = (TY225932*) 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_232356((*r).s, (&(*r).pos));
						w = tofullpath_191662((*r).files->data[LOC90]);
						(*r).pos += ((NI) 1);
						LOC91 = 0;
						LOC91 = decodestr_232154((*r).s, (&(*r).pos));
						chckNil((void*)inclhash);
						memset((void*)inclhash, 0, sizeof(inclhash));
						parsesecurehash_201107(LOC91, inclhash);
						{
							if (!((*r).reason == ((NU8) 1))) goto LA94;
							{
								NIM_BOOL LOC98;
								NIM_BOOL LOC99;
								Sha1digest201009 LOC101;
								NIM_BOOL LOC102;
								LOC98 = 0;
								LOC99 = 0;
								LOC99 = nosexistsFile(w);
								LOC98 = !(LOC99);
								if (LOC98) goto LA100;
								memset((void*)LOC101, 0, sizeof(LOC101));
								securehashfile_201034(w, LOC101);
								LOC102 = 0;
								LOC102 = HEX3DHEX3D_201152(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_232356((*r).s, (&(*r).pos));
						(*r).moddeps = (TY225932*) 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_269173(r);
			}
			goto LA26;
			LA18: ;
			{
				(*r).compilerprocsidx = (NI)((*r).pos + ((NI) 2));
				skipsection_269173(r);
			}
			goto LA26;
			LA19: ;
			{
				processindex_269458(r, (&(*r).index), NIM_NIL);
			}
			goto LA26;
			LA20: ;
			{
				processindex_269458(r, (&(*r).imports), NIM_NIL);
			}
			goto LA26;
			LA21: ;
			{
				(*r).convertersidx = (NI)((*r).pos + ((NI) 1));
				skipsection_269173(r);
			}
			goto LA26;
			LA22: ;
			{
				(*r).methodsidx = (NI)((*r).pos + ((NI) 1));
				skipsection_269173(r);
			}
			goto LA26;
			LA23: ;
			{
				(*r).dataidx = (NI)((*r).pos + ((NI) 2));
				goto LA1;
			}
			goto LA26;
			LA24: ;
			{
				(*r).initidx = (NI)((*r).pos + ((NI) 2));
				skipsection_269173(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*) &TMP1575));
appendString(LOC130, section);
appendString(LOC130, ((NimStringDesc*) &TMP1576));
appendString(LOC130, LOC131);
appendString(LOC130, ((NimStringDesc*) &TMP1577));
appendString(LOC130, (*r).filename);
				internalerror_196191(LOC130);
				skipsection_269173(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_270760)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	Sha1digest201009 hash;
	Trodreader268030* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
{	result = 0;
	{
		if (!((gmods_270323 ? gmods_270323->Sup.len : 0) <= ((NI) (fileidx)))) goto LA3;
		gmods_270323 = (Tfilemodulemap270298*) setLengthSeq(&(gmods_270323)->Sup, sizeof(Tfilemodulerec270296), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_270323->data[fileidx].reason == ((NU8) 0)))) goto LA7;
		result = gmods_270323->data[fileidx].reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_191652(fileidx);
	memset((void*)hash, 0, sizeof(hash));
	chckNil((void*)hash);
	memset((void*)hash, 0, sizeof(hash));
	gethash_270722(fileidx, hash);
	gmods_270323->data[fileidx].reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_168144(filename);
	rodfile = togeneratedfile_168158(LOC9, ((NimStringDesc*) &TMP1528));
	r = newrodreader_269959(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_269581(r, hash);
		result = (*r).reason;
		{
			NU8 res;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_270760(systemfileidx_190633);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			{
				NI i_270875;
				NI HEX3Atmp_270928;
				NI res_270931;
				i_270875 = 0;
				HEX3Atmp_270928 = 0;
				HEX3Atmp_270928 = ((*r).moddeps ? ((*r).moddeps->Sup.len-1) : -1);
				res_270931 = ((NI) 0);
				{
					while (1) {
						if (!(res_270931 <= HEX3Atmp_270928)) goto LA31;
						i_270875 = res_270931;
						res = checkdep_270760((*r).moddeps->data[i_270875]);
						{
							if (!!((res == ((NU8) 1)))) goto LA34;
							result = ((NU8) 8);
						}
						LA34: ;
						res_270931 += ((NI) 1);
					} LA31: ;
				}
			}
		}
		LA23: ;
	}
	LA10: ;
	{
		NimStringDesc* LOC40;
		if (!!((result == ((NU8) 1)))) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_268018[(result)- 0], filename);
		rawmessage_194636(((NU16) 276), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_167132 &(1<<((((NU8) 1))&31)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_267249((&(*r).memfile));
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) (&gmods_270323->data[fileidx].rd), r);
	gmods_270323->data[fileidx].reason = result;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym225841*, newstub_269297)(Trodreader268030* r, NimStringDesc* name, NI id) {
	Tsym225841* result;
	result = 0;
	result = (Tsym225841*) newObj((&NTI225807), sizeof(Tsym225841));
	(*result).Sup.Sup.m_type = (&NTI225841);
	(*result).kind = ((NU8) 23);
	(*result).Sup.id = id;
	asgnRefNoCycle((void**) (&(*result).name), getident_198463(name));
	(*result).position = (*r).readerindex;
	setid_224440(id);
	{
		Tidobj198015* LOC5;
		if (!NIM_FALSE) goto LA3;
		LOC5 = 0;
		LOC5 = &result->Sup;
		registerid_224201(LOC5);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_269320)(Trodreader268030* r, Tsym225841* module) {
	{
		if (!((*r).interfidx == ((NI) 0))) goto LA3;
		internalerror_196191(((NimStringDesc*) &TMP1587));
	}
	LA3: ;
	(*r).pos = (*r).interfidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym225841* 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_232154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_232356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = newstub_269297(r, w, key);
			asgnRefNoCycle((void**) (&(*s).owner), module);
			strtableadd_233103((&(*module).kindU.S3.tab), s);
			HEX5BHEX5DHEX3D_268801((&(*r).syms), (*s).Sup.id, s);
		} LA6: ;
	}
}

N_NIMCALL(void, processcompilerprocs_269378)(Trodreader268030* r, Tsym225841* module) {
	{
		if (!((*r).compilerprocsidx == ((NI) 0))) goto LA3;
		internalerror_196191(((NimStringDesc*) &TMP1588));
	}
	LA3: ;
	(*r).pos = (*r).compilerprocsidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym225841* 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_232154((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_232356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = getordefault_268734((*r).syms, key);
			{
				if (!(s == NIM_NIL)) goto LA11;
				s = newstub_269297(r, w, key);
				asgnRefNoCycle((void**) (&(*s).owner), module);
				HEX5BHEX5DHEX3D_268801((&(*r).syms), (*s).Sup.id, s);
			}
			LA11: ;
			strtableadd_233103((&rodcompilerprocs_268089), s);
		} LA6: ;
	}
}

N_NIMCALL(void, loadconverters_270658)(Trodreader268030* 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_196191(((NimStringDesc*) &TMP1589));
	}
	LA5: ;
	(*r).pos = (*r).convertersidx;
	{
		while (1) {
			NI d;
			Tlineinfo190352 LOC9;
			Tsym225841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_232356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_191408();
			LOC10 = 0;
			LOC10 = rrgetsym_268117(r, d, LOC9);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(void, loadmethods_270685)(Trodreader268030* 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_196191(((NimStringDesc*) &TMP1590));
	}
	LA5: ;
	(*r).pos = (*r).methodsidx;
	{
		while (1) {
			NI d;
			Tlineinfo190352 LOC9;
			Tsym225841* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_232356((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_191408();
			LOC10 = 0;
			LOC10 = rrgetsym_268117(r, d, LOC9);
			(*r).methods = (Tsymseq225811*) incrSeqV2(&((*r).methods)->Sup, sizeof(Tsym225841*));
			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(Trodreader268030*, handlesymbolfile_268094)(Tsym225841* module) {
	Trodreader268030* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
{	result = 0;
	fileidx = ((NI32) ((*module).position));
	{
		if (!!(((gglobaloptions_167132 &(1<<((((NU8) 14))&31)))!=0))) goto LA3;
		(*module).Sup.id = getid_224404();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_124681(gprojectpath_167235, gprojectname_167234);
	loadmaxids_224506(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_270760(fileidx);
	{
		if (!(gmods_270323->data[fileidx].reason == ((NU8) 0))) goto LA9;
		internalerror_196191(((NimStringDesc*) &TMP1586));
	}
	LA9: ;
	result = gmods_270323->data[fileidx].rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.id = (*result).moduleid;
		HEX5BHEX5DHEX3D_268801((&(*result).syms), (*module).Sup.id, module);
		processinterf_269320(result, module);
		processcompilerprocs_269378(result, module);
		loadconverters_270658(result);
		loadmethods_270685(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.id = getid_224404();
	}
	LA11: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode225809*, loadinitsection_268100)(Trodreader268030* r) {
	Tnode225809* 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_196191(((NimStringDesc*) &TMP1592));
	}
	LA5: ;
	oldpos = (*r).pos;
	(*r).pos = (*r).initidx;
	result = newnode_226401(((NU8) 115));
	{
		while (1) {
			NIM_BOOL LOC9;
			NI d;
			NI p;
			Tlineinfo190352 LOC11;
			Tnode225809* 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_232356((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			p = (*r).pos;
			(*r).pos = (NI)(d + (*r).dataidx);
			LOC11 = unknownlineinfo_191408();
			LOC12 = 0;
			LOC12 = decodenode_268395(r, LOC11);
			addson_227819(result, LOC12);
			(*r).pos = p;
		} LA8: ;
	}
	(*r).pos = oldpos;
	return result;
}

static N_INLINE(NI, len_226098)(Tnode225809* 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(Tnode225809*, getbody_271061)(Tsym225841* s) {
	Tnode225809* result;
{	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = (*s).ast == 0;
		if (LOC3) goto LA4;
		LOC5 = 0;
		LOC5 = len_226098((*s).ast);
		LOC3 = (LOC5 <= ((NI) 6));
		LA4: ;
		if (!LOC3) goto LA6;
		result = emptynode_226807;
		goto BeforeRet;
	}
	LA6: ;
	result = (*(*s).ast).kindU.S6.sons->data[((NI) 6)];
	{
		Trodreader268030* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA10;
		r = gmods_270323->data[(*s).position].rd;
		oldpos = (*r).pos;
		(*r).pos = (*s).offset;
		result = decodenode_268395(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_270323) nimGCunref(gmods_270323);
	gmods_270323 = (Tfilemodulemap270298*) newSeqRC1((&NTI270298), 0);
	initidtable_229057((&gtypetable_268112));
	initstrtable_229007((&rodcompilerprocs_268089));
}

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];
NTI270296.size = sizeof(Tfilemodulerec270296);
NTI270296.kind = 18;
NTI270296.base = 0;
TMP896[0] = &TMP888[1];
TMP888[1].kind = 1;
TMP888[1].offset = offsetof(Tfilemodulerec270296, filename);
TMP888[1].typ = (&NTI149);
TMP888[1].name = "filename";
TMP896[1] = &TMP888[2];
NTI268005.size = sizeof(NU8);
NTI268005.kind = 14;
NTI268005.base = 0;
NTI268005.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];
NTI268005.node = &TMP888[12];
TMP888[2].kind = 1;
TMP888[2].offset = offsetof(Tfilemodulerec270296, reason);
TMP888[2].typ = (&NTI268005);
TMP888[2].name = "reason";
TMP896[2] = &TMP888[13];
NTI268030.size = sizeof(Trodreader268030);
NTI268030.kind = 17;
NTI268030.base = (&NTI4011);
TMP900[0] = &TMP888[15];
TMP888[15].kind = 1;
TMP888[15].offset = offsetof(Trodreader268030, pos);
TMP888[15].typ = (&NTI108);
TMP888[15].name = "pos";
TMP900[1] = &TMP888[16];
TMP888[16].kind = 1;
TMP888[16].offset = offsetof(Trodreader268030, s);
TMP888[16].typ = (&NTI151);
TMP888[16].name = "s";
TMP900[2] = &TMP888[17];
TMP888[17].kind = 1;
TMP888[17].offset = offsetof(Trodreader268030, options);
TMP888[17].typ = (&NTI167017);
TMP888[17].name = "options";
TMP900[3] = &TMP888[18];
TMP888[18].kind = 1;
TMP888[18].offset = offsetof(Trodreader268030, reason);
TMP888[18].typ = (&NTI268005);
TMP888[18].name = "reason";
TMP900[4] = &TMP888[19];
TMP888[19].kind = 1;
TMP888[19].offset = offsetof(Trodreader268030, moddeps);
TMP888[19].typ = (&NTI225932);
TMP888[19].name = "modDeps";
TMP900[5] = &TMP888[20];
TMP888[20].kind = 1;
TMP888[20].offset = offsetof(Trodreader268030, files);
TMP888[20].typ = (&NTI225932);
TMP888[20].name = "files";
TMP900[6] = &TMP888[21];
TMP888[21].kind = 1;
TMP888[21].offset = offsetof(Trodreader268030, dataidx);
TMP888[21].typ = (&NTI108);
TMP888[21].name = "dataIdx";
TMP900[7] = &TMP888[22];
TMP888[22].kind = 1;
TMP888[22].offset = offsetof(Trodreader268030, convertersidx);
TMP888[22].typ = (&NTI108);
TMP888[22].name = "convertersIdx";
TMP900[8] = &TMP888[23];
TMP888[23].kind = 1;
TMP888[23].offset = offsetof(Trodreader268030, initidx);
TMP888[23].typ = (&NTI108);
TMP888[23].name = "initIdx";
TMP900[9] = &TMP888[24];
TMP888[24].kind = 1;
TMP888[24].offset = offsetof(Trodreader268030, interfidx);
TMP888[24].typ = (&NTI108);
TMP888[24].name = "interfIdx";
TMP900[10] = &TMP888[25];
TMP888[25].kind = 1;
TMP888[25].offset = offsetof(Trodreader268030, compilerprocsidx);
TMP888[25].typ = (&NTI108);
TMP888[25].name = "compilerProcsIdx";
TMP900[11] = &TMP888[26];
TMP888[26].kind = 1;
TMP888[26].offset = offsetof(Trodreader268030, methodsidx);
TMP888[26].typ = (&NTI108);
TMP888[26].name = "methodsIdx";
TMP900[12] = &TMP888[27];
TMP888[27].kind = 1;
TMP888[27].offset = offsetof(Trodreader268030, filename);
TMP888[27].typ = (&NTI149);
TMP888[27].name = "filename";
TMP900[13] = &TMP888[28];
NTI268028.size = sizeof(Tindex268028);
NTI268028.kind = 18;
NTI268028.base = 0;
NTI268028.flags = 2;
TMP901[0] = &TMP888[30];
TMP888[30].kind = 1;
TMP888[30].offset = offsetof(Tindex268028, lastidxkey);
TMP888[30].typ = (&NTI108);
TMP888[30].name = "lastIdxKey";
TMP901[1] = &TMP888[31];
TMP888[31].kind = 1;
TMP888[31].offset = offsetof(Tindex268028, lastidxval);
TMP888[31].typ = (&NTI108);
TMP888[31].name = "lastIdxVal";
TMP901[2] = &TMP888[32];
TMP888[32].kind = 1;
TMP888[32].offset = offsetof(Tindex268028, tab);
TMP888[32].typ = (&NTI233274);
TMP888[32].name = "tab";
TMP901[3] = &TMP888[33];
TMP888[33].kind = 1;
TMP888[33].offset = offsetof(Tindex268028, r);
TMP888[33].typ = (&NTI149);
TMP888[33].name = "r";
TMP901[4] = &TMP888[34];
TMP888[34].kind = 1;
TMP888[34].offset = offsetof(Tindex268028, offset);
TMP888[34].typ = (&NTI108);
TMP888[34].name = "offset";
TMP888[29].len = 5; TMP888[29].kind = 2; TMP888[29].sons = &TMP901[0];
NTI268028.node = &TMP888[29];
TMP888[28].kind = 1;
TMP888[28].offset = offsetof(Trodreader268030, index);
TMP888[28].typ = (&NTI268028);
TMP888[28].name = "index";
TMP900[14] = &TMP888[35];
TMP888[35].kind = 1;
TMP888[35].offset = offsetof(Trodreader268030, imports);
TMP888[35].typ = (&NTI268028);
TMP888[35].name = "imports";
TMP900[15] = &TMP888[36];
TMP888[36].kind = 1;
TMP888[36].offset = offsetof(Trodreader268030, readerindex);
TMP888[36].typ = (&NTI108);
TMP888[36].name = "readerIndex";
TMP900[16] = &TMP888[37];
TMP888[37].kind = 1;
TMP888[37].offset = offsetof(Trodreader268030, line);
TMP888[37].typ = (&NTI108);
TMP888[37].name = "line";
TMP900[17] = &TMP888[38];
TMP888[38].kind = 1;
TMP888[38].offset = offsetof(Trodreader268030, moduleid);
TMP888[38].typ = (&NTI108);
TMP888[38].name = "moduleID";
TMP900[18] = &TMP888[39];
TMP888[39].kind = 1;
TMP888[39].offset = offsetof(Trodreader268030, syms);
TMP888[39].typ = (&NTI268063);
TMP888[39].name = "syms";
TMP900[19] = &TMP888[40];
TMP888[40].kind = 1;
TMP888[40].offset = offsetof(Trodreader268030, memfile);
TMP888[40].typ = (&NTI266208);
TMP888[40].name = "memfile";
TMP900[20] = &TMP888[41];
TMP888[41].kind = 1;
TMP888[41].offset = offsetof(Trodreader268030, methods);
TMP888[41].typ = (&NTI225811);
TMP888[41].name = "methods";
TMP900[21] = &TMP888[42];
TMP888[42].kind = 1;
TMP888[42].offset = offsetof(Trodreader268030, origfile);
TMP888[42].typ = (&NTI149);
TMP888[42].name = "origFile";
TMP900[22] = &TMP888[43];
TMP888[43].kind = 1;
TMP888[43].offset = offsetof(Trodreader268030, inviewmode);
TMP888[43].typ = (&NTI138);
TMP888[43].name = "inViewMode";
TMP888[14].len = 23; TMP888[14].kind = 2; TMP888[14].sons = &TMP900[0];
NTI268030.node = &TMP888[14];
NTI268032.size = sizeof(Trodreader268030*);
NTI268032.kind = 22;
NTI268032.base = (&NTI268030);
NTI268032.marker = TMP909;
TMP888[13].kind = 1;
TMP888[13].offset = offsetof(Tfilemodulerec270296, rd);
TMP888[13].typ = (&NTI268032);
TMP888[13].name = "rd";
TMP896[3] = &TMP888[44];
TMP888[44].kind = 1;
TMP888[44].offset = offsetof(Tfilemodulerec270296, hash);
TMP888[44].typ = (&NTI201009);
TMP888[44].name = "hash";
TMP896[4] = &TMP888[45];
TMP888[45].kind = 1;
TMP888[45].offset = offsetof(Tfilemodulerec270296, hashdone);
TMP888[45].typ = (&NTI138);
TMP888[45].name = "hashDone";
TMP888[0].len = 5; TMP888[0].kind = 2; TMP888[0].sons = &TMP896[0];
NTI270296.node = &TMP888[0];
NTI270298.size = sizeof(Tfilemodulemap270298*);
NTI270298.kind = 24;
NTI270298.base = (&NTI270296);
NTI270298.marker = TMP910;
}

