/* Generated by Nim Compiler v0.13.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 Tstrtable216794 Tstrtable216794;
typedef struct Tsymseq216792 Tsymseq216792;
typedef struct Tidtable216840 Tidtable216840;
typedef struct Tidpairseq216838 Tidpairseq216838;
typedef struct Tfilemodulemap256077 Tfilemodulemap256077;
typedef struct Tfilemodulerec256075 Tfilemodulerec256075;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Trodreader254021 Trodreader254021;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TNimObject TNimObject;
typedef struct TY216913 TY216913;
typedef struct Tindex254019 Tindex254019;
typedef struct Tiitable223163 Tiitable223163;
typedef struct Tiipairseq223161 Tiipairseq223161;
typedef struct Table254054 Table254054;
typedef struct Keyvaluepairseq254057 Keyvaluepairseq254057;
typedef struct Memfile252202 Memfile252202;
typedef struct Cell47304 Cell47304;
typedef struct Cellseq47320 Cellseq47320;
typedef struct Gcheap49618 Gcheap49618;
typedef struct Gcstack49616 Gcstack49616;
typedef struct Cellset47316 Cellset47316;
typedef struct Pagedesc47312 Pagedesc47312;
typedef struct Memregion29487 Memregion29487;
typedef struct Smallchunk29439 Smallchunk29439;
typedef struct Llchunk29481 Llchunk29481;
typedef struct Bigchunk29441 Bigchunk29441;
typedef struct Intset29414 Intset29414;
typedef struct Trunk29410 Trunk29410;
typedef struct Avlnode29485 Avlnode29485;
typedef struct Gcstat49614 Gcstat49614;
typedef struct Tsym216822 Tsym216822;
typedef struct Tidobj191006 Tidobj191006;
typedef struct Ttypeseq216824 Ttypeseq216824;
typedef struct Tscope216816 Tscope216816;
typedef struct TY216925 TY216925;
typedef struct Ttype216828 Ttype216828;
typedef struct Tident191012 Tident191012;
typedef struct Tlineinfo184337 Tlineinfo184337;
typedef struct Tnode216790 Tnode216790;
typedef struct Tloc216804 Tloc216804;
typedef struct Ropeobj172006 Ropeobj172006;
typedef struct Tlib216808 Tlib216808;
typedef struct Tnodeseq216784 Tnodeseq216784;
typedef struct Tlistentry138010 Tlistentry138010;
typedef struct TY89887 TY89887;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct Tidpair216836 Tidpair216836;
typedef struct Tiipair223159 Tiipair223159;
typedef struct Keyvaluepair254060 Keyvaluepair254060;
typedef struct Basechunk29437 Basechunk29437;
typedef struct Freecell29429 Freecell29429;
typedef struct Tinstantiation216812 Tinstantiation216812;
struct  Tstrtable216794  {
NI counter;
Tsymseq216792* data;
};
struct  Tidtable216840  {
NI counter;
Tidpairseq216838* data;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NU8 Sha1digest194003[20];
struct  Tfilemodulerec256075  {
NimStringDesc* filename;
NU8 reason;
Trodreader254021* rd;
Sha1digest194003 hash;
NIM_BOOL hashdone;
};
typedef N_NIMCALL_PTR(void, TY3489) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3494) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3489 marker;
TY3494 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tiitable223163  {
NI counter;
Tiipairseq223161* data;
};
struct  Tindex254019  {
NI lastidxkey;
NI lastidxval;
Tiitable223163 tab;
NimStringDesc* r;
NI offset;
};
struct  Table254054  {
Keyvaluepairseq254057* data;
NI counter;
};
struct  Memfile252202  {
void* mem;
NI size;
NI fhandle;
NI maphandle;
NIM_BOOL wasopened;
};
struct  Trodreader254021  {
  TNimObject Sup;
NI pos;
NCSTRING s;
NU32 options;
NU8 reason;
TY216913* moddeps;
TY216913* files;
NI dataidx;
NI convertersidx;
NI initidx;
NI interfidx;
NI compilerprocsidx;
NI methodsidx;
NimStringDesc* filename;
Tindex254019 index;
Tindex254019 imports;
NI readerindex;
NI line;
NI moduleid;
Table254054 syms;
Memfile252202 memfile;
Tsymseq216792* methods;
NimStringDesc* origfile;
NIM_BOOL inviewmode;
};
struct  Cell47304  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47320  {
NI len;
NI cap;
Cell47304** d;
};
struct  Cellset47316  {
NI counter;
NI max;
Pagedesc47312* head;
Pagedesc47312** data;
};
typedef Smallchunk29439* TY29502[512];
typedef Trunk29410* Trunkbuckets29412[256];
struct  Intset29414  {
Trunkbuckets29412 data;
};
struct  Memregion29487  {
NI minlargeobj;
NI maxlargeobj;
TY29502 freesmallchunks;
Llchunk29481* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29441* freechunkslist;
Intset29414 chunkstarts;
Avlnode29485* root;
Avlnode29485* deleted;
Avlnode29485* last;
Avlnode29485* freeavlnodes;
};
struct  Gcstat49614  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap49618  {
Gcstack49616* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47320 zct;
Cellseq47320 decstack;
Cellset47316 cycleroots;
Cellseq47320 tempstack;
NI recgclock;
Memregion29487 region;
Gcstat49614 stat;
};
struct  Tidobj191006  {
  TNimObject Sup;
NI id;
};
struct  Tlineinfo184337  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc216804  {
NU8 k;
NU8 s;
NU16 flags;
Ttype216828* t;
Ropeobj172006* r;
Ropeobj172006* heaproot;
};
struct  Tsym216822  {
  Tidobj191006 Sup;
NU8 kind;
union{
struct {Ttypeseq216824* typeinstcache;
Tscope216816* typscope;
} S1;
struct {TY216925* procinstcache;
Tsym216822* gcunsafetyreason;
} S2;
struct {TY216925* usedgenerics;
Tstrtable216794 tab;
} S3;
struct {Tsym216822* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype216828* typ;
Tident191012* name;
Tlineinfo184337 info;
Tsym216822* owner;
NU32 flags;
Tnode216790* ast;
NU32 options;
NI position;
NI offset;
Tloc216804 loc;
Tlib216808* annex;
Tnode216790* constraint;
};
struct  Ttype216828  {
  Tidobj191006 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq216824* sons;
Tnode216790* n;
Tsym216822* owner;
Tsym216822* sym;
Tsym216822* destructor;
Tsym216822* deepcopy;
Tsym216822* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc216804 loc;
};
struct  Tnode216790  {
Ttype216828* typ;
Tlineinfo184337 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym216822* sym;
} S4;
struct {Tident191012* ident;
} S5;
struct {Tnodeseq216784* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tlistentry138010  {
  TNimObject Sup;
Tlistentry138010* prev;
Tlistentry138010* next;
};
struct  Tlib216808  {
  Tlistentry138010 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj172006* name;
Tnode216790* path;
};
struct TY89887 {
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;
} TY17811;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY17811 raiseAction;
};
typedef NimStringDesc* TY187781[4];
typedef NimStringDesc* TY254015[9];
struct  Tidpair216836  {
Tidobj191006* key;
TNimObject* val;
};
struct  Tiipair223159  {
NI key;
NI val;
};
struct Keyvaluepair254060 {
NI Field0;
NI Field1;
Tsym216822* Field2;
};
struct  Gcstack49616  {
Gcstack49616* prev;
Gcstack49616* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY29418[16];
struct  Pagedesc47312  {
Pagedesc47312* next;
NI key;
TY29418 bits;
};
struct  Basechunk29437  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29439  {
  Basechunk29437 Sup;
Smallchunk29439* next;
Smallchunk29439* prev;
Freecell29429* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29481  {
NI size;
NI acc;
Llchunk29481* next;
};
struct  Bigchunk29441  {
  Basechunk29437 Sup;
Bigchunk29441* next;
Bigchunk29441* prev;
NI align;
NF data;
};
struct  Trunk29410  {
Trunk29410* next;
NI key;
TY29418 bits;
};
typedef Avlnode29485* TY29492[2];
struct  Avlnode29485  {
TY29492 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope216816  {
NI depthlevel;
Tstrtable216794 symbols;
Tnodeseq216784* usingsyms;
Tscope216816* parent;
};
struct  Tident191012  {
  Tidobj191006 Sup;
NimStringDesc* s;
Tident191012* next;
NI h;
};
struct  Ropeobj172006  {
  TNimObject Sup;
Ropeobj172006* left;
Ropeobj172006* right;
NI length;
NimStringDesc* data;
};
struct  Freecell29429  {
Freecell29429* next;
NI zerofield;
};
struct  Tinstantiation216812  {
Tsym216822* sym;
Ttypeseq216824* concretetypes;
TY216913* usedby;
NI compilesid;
};
struct Tfilemodulemap256077 {
  TGenericSeq Sup;
  Tfilemodulerec256075 data[SEQ_DECL_SIZE];
};
struct TY216913 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Tsymseq216792 {
  TGenericSeq Sup;
  Tsym216822* data[SEQ_DECL_SIZE];
};
struct Tidpairseq216838 {
  TGenericSeq Sup;
  Tidpair216836 data[SEQ_DECL_SIZE];
};
struct Tiipairseq223161 {
  TGenericSeq Sup;
  Tiipair223159 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq254057 {
  TGenericSeq Sup;
  Keyvaluepair254060 data[SEQ_DECL_SIZE];
};
struct Ttypeseq216824 {
  TGenericSeq Sup;
  Ttype216828* data[SEQ_DECL_SIZE];
};
struct TY216925 {
  TGenericSeq Sup;
  Tinstantiation216812* data[SEQ_DECL_SIZE];
};
struct Tnodeseq216784 {
  TGenericSeq Sup;
  Tnode216790* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP923)(void* p, NI op);
N_NIMCALL(void, TMP924)(void* p, NI op);
static N_INLINE(void, nimGCunref)(void* p);
static N_INLINE(void, decref_53201)(Cell47304* c);
static N_INLINE(void, rtladdzct_52801)(Cell47304* c);
N_NOINLINE(void, addzct_51217)(Cellseq47320* s, Cell47304* c);
static N_INLINE(NIM_BOOL, canbecycleroot_51258)(Cell47304* c);
static N_INLINE(void, rtladdcycleroot_52020)(Cell47304* c);
N_NOINLINE(void, incl_48047)(Cellset47316* s, Cell47304* cell);
static N_INLINE(Cell47304*, usrtocell_51240)(void* usr);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, initidtable_220033)(Tidtable216840* x);
N_NIMCALL(void, initstrtable_220001)(Tstrtable216794* x);
static N_INLINE(void, Gcdisable_9801)(void);
N_NIMCALL(void, rawloadstub_254085)(Tsym216822* s);
N_NIMCALL(void, internalerror_189113)(NimStringDesc* errmsg);
N_NIMCALL(NI, iitableget_223172)(Tiitable223163 t, NI key);
N_NIMCALL(Tsym216822*, decodesymsafepos_256101)(Trodreader254021* rd, NI offset, Tlineinfo184337 info);
N_NIMCALL(void, internalerror_189100)(Tlineinfo184337 info, NimStringDesc* errmsg);
N_NIMCALL(Tsym216822*, decodesym_254635)(Trodreader254021* r, Tlineinfo184337 info);
N_NIMCALL(NI, decodevint_222265)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_215425)(NI id);
N_NIMCALL(Tident191012*, getident_191441)(NimStringDesc* identifier);
N_NIMCALL(NimStringDesc*, decodestr_222111)(NCSTRING s, NI* pos);
N_NIMCALL(Tsym216822*, getordefault_254683)(Table254054 t, NI key);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, HEX5BHEX5DHEX3D_254738)(Table254054* t, NI key, Tsym216822* val);
N_NIMCALL(void, registerid_215201)(Tidobj191006* id);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(Ttype216828*, rrgettype_254095)(Trodreader254021* r, NI id, Tlineinfo184337 info);
N_NIMCALL(TNimObject*, idtableget_223111)(Tidtable216840 t, NI key);
N_NIMCALL(Ttype216828*, decodetype_254457)(Trodreader254021* r, Tlineinfo184337 info);
N_NIMCALL(void, idtableput_223115)(Tidtable216840* t, Tidobj191006* key, TNimObject* val);
N_NIMCALL(Tnode216790*, decodenode_254372)(Trodreader254021* r, Tlineinfo184337 finfo);
N_NIMCALL(Tnode216790*, decodenodelazybody_254231)(Trodreader254021* r, Tlineinfo184337 finfo, Tsym216822* belongsto);
N_NIMCALL(Tnode216790*, newnodei_218248)(NU8 kind, Tlineinfo184337 info);
N_NIMCALL(void, decodelineinfo_254100)(Trodreader254021* r, Tlineinfo184337* info);
N_NIMCALL(Tlineinfo184337, newlineinfo_185024)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_222500)(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(Tsym216822*, rrgetsym_254090)(Trodreader254021* r, NI id, Tlineinfo184337 info);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void, encodevint_222212)(NI x, NimStringDesc** result);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Trodreader254021*, getreader_256147)(NI moduleid);
N_NIMCALL(void, addsonnilallowed_220454)(Tnode216790* father, Tnode216790* son);
N_NIMCALL(void, skipnode_254135)(Trodreader254021* r);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(Tlineinfo184337, unknownlineinfo_185090)(void);
N_NIMCALL(void, decodeloc_254377)(Trodreader254021* r, Tloc216804* loc, Tlineinfo184337 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Ropeobj172006*, rope_172277)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_220408)(Ttype216828* father, Ttype216828* son);
N_NIMCALL(Tlib216808*, decodelib_254593)(Trodreader254021* r, Tlineinfo184337 info);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_53619)(Cell47304* c);
static N_INLINE(void, Gcenable_9803)(void);
static N_INLINE(NI, len_217059)(Tnode216790* n);
static N_INLINE(NI, getid_215401)(void);
N_NIMCALL(void, loadmaxids_215467)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_116874)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_256509)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_185265)(NI32 fileidx);
N_NIMCALL(void, gethash_256480)(NI32 fileidx, Sha1digest194003* Result);
N_NIMCALL(NimStringDesc*, HEX24_189183)(TY89887 x);
N_NIMCALL(void, securehashfile_194016)(NimStringDesc* filename, Sha1digest194003* Result);
N_NIMCALL(NimStringDesc*, tofullpath_185269)(NI32 fileidx);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(NimStringDesc*, togeneratedfile_164078)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_164070)(NimStringDesc* path);
N_NIMCALL(Trodreader254021*, newrodreader_255742)(NimStringDesc* modfilename, Sha1digest194003 hash, NI readerindex);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(Memfile252202, open_252601)(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_255806)(NI initialsize, Table254054* Result);
N_NIMCALL(NIM_BOOL, startswith_255725)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_223168)(Tiitable223163* 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_255408)(Trodreader254021* r, Sha1digest194003 hash);
N_NIMCALL(NimStringDesc*, rdword_255147)(Trodreader254021* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_194087)(Sha1digest194003 a, Sha1digest194003 b);
N_NIMCALL(void, parsesecurehash_194058)(NimStringDesc* hash, Sha1digest194003* Result);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_255383)(NU8 old, NU8 new_255386);
N_NIMCALL(NIM_BOOL, isdefined_192140)(Tident191012* symbol);
N_NIMCALL(NI, countdefinedsymbols_192159)(void);
N_NIMCALL(NimStringDesc*, findmodule_164484)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_185017)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, skipsection_255078)(Trodreader254021* r);
N_NIMCALL(void, processindex_255303)(Trodreader254021* r, Tindex254019* idx, FILE* outf);
N_NIMCALL(void, iitableput_223176)(Tiitable223163* t, NI key, NI val);
N_NIMCALL(void, write_15505)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_187612)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_253221)(Memfile252202* f);
N_NIMCALL(void, processinterf_255189)(Trodreader254021* r, Tsym216822* module);
N_NIMCALL(Tsym216822*, newstub_255172)(Trodreader254021* r, NimStringDesc* name, NI id);
N_NIMCALL(void, strtableadd_223061)(Tstrtable216794* t, Tsym216822* n);
N_NIMCALL(void, processcompilerprocs_255235)(Trodreader254021* r, Tsym216822* module);
N_NIMCALL(void, loadconverters_256440)(Trodreader254021* r);
N_NIMCALL(void, loadmethods_256455)(Trodreader254021* r);
N_NIMCALL(Tnode216790*, newnode_217401)(NU8 kind);
N_NIMCALL(void, addson_218807)(Tnode216790* father, Tnode216790* son);
STRING_LITERAL(TMP1057, "loadStub", 8);
STRING_LITERAL(TMP1058, "loadStub: invalid key", 21);
STRING_LITERAL(TMP1076, "dataIdx == 0", 12);
STRING_LITERAL(TMP1077, "decodeSym: no id", 16);
STRING_LITERAL(TMP1079, "decodeSym: no ident", 19);
STRING_LITERAL(TMP1080, "decodeSym: wrong id", 19);
STRING_LITERAL(TMP1081, "rrGetType", 9);
STRING_LITERAL(TMP1082, "decodeType: no id", 17);
STRING_LITERAL(TMP1084, "", 0);
STRING_LITERAL(TMP1085, "decodeNode: nkIdent", 19);
STRING_LITERAL(TMP1087, "missing from both indexes: +", 28);
STRING_LITERAL(TMP1088, "rrGetSym: no reader found: +", 28);
STRING_LITERAL(TMP1089, "decodeNode: nkSym", 17);
STRING_LITERAL(TMP1090, "decodeNode: \')\' missing", 23);
STRING_LITERAL(TMP1091, "decodeNode: \'(\' missing ", 24);
STRING_LITERAL(TMP1092, "decodeLoc ", 10);
STRING_LITERAL(TMP1093, "decodeType ^(", 13);
STRING_LITERAL(TMP1094, "decodeLib: 1", 12);
STRING_LITERAL(TMP1095, "decodeLib: 2", 12);
STRING_LITERAL(TMP1096, "loadStub: wrong symbol", 22);
STRING_LITERAL(TMP1097, "loadStub: wrong ID", 18);
STRING_LITERAL(TMP1575, "compiler/rodread.nim", 20);
NIM_CONST TY89887 TMP1574 = {((NimStringDesc*) &TMP1575),
((NI) 800)}
;
STRING_LITERAL(TMP1576, "rod", 3);
STRING_LITERAL(TMP1579, "NIM:", 4);
STRING_LITERAL(TMP1580, "1215", 4);
STRING_LITERAL(TMP1581, "HASH", 4);
STRING_LITERAL(TMP1582, "ID", 2);
STRING_LITERAL(TMP1583, "ORIGFILE", 8);
STRING_LITERAL(TMP1584, "OPTIONS", 7);
STRING_LITERAL(TMP1585, "GOPTIONS", 8);
STRING_LITERAL(TMP1586, "CMD", 3);
STRING_LITERAL(TMP1587, "DEFINES", 7);
STRING_LITERAL(TMP1588, "FILES", 5);
STRING_LITERAL(TMP1589, "INCLUDES", 8);
STRING_LITERAL(TMP1590, "DEPS", 4);
STRING_LITERAL(TMP1591, "INTERF", 6);
STRING_LITERAL(TMP1592, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1593, "INDEX", 5);
STRING_LITERAL(TMP1594, "IMPORTS", 7);
STRING_LITERAL(TMP1595, "CONVERTERS", 10);
STRING_LITERAL(TMP1596, "METHODS", 7);
STRING_LITERAL(TMP1597, "DATA", 4);
STRING_LITERAL(TMP1598, "INIT", 4);
STRING_LITERAL(TMP1620, "skipSection ", 12);
STRING_LITERAL(TMP1621, " ", 1);
STRING_LITERAL(TMP1622, "\015\012", 2);
STRING_LITERAL(TMP1623, "invalid section: \'", 18);
STRING_LITERAL(TMP1624, "\' at ", 5);
STRING_LITERAL(TMP1625, " in ", 4);
STRING_LITERAL(TMP1626, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1627, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1628, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1629, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1630, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1631, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1632, "an include file edited: $1", 26);
STRING_LITERAL(TMP1633, "a module $1 depends on has changed", 34);
NIM_CONST TY254015 reasontofrmt_254012 = {((NimStringDesc*) &TMP1084),
((NimStringDesc*) &TMP1626),
((NimStringDesc*) &TMP1627),
((NimStringDesc*) &TMP1628),
((NimStringDesc*) &TMP1629),
((NimStringDesc*) &TMP1630),
((NimStringDesc*) &TMP1631),
((NimStringDesc*) &TMP1632),
((NimStringDesc*) &TMP1633)}
;
STRING_LITERAL(TMP1634, "handleSymbolFile", 16);
STRING_LITERAL(TMP1635, "processInterf", 13);
STRING_LITERAL(TMP1636, "processCompilerProcs", 20);
STRING_LITERAL(TMP1637, "importConverters", 16);
STRING_LITERAL(TMP1638, "loadMethods", 11);
STRING_LITERAL(TMP1640, "loadInitSection", 15);
Tstrtable216794 rodcompilerprocs_254077;
Tidtable216840 gtypetable_254088;
Tfilemodulemap256077* gmods_256099;
TNimType NTI256075; /* TFileModuleRec */
extern TNimType NTI138; /* string */
TNimType NTI254002; /* TReasonForRecompile */
extern TNimType NTI3608; /* RootObj */
TNimType NTI254021; /* TRodReader */
extern TNimType NTI104; /* int */
extern TNimType NTI140; /* cstring */
extern TNimType NTI163011; /* TOptions */
extern TNimType NTI216913; /* seq[int32] */
TNimType NTI254019; /* TIndex */
extern TNimType NTI223163; /* TIITable */
extern TNimType NTI254054; /* Table */
extern TNimType NTI252202; /* MemFile */
extern TNimType NTI216792; /* TSymSeq */
extern TNimType NTI130; /* bool */
TNimType NTI254023; /* PRodReader */
extern TNimType NTI194003; /* Sha1Digest */
TNimType NTI256077; /* TFileModuleMap */
extern Gcheap49618 gch_49659;
extern NI gfrontendid_215003;
extern TNimType NTI216788; /* PSym */
extern TNimType NTI216822; /* TSym */
extern TNimType NTI216786; /* PType */
extern TNimType NTI216828; /* TType */
extern TNimType NTI216820; /* PLib */
extern TNimType NTI216808; /* TLib */
extern Tnode216790* emptynode_217801;
extern NU32 gglobaloptions_163121;
extern NimStringDesc* gprojectpath_163200;
extern NimStringDesc* gprojectname_163199;
extern TSafePoint* exchandler_19437;
extern TNimType NTI3630; /* OSError */
extern Exception* currexception_19439;
extern NU32 goptions_163119;
extern NU8 gcmd_163123;
extern NI32 systemfileidx_184630;
N_NIMCALL(void, TMP923)(void* p, NI op) {
	Trodreader254021* a;
	a = (Trodreader254021*)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, TMP924)(void* p, NI op) {
	Tfilemodulemap256077* a;
	NI LOC1;
	a = (Tfilemodulemap256077*)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_52801)(Cell47304* c) {
	addzct_51217((&gch_49659.zct), c);
}

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

static N_INLINE(void, rtladdcycleroot_52020)(Cell47304* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_48047((&gch_49659.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_53201)(Cell47304* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_52801(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_51258(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_52020(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

static N_INLINE(void, nimGCunref)(void* p) {
	Cell47304* LOC1;
	LOC1 = 0;
	LOC1 = usrtocell_51240(p);
	decref_53201(LOC1);
}

static N_INLINE(void, Gcdisable_9801)(void) {
	gch_49659.recgclock += ((NI) 1);
}

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

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

N_NIMCALL(void, decodelineinfo_254100)(Trodreader254021* r, Tlineinfo184337* 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_222265((*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_222265((*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_222265((*r).s, (&(*r).pos));
				(*info) = newlineinfo_185024((*r).files->data[LOC25], ((NI) ((*info).line)), ((NI) ((*info).col)));
			}
			LA23: ;
		}
		LA13: ;
	}
	LA3: ;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Cell47304* c;
	c = usrtocell_51240(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_52801(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(Trodreader254021*, getreader_256147)(NI moduleid) {
	Trodreader254021* result;
{	result = 0;
	{
		NI i_256176;
		NI HEX3Atmp_256190;
		NI res_256193;
		i_256176 = 0;
		HEX3Atmp_256190 = 0;
		HEX3Atmp_256190 = ((gmods_256099 ? gmods_256099->Sup.len : 0) - 1);
		res_256193 = ((NI) 0);
		{
			while (1) {
				if (!(res_256193 <= HEX3Atmp_256190)) goto LA3;
				i_256176 = res_256193;
				result = gmods_256099->data[i_256176].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_256193 += ((NI) 1);
			} LA3: ;
		}
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym216822*, rrgetsym_254090)(Trodreader254021* r, NI id, Tlineinfo184337 info) {
	Tsym216822* result;
	result = 0;
	result = getordefault_254683((*r).syms, id);
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA3;
		d = iitableget_223172((*r).index.tab, id);
		{
			NI moduleid;
			Trodreader254021* rd;
			if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
			moduleid = iitableget_223172((*r).imports.tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC13;
				if (!(moduleid < ((NI) 0))) goto LA11;
				x = copyString(((NimStringDesc*) &TMP1084));
				encodevint_222212(id, (&x));
				LOC13 = 0;
				LOC13 = rawNewString(x->Sup.len + 28);
appendString(LOC13, ((NimStringDesc*) &TMP1087));
appendString(LOC13, x);
				internalerror_189100(info, LOC13);
			}
			LA11: ;
			rd = getreader_256147(moduleid);
			d = iitableget_223172((*rd).index.tab, id);
			{
				if (!!((d == ((NI) (-2147483647 -1))))) goto LA16;
				result = decodesymsafepos_256101(rd, d, info);
			}
			goto LA14;
			LA16: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC19;
				x = copyString(((NimStringDesc*) &TMP1084));
				encodevint_222212(id, (&x));
				LOC19 = 0;
				LOC19 = rawNewString(x->Sup.len + 28);
appendString(LOC19, ((NimStringDesc*) &TMP1088));
appendString(LOC19, x);
				internalerror_189100(info, LOC19);
			}
			LA14: ;
		}
		goto LA5;
		LA7: ;
		{
			result = decodesymsafepos_256101(r, d, info);
		}
		LA5: ;
	}
	LA3: ;
	{
		NIM_BOOL LOC23;
		LOC23 = 0;
		LOC23 = !((result == NIM_NIL));
		if (!(LOC23)) goto LA24;
		LOC23 = ((*result).kind == ((NU8) 22));
		LA24: ;
		if (!LOC23) goto LA25;
		rawloadstub_254085(result);
	}
	LA25: ;
	return result;
}

N_NIMCALL(void, skipnode_254135)(Trodreader254021* 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(Tnode216790*, decodenodelazybody_254231)(Trodreader254021* r, Tlineinfo184337 finfo, Tsym216822* belongsto) {
	Tnode216790* 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_222265((*r).s, (&(*r).pos));
		result = newnodei_218248(((NU8) (LOC9)), finfo);
		decodelineinfo_254100(r, (&(*result).info));
		{
			NI LOC14;
			if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA12;
			(*r).pos += ((NI) 1);
			LOC14 = 0;
			LOC14 = decodevint_222265((*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_222265((*r).s, (&(*r).pos));
			asgnRefNoCycle((void**) (&(*result).typ), rrgettype_254095(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_222500((*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_222111((*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_222111((*r).s, (&(*r).pos)));
			}
			goto LA30;
			LA32: ;
			{
				NimStringDesc* LOC35;
				LOC35 = 0;
				LOC35 = (*result).kindU.S3.strval; (*result).kindU.S3.strval = copyStringRC1(((NimStringDesc*) &TMP1084));
				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_222111((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S5.ident), getident_191441(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_189100((*result).info, ((NimStringDesc*) &TMP1085));
			}
			LA37: ;
		}
		break;
		case ((NU8) 3):
		{
			{
				NI id;
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(33))) goto LA45;
				(*r).pos += ((NI) 1);
				id = decodevint_222265((*r).s, (&(*r).pos));
				asgnRefNoCycle((void**) (&(*result).kindU.S4.sym), rrgetsym_254090(r, id, (*result).info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_189100((*result).info, ((NimStringDesc*) &TMP1089));
			}
			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_220454(result, NIM_NIL);
						(*belongsto).offset = (*r).pos;
						skipnode_254135(r);
					}
					goto LA51;
					LA55: ;
					{
						Tnode216790* LOC58;
						LOC58 = 0;
						LOC58 = decodenodelazybody_254231(r, (*result).info, NIM_NIL);
						addsonnilallowed_220454(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_189100((*result).info, ((NimStringDesc*) &TMP1090));
		}
		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*) &TMP1091));
appendString(LOC65, LOC66);
		internalerror_189100(finfo, LOC65);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode216790*, decodenode_254372)(Trodreader254021* r, Tlineinfo184337 finfo) {
	Tnode216790* result;
	result = 0;
	result = decodenodelazybody_254231(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_254377)(Trodreader254021* r, Tloc216804* loc, Tlineinfo184337 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_222265((*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_222265((*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_222265((*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_222265((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).t), rrgettype_254095(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_222111((*r).s, (&(*r).pos));
			unsureAsgnRef((void**) (&(*loc).r), rope_172277(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*) &TMP1092));
appendChar(LOC40, (*r).s[(*r).pos]);
			internalerror_189100(info, LOC40);
		}
		LA35: ;
	}
	LA3: ;
}

N_NIMCALL(Ttype216828*, decodetype_254457)(Trodreader254021* r, Tlineinfo184337 info) {
	Ttype216828* result;
	NI LOC9;
	Tidobj191006* 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 = (Ttype216828*) newObj((&NTI216786), sizeof(Ttype216828));
	(*result).Sup.Sup.m_type = (&NTI216828);
	LOC9 = 0;
	LOC9 = decodevint_222265((*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_222265((*r).s, (&(*r).pos));
		setid_215425((*result).Sup.id);
		{
			Tidobj191006* LOC18;
			if (!NIM_FALSE) goto LA16;
			LOC18 = 0;
			LOC18 = &result->Sup;
			registerid_215201(LOC18);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_189100(info, ((NimStringDesc*) &TMP1082));
	}
	LA10: ;
	LOC20 = 0;
	LOC20 = &result->Sup;
	LOC21 = 0;
	LOC21 = &result->Sup.Sup;
	idtableput_223115((&gtypetable_254088), LOC20, LOC21);
	{
		Tlineinfo184337 LOC26;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA24;
		LOC26 = unknownlineinfo_185090();
		asgnRefNoCycle((void**) (&(*result).n), decodenode_254372(r, LOC26));
	}
	LA24: ;
	{
		NI LOC31;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(36))) goto LA29;
		(*r).pos += ((NI) 1);
		LOC31 = 0;
		LOC31 = decodevint_222265((*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_222265((*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_222265((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_254090(r, LOC41, info));
	}
	LA39: ;
	{
		NI LOC46;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA44;
		(*r).pos += ((NI) 1);
		LOC46 = 0;
		LOC46 = decodevint_222265((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).sym), rrgetsym_254090(r, LOC46, info));
	}
	LA44: ;
	{
		NI LOC51;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(47))) goto LA49;
		(*r).pos += ((NI) 1);
		LOC51 = 0;
		LOC51 = decodevint_222265((*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_222265((*r).s, (&(*r).pos));
		(*result).align = ((NI16) (LOC57));
	}
	goto LA53;
	LA55: ;
	{
		(*result).align = ((NI16) 2);
	}
	LA53: ;
	decodeloc_254377(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*) &TMP1093));
appendChar(LOC70, (*r).s[(*r).pos]);
					internalerror_189100(info, LOC70);
				}
				LA65: ;
				rawaddson_220408(result, NIM_NIL);
			}
			goto LA61;
			LA63: ;
			{
				NI d;
				Ttype216828* LOC72;
				d = decodevint_222265((*r).s, (&(*r).pos));
				LOC72 = 0;
				LOC72 = rrgettype_254095(r, d, info);
				rawaddson_220408(result, LOC72);
			}
			LA61: ;
		} LA60: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Ttype216828*, rrgettype_254095)(Trodreader254021* r, NI id, Tlineinfo184337 info) {
	Ttype216828* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_223111(gtypetable_254088, id);
	result = ((Ttype216828*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).pos;
		d = iitableget_223172((*r).index.tab, id);
		{
			if (!(d == ((NI) (-2147483647 -1)))) goto LA8;
			internalerror_189100(info, ((NimStringDesc*) &TMP1081));
		}
		LA8: ;
		(*r).pos = (NI)(d + (*r).dataidx);
		result = decodetype_254457(r, info);
		(*r).pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(Tlib216808*, decodelib_254593)(Trodreader254021* r, Tlineinfo184337 info) {
	Tlib216808* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(124))) goto LA3;
		result = (Tlib216808*) newObj((&NTI216820), sizeof(Tlib216808));
		(*result).Sup.Sup.m_type = (&NTI216808);
		(*r).pos += ((NI) 1);
		LOC5 = 0;
		LOC5 = decodevint_222265((*r).s, (&(*r).pos));
		(*result).kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA8;
			internalerror_189113(((NimStringDesc*) &TMP1094));
		}
		LA8: ;
		(*r).pos += ((NI) 1);
		LOC10 = 0;
		LOC10 = decodestr_222111((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).name), rope_172277(LOC10));
		{
			if (!!(((NU8)((*r).s[(*r).pos]) == (NU8)(124)))) goto LA13;
			internalerror_189113(((NimStringDesc*) &TMP1095));
		}
		LA13: ;
		(*r).pos += ((NI) 1);
		asgnRefNoCycle((void**) (&(*result).path), decodenode_254372(r, info));
	}
	LA3: ;
	return result;
}

static N_INLINE(void, incref_53619)(Cell47304* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_51258(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_52020(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell47304* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_51240(src);
		incref_53619(LOC5);
	}
	LA3: ;
	{
		Cell47304* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_51240((*dest));
		decref_53201(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Tsym216822*, decodesym_254635)(Trodreader254021* r, Tlineinfo184337 info) {
	Tsym216822* result;
	NI id;
	Tident191012* 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_222265((*r).s, (&(*r).pos));
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(43))) goto LA12;
		(*r).pos += ((NI) 1);
		id = decodevint_222265((*r).s, (&(*r).pos));
		setid_215425(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_189100(info, ((NimStringDesc*) &TMP1077));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(38))) goto LA17;
		(*r).pos += ((NI) 1);
		LOC19 = 0;
		LOC19 = decodestr_222111((*r).s, (&(*r).pos));
		ident = getident_191441(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_189100(info, ((NimStringDesc*) &TMP1079));
	}
	LA15: ;
	result = getordefault_254683((*r).syms, id);
	{
		if (!(result == NIM_NIL)) goto LA23;
		result = (Tsym216822*) newObj((&NTI216788), sizeof(Tsym216822));
		(*result).Sup.Sup.m_type = (&NTI216822);
		(*result).Sup.id = id;
		HEX5BHEX5DHEX3D_254738((&(*r).syms), (*result).Sup.id, result);
		{
			Tidobj191006* LOC29;
			if (!NIM_FALSE) goto LA27;
			LOC29 = 0;
			LOC29 = &result->Sup;
			registerid_215201(LOC29);
		}
		LA27: ;
	}
	goto LA21;
	LA23: ;
	{
		if (!!(((*result).Sup.id == id))) goto LA31;
		internalerror_189100(info, ((NimStringDesc*) &TMP1080));
	}
	goto LA21;
	LA31: ;
	{
		NIM_BOOL LOC34;
		LOC34 = 0;
		LOC34 = !(((*result).kind == ((NU8) 22)));
		if (!(LOC34)) goto LA35;
		LOC34 = !((*r).inviewmode);
		LA35: ;
		if (!LOC34) goto LA36;
		goto BeforeRet;
	}
	goto LA21;
	LA36: ;
	{
		genericReset((void*)(&(*result)), (&NTI216822));
		(*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_222265((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).typ), rrgettype_254095(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_254100(r, (&(*result).info));
	{
		NI LOC48;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(42))) goto LA46;
		(*r).pos += ((NI) 1);
		LOC48 = 0;
		LOC48 = decodevint_222265((*r).s, (&(*r).pos));
		asgnRefNoCycle((void**) (&(*result).owner), rrgetsym_254090(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_222265((*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_222265((*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_222265((*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_222265((*r).s, (&(*r).pos));
	}
	goto LA65;
	LA67: ;
	{
		if (!!(((258112 &(1U<<((NU)((*result).kind)&31U)))!=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_222265((*r).s, (&(*r).pos));
	}
	goto LA72;
	LA74: ;
	{
		(*result).offset = ((NI) -1);
	}
	LA72: ;
	decodeloc_254377(r, (&(*result).loc), (*result).info);
	asgnRef((void**) (&(*result).annex), decodelib_254593(r, info));
	{
		Tlineinfo184337 LOC81;
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(35))) goto LA79;
		(*r).pos += ((NI) 1);
		LOC81 = unknownlineinfo_185090();
		asgnRefNoCycle((void**) (&(*result).constraint), decodenode_254372(r, LOC81));
	}
	LA79: ;
	{
		if (!((NU8)((*r).s[(*r).pos]) == (NU8)(40))) goto LA84;
		{
			if (!((258048 &(1U<<((NU)((*result).kind)&31U)))!=0)) goto LA88;
			asgnRefNoCycle((void**) (&(*result).ast), decodenodelazybody_254231(r, (*result).info, result));
			(*result).position = (*r).readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) (&(*result).ast), decodenode_254372(r, (*result).info));
		}
		LA86: ;
	}
	LA84: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym216822*, decodesymsafepos_256101)(Trodreader254021* rd, NI offset, Tlineinfo184337 info) {
	Tsym216822* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).dataidx == ((NI) 0))) goto LA3;
		internalerror_189100(info, ((NimStringDesc*) &TMP1076));
	}
	LA3: ;
	oldpos = (*rd).pos;
	(*rd).pos = (NI)(offset + (*rd).dataidx);
	result = decodesym_254635(rd, info);
	(*rd).pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_254085)(Tsym216822* s) {
	Trodreader254021* rd;
	NI theid;
	NI d;
	Tsym216822* rs;
	Tlineinfo184337 LOC9;
	{
		if (!!(((*s).kind == ((NU8) 22)))) goto LA3;
		internalerror_189113(((NimStringDesc*) &TMP1057));
	}
	LA3: ;
	rd = gmods_256099->data[(*s).position].rd;
	theid = (*s).Sup.id;
	d = iitableget_223172((*rd).index.tab, (*s).Sup.id);
	{
		if (!(d == ((NI) (-2147483647 -1)))) goto LA7;
		internalerror_189113(((NimStringDesc*) &TMP1058));
	}
	LA7: ;
	LOC9 = unknownlineinfo_185090();
	rs = decodesymsafepos_256101(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_189100((*rs).info, ((NimStringDesc*) &TMP1096));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.id == theid))) goto LA15;
		internalerror_189100((*rs).info, ((NimStringDesc*) &TMP1097));
	}
	goto LA10;
	LA15: ;
	LA10: ;
}

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

N_NIMCALL(void, loadstub_256825)(Tsym216822* s) {
	Gcdisable_9801();
	rawloadstub_254085(s);
	Gcenable_9803();
}

static N_INLINE(NI, len_217059)(Tnode216790* 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(Tnode216790*, getbody_256828)(Tsym216822* s) {
	Tnode216790* result;
{	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = (*s).ast == 0;
		if (LOC3) goto LA4;
		LOC5 = 0;
		LOC5 = len_217059((*s).ast);
		LOC3 = (LOC5 <= ((NI) 6));
		LA4: ;
		if (!LOC3) goto LA6;
		result = emptynode_217801;
		goto BeforeRet;
	}
	LA6: ;
	result = (*(*s).ast).kindU.S6.sons->data[((NI) 6)];
	{
		Trodreader254021* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA10;
		r = gmods_256099->data[(*s).position].rd;
		oldpos = (*r).pos;
		(*r).pos = (*s).offset;
		result = decodenode_254372(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;
}

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

N_NIMCALL(void, gethash_256480)(NI32 fileidx, Sha1digest194003* Result) {
	NimStringDesc* LOC12;
{	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < (gmods_256099 ? gmods_256099->Sup.len : 0));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_189183(TMP1574);
		internalerror_189113(LOC7);
	}
	LA5: ;
	{
		if (!gmods_256099->data[fileidx].hashdone) goto LA10;
		memcpy((void*)(*Result), (NIM_CONST void*)gmods_256099->data[fileidx].hash, sizeof(Sha1digest194003));
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofullpath_185269(fileidx);
	chckNil((void*)Result);
	genericReset((void*)Result, (&NTI194003));
	securehashfile_194016(LOC12, Result);
	memcpy((void*)gmods_256099->data[fileidx].hash, (NIM_CONST void*)(*Result), sizeof(Sha1digest194003));
	}BeforeRet: ;
}

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

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

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

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

N_NIMCALL(NIM_BOOL, startswith_255725)(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(Trodreader254021*, newrodreader_255742)(NimStringDesc* modfilename, Sha1digest194003 hash, NI readerindex) {
	Trodreader254021* result;
	TSafePoint TMP1577;
	Trodreader254021* r;
	NimStringDesc* LOC4;
{	result = 0;
	result = (Trodreader254021*) newObj((&NTI254023), sizeof(Trodreader254021));
	(*result).Sup.m_type = (&NTI254021);
	pushSafePoint(&TMP1577);
	TMP1577.status = setjmp(TMP1577.context);
	if (TMP1577.status == 0) {
		(*result).memfile = open_252601(modfilename, ((NU8) 0), ((NI) -1), ((NI) 0), ((NI) -1));
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI3630))) {
			TMP1577.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1577.status != 0) reraiseException();
	if ((*result).files) nimGCunrefNoCycle((*result).files);
	(*result).files = (TY216913*) newSeqRC1((&NTI216913), 0);
	if ((*result).moddeps) nimGCunrefNoCycle((*result).moddeps);
	(*result).moddeps = (TY216913*) newSeqRC1((&NTI216913), 0);
	if ((*result).methods) nimGCunrefNoCycle((*result).methods);
	(*result).methods = (Tsymseq216792*) newSeqRC1((&NTI216792), 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_255806(((NI) 64), (&(*r).syms));
	(*r).s = ((NCSTRING) ((*r).memfile.mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_255725((*r).s, ((NimStringDesc*) &TMP1579), ((NI) 0));
		if (!LOC7) goto LA8;
		initiitable_223168((&(*r).index.tab));
		initiitable_223168((&(*r).imports.tab));
		(*r).pos += ((NI) 4);
		version = copyString(((NimStringDesc*) &TMP1084));
		{
			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*) &TMP1580)))) goto LA18;
			result = NIM_NIL;
		}
		LA18: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_255147)(Trodreader254021* r) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1084));
	{
		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_255383)(NU8 old, NU8 new_255386) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!(old == new_255386)) 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 &(1U<<((NU)(new_255386)&31U)))!=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_255078)(Trodreader254021* 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*) &TMP1620));
appendString(LOC25, LOC26);
		internalerror_189113(LOC25);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_255303)(Trodreader254021* r, Tindex254019* 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_222265((*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_222265((*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_223176((&(*idx).tab), key, val);
			{
				TY187781 LOC15;
				if (!!(outf == 0)) goto LA13;
				memset((void*)LOC15, 0, sizeof(LOC15));
				LOC15[0] = nimIntToStr(key);
				LOC15[1] = copyString(((NimStringDesc*) &TMP1621));
				LOC15[2] = nimIntToStr(val);
				LOC15[3] = copyString(((NimStringDesc*) &TMP1622));
				write_15505(outf, LOC15, 4);
			}
			LA13: ;
			(*idx).lastidxkey = key;
			(*idx).lastidxval = val;
			setid_215425(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_255408)(Trodreader254021* r, Sha1digest194003 hash) {
	NimStringDesc* w;
	NI d;
	Sha1digest194003 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_255147(r);
			{
				if (!!(((*r).reason == ((NU8) 1)))) goto LA5;
				goto LA1;
			}
			LA5: ;
			switch (hashString(section) & 31) {
			case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1582))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1589))) goto LA15;
break;
			case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1583))) goto LA9;
if (eqStrings(section, ((NimStringDesc*) &TMP1593))) goto LA19;
break;
			case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1584))) goto LA10;
if (eqStrings(section, ((NimStringDesc*) &TMP1586))) goto LA12;
if (eqStrings(section, ((NimStringDesc*) &TMP1596))) goto LA22;
break;
			case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1598))) goto LA24;
break;
			case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1587))) goto LA13;
if (eqStrings(section, ((NimStringDesc*) &TMP1597))) goto LA23;
break;
			case 14: 
if (eqStrings(section, ((NimStringDesc*) &TMP1581))) goto LA7;
break;
			case 17: 
if (eqStrings(section, ((NimStringDesc*) &TMP1588))) goto LA14;
break;
			case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1585))) goto LA11;
if (eqStrings(section, ((NimStringDesc*) &TMP1595))) goto LA21;
break;
			case 26: 
if (eqStrings(section, ((NimStringDesc*) &TMP1591))) goto LA17;
break;
			case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1590))) goto LA16;
break;
			case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1594))) goto LA20;
break;
			case 30: 
if (eqStrings(section, ((NimStringDesc*) &TMP1592))) goto LA18;
break;
			}
			goto LA25;
			LA7: ;
			{
				(*r).pos += ((NI) 1);
				{
					NimStringDesc* LOC30;
					Sha1digest194003 LOC31;
					NIM_BOOL LOC32;
					LOC30 = 0;
					LOC30 = decodestr_222111((*r).s, (&(*r).pos));
					memset((void*)LOC31, 0, sizeof(LOC31));
					parsesecurehash_194058(LOC30, LOC31);
					LOC32 = 0;
					LOC32 = HEX3DHEX3D_194087(hash, LOC31);
					if (!!(LOC32)) goto LA33;
					(*r).reason = ((NU8) 4);
				}
				LA33: ;
			}
			goto LA26;
			LA8: ;
			{
				(*r).pos += ((NI) 1);
				(*r).moduleid = decodevint_222265((*r).s, (&(*r).pos));
				setid_215425((*r).moduleid);
			}
			goto LA26;
			LA9: ;
			{
				(*r).pos += ((NI) 1);
				asgnRefNoCycle((void**) (&(*r).origfile), decodestr_222111((*r).s, (&(*r).pos)));
			}
			goto LA26;
			LA10: ;
			{
				NI LOC38;
				(*r).pos += ((NI) 1);
				LOC38 = 0;
				LOC38 = decodevint_222265((*r).s, (&(*r).pos));
				(*r).options = ((NU32) (((NI32) (LOC38))));
				{
					if (!!((goptions_163119 == (*r).options))) goto LA41;
					(*r).reason = ((NU8) 6);
				}
				LA41: ;
			}
			goto LA26;
			LA11: ;
			{
				NU32 dep;
				NI LOC44;
				(*r).pos += ((NI) 1);
				LOC44 = 0;
				LOC44 = decodevint_222265((*r).s, (&(*r).pos));
				dep = ((NU32) (((NI32) (LOC44))));
				{
					if (!!((gglobaloptions_163121 == dep))) goto LA47;
					(*r).reason = ((NU8) 6);
				}
				LA47: ;
			}
			goto LA26;
			LA12: ;
			{
				NU8 dep;
				NI LOC50;
				(*r).pos += ((NI) 1);
				LOC50 = 0;
				LOC50 = decodevint_222265((*r).s, (&(*r).pos));
				dep = ((NU8) (((NI32) (LOC50))));
				{
					NIM_BOOL LOC53;
					LOC53 = 0;
					LOC53 = cmdchangetriggersrecompilation_255383(dep, gcmd_163123);
					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_222111((*r).s, (&(*r).pos));
						d += ((NI) 1);
						{
							Tident191012* LOC61;
							NIM_BOOL LOC62;
							LOC61 = 0;
							LOC61 = getident_191441(w);
							LOC62 = 0;
							LOC62 = isdefined_192140(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_192159();
					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_222111((*r).s, (&(*r).pos));
						resolvedpath = findmodule_164484(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_185017(finalpath);
						(*r).files = (TY216913*) 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_222265((*r).s, (&(*r).pos));
						w = tofullpath_185269((*r).files->data[LOC90]);
						(*r).pos += ((NI) 1);
						LOC91 = 0;
						LOC91 = decodestr_222111((*r).s, (&(*r).pos));
						chckNil((void*)inclhash);
						memset((void*)inclhash, 0, sizeof(inclhash));
						parsesecurehash_194058(LOC91, inclhash);
						{
							if (!((*r).reason == ((NU8) 1))) goto LA94;
							{
								NIM_BOOL LOC98;
								NIM_BOOL LOC99;
								Sha1digest194003 LOC101;
								NIM_BOOL LOC102;
								LOC98 = 0;
								LOC99 = 0;
								LOC99 = nosexistsFile(w);
								LOC98 = !(LOC99);
								if (LOC98) goto LA100;
								memset((void*)LOC101, 0, sizeof(LOC101));
								securehashfile_194016(w, LOC101);
								LOC102 = 0;
								LOC102 = HEX3DHEX3D_194087(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_222265((*r).s, (&(*r).pos));
						(*r).moddeps = (TY216913*) 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_255078(r);
			}
			goto LA26;
			LA18: ;
			{
				(*r).compilerprocsidx = (NI)((*r).pos + ((NI) 2));
				skipsection_255078(r);
			}
			goto LA26;
			LA19: ;
			{
				processindex_255303(r, (&(*r).index), NIM_NIL);
			}
			goto LA26;
			LA20: ;
			{
				processindex_255303(r, (&(*r).imports), NIM_NIL);
			}
			goto LA26;
			LA21: ;
			{
				(*r).convertersidx = (NI)((*r).pos + ((NI) 1));
				skipsection_255078(r);
			}
			goto LA26;
			LA22: ;
			{
				(*r).methodsidx = (NI)((*r).pos + ((NI) 1));
				skipsection_255078(r);
			}
			goto LA26;
			LA23: ;
			{
				(*r).dataidx = (NI)((*r).pos + ((NI) 2));
				goto LA1;
			}
			goto LA26;
			LA24: ;
			{
				(*r).initidx = (NI)((*r).pos + ((NI) 2));
				skipsection_255078(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*) &TMP1623));
appendString(LOC130, section);
appendString(LOC130, ((NimStringDesc*) &TMP1624));
appendString(LOC130, LOC131);
appendString(LOC130, ((NimStringDesc*) &TMP1625));
appendString(LOC130, (*r).filename);
				internalerror_189113(LOC130);
				skipsection_255078(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_256509)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	Sha1digest194003 hash;
	Trodreader254021* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
{	result = 0;
	{
		if (!((gmods_256099 ? gmods_256099->Sup.len : 0) <= ((NI) (fileidx)))) goto LA3;
		gmods_256099 = (Tfilemodulemap256077*) setLengthSeq(&(gmods_256099)->Sup, sizeof(Tfilemodulerec256075), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_256099->data[fileidx].reason == ((NU8) 0)))) goto LA7;
		result = gmods_256099->data[fileidx].reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_185265(fileidx);
	memset((void*)hash, 0, sizeof(hash));
	chckNil((void*)hash);
	memset((void*)hash, 0, sizeof(hash));
	gethash_256480(fileidx, hash);
	gmods_256099->data[fileidx].reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_164070(filename);
	rodfile = togeneratedfile_164078(LOC9, ((NimStringDesc*) &TMP1576));
	r = newrodreader_255742(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_255408(r, hash);
		result = (*r).reason;
		{
			NU8 res;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_256509(systemfileidx_184630);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			{
				NI i_256674;
				NI HEX3Atmp_256727;
				NI res_256730;
				i_256674 = 0;
				HEX3Atmp_256727 = 0;
				HEX3Atmp_256727 = ((*r).moddeps ? ((*r).moddeps->Sup.len-1) : -1);
				res_256730 = ((NI) 0);
				{
					while (1) {
						if (!(res_256730 <= HEX3Atmp_256727)) goto LA31;
						i_256674 = res_256730;
						res = checkdep_256509((*r).moddeps->data[i_256674]);
						{
							if (!!((res == ((NU8) 1)))) goto LA34;
							result = ((NU8) 8);
						}
						LA34: ;
						res_256730 += ((NI) 1);
					} LA31: ;
				}
			}
		}
		LA23: ;
	}
	LA10: ;
	{
		NimStringDesc* LOC40;
		if (!!((result == ((NU8) 1)))) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_254012[(result)- 0], filename);
		rawmessage_187612(((NU16) 276), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_163121 &(1U<<((NU)(((NU8) 1))&31U)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_253221((&(*r).memfile));
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) (&gmods_256099->data[fileidx].rd), r);
	gmods_256099->data[fileidx].reason = result;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym216822*, newstub_255172)(Trodreader254021* r, NimStringDesc* name, NI id) {
	Tsym216822* result;
	result = 0;
	result = (Tsym216822*) newObj((&NTI216788), sizeof(Tsym216822));
	(*result).Sup.Sup.m_type = (&NTI216822);
	(*result).kind = ((NU8) 22);
	(*result).Sup.id = id;
	asgnRefNoCycle((void**) (&(*result).name), getident_191441(name));
	(*result).position = (*r).readerindex;
	setid_215425(id);
	{
		Tidobj191006* LOC5;
		if (!NIM_FALSE) goto LA3;
		LOC5 = 0;
		LOC5 = &result->Sup;
		registerid_215201(LOC5);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_255189)(Trodreader254021* r, Tsym216822* module) {
	{
		if (!((*r).interfidx == ((NI) 0))) goto LA3;
		internalerror_189113(((NimStringDesc*) &TMP1635));
	}
	LA3: ;
	(*r).pos = (*r).interfidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym216822* 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_222111((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_222265((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = newstub_255172(r, w, key);
			asgnRefNoCycle((void**) (&(*s).owner), module);
			strtableadd_223061((&(*module).kindU.S3.tab), s);
			HEX5BHEX5DHEX3D_254738((&(*r).syms), (*s).Sup.id, s);
		} LA6: ;
	}
}

N_NIMCALL(void, processcompilerprocs_255235)(Trodreader254021* r, Tsym216822* module) {
	{
		if (!((*r).compilerprocsidx == ((NI) 0))) goto LA3;
		internalerror_189113(((NimStringDesc*) &TMP1636));
	}
	LA3: ;
	(*r).pos = (*r).compilerprocsidx;
	{
		while (1) {
			NIM_BOOL LOC7;
			NimStringDesc* w;
			NI key;
			Tsym216822* 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_222111((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			key = decodevint_222265((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			s = getordefault_254683((*r).syms, key);
			{
				if (!(s == NIM_NIL)) goto LA11;
				s = newstub_255172(r, w, key);
				asgnRefNoCycle((void**) (&(*s).owner), module);
				HEX5BHEX5DHEX3D_254738((&(*r).syms), (*s).Sup.id, s);
			}
			LA11: ;
			strtableadd_223061((&rodcompilerprocs_254077), s);
		} LA6: ;
	}
}

N_NIMCALL(void, loadconverters_256440)(Trodreader254021* 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_189113(((NimStringDesc*) &TMP1637));
	}
	LA5: ;
	(*r).pos = (*r).convertersidx;
	{
		while (1) {
			NI d;
			Tlineinfo184337 LOC9;
			Tsym216822* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_222265((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_185090();
			LOC10 = 0;
			LOC10 = rrgetsym_254090(r, d, LOC9);
			{
				if (!((NU8)((*r).s[(*r).pos]) == (NU8)(32))) goto LA13;
				(*r).pos += ((NI) 1);
			}
			LA13: ;
		} LA8: ;
	}
}

N_NIMCALL(void, loadmethods_256455)(Trodreader254021* 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_189113(((NimStringDesc*) &TMP1638));
	}
	LA5: ;
	(*r).pos = (*r).methodsidx;
	{
		while (1) {
			NI d;
			Tlineinfo184337 LOC9;
			Tsym216822* LOC10;
			if (!((NU8)(10) < (NU8)((*r).s[(*r).pos]))) goto LA8;
			d = decodevint_222265((*r).s, (&(*r).pos));
			LOC9 = unknownlineinfo_185090();
			LOC10 = 0;
			LOC10 = rrgetsym_254090(r, d, LOC9);
			(*r).methods = (Tsymseq216792*) incrSeqV2(&((*r).methods)->Sup, sizeof(Tsym216822*));
			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(Trodreader254021*, handlesymbolfile_254079)(Tsym216822* module) {
	Trodreader254021* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
{	result = 0;
	fileidx = ((NI32) ((*module).position));
	{
		if (!!(((gglobaloptions_163121 &(1U<<((NU)(((NU8) 14))&31U)))!=0))) goto LA3;
		(*module).Sup.id = getid_215401();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_116874(gprojectpath_163200, gprojectname_163199);
	loadmaxids_215467(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_256509(fileidx);
	{
		if (!(gmods_256099->data[fileidx].reason == ((NU8) 0))) goto LA9;
		internalerror_189113(((NimStringDesc*) &TMP1634));
	}
	LA9: ;
	result = gmods_256099->data[fileidx].rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.id = (*result).moduleid;
		HEX5BHEX5DHEX3D_254738((&(*result).syms), (*module).Sup.id, module);
		processinterf_255189(result, module);
		processcompilerprocs_255235(result, module);
		loadconverters_256440(result);
		loadmethods_256455(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.id = getid_215401();
	}
	LA11: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode216790*, loadinitsection_254082)(Trodreader254021* r) {
	Tnode216790* 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_189113(((NimStringDesc*) &TMP1640));
	}
	LA5: ;
	oldpos = (*r).pos;
	(*r).pos = (*r).initidx;
	result = newnode_217401(((NU8) 115));
	{
		while (1) {
			NIM_BOOL LOC9;
			NI d;
			NI p;
			Tlineinfo184337 LOC11;
			Tnode216790* 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_222265((*r).s, (&(*r).pos));
			(*r).pos += ((NI) 1);
			p = (*r).pos;
			(*r).pos = (NI)(d + (*r).dataidx);
			LOC11 = unknownlineinfo_185090();
			LOC12 = 0;
			LOC12 = decodenode_254372(r, LOC11);
			addson_218807(result, LOC12);
			(*r).pos = p;
		} LA8: ;
	}
	(*r).pos = oldpos;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_rodreadInit000)(void) {
	if (gmods_256099) nimGCunref(gmods_256099);
	gmods_256099 = (Tfilemodulemap256077*) newSeqRC1((&NTI256077), 0);
	initidtable_220033((&gtypetable_254088));
	initstrtable_220001((&rodcompilerprocs_254077));
}

NIM_EXTERNC N_NOINLINE(void, compiler_rodreadDatInit000)(void) {
static TNimNode* TMP910[5];
static TNimNode* TMP911[9];
NI TMP913;
static char* NIM_CONST TMP912[9] = {
"rrEmpty", 
"rrNone", 
"rrRodDoesNotExist", 
"rrRodInvalid", 
"rrHashChange", 
"rrDefines", 
"rrOptions", 
"rrInclDeps", 
"rrModDeps"};
static TNimNode* TMP914[23];
static TNimNode* TMP915[5];
static TNimNode TMP902[46];
NTI256075.size = sizeof(Tfilemodulerec256075);
NTI256075.kind = 18;
NTI256075.base = 0;
TMP910[0] = &TMP902[1];
TMP902[1].kind = 1;
TMP902[1].offset = offsetof(Tfilemodulerec256075, filename);
TMP902[1].typ = (&NTI138);
TMP902[1].name = "filename";
TMP910[1] = &TMP902[2];
NTI254002.size = sizeof(NU8);
NTI254002.kind = 14;
NTI254002.base = 0;
NTI254002.flags = 3;
for (TMP913 = 0; TMP913 < 9; TMP913++) {
TMP902[TMP913+3].kind = 1;
TMP902[TMP913+3].offset = TMP913;
TMP902[TMP913+3].name = TMP912[TMP913];
TMP911[TMP913] = &TMP902[TMP913+3];
}
TMP902[12].len = 9; TMP902[12].kind = 2; TMP902[12].sons = &TMP911[0];
NTI254002.node = &TMP902[12];
TMP902[2].kind = 1;
TMP902[2].offset = offsetof(Tfilemodulerec256075, reason);
TMP902[2].typ = (&NTI254002);
TMP902[2].name = "reason";
TMP910[2] = &TMP902[13];
NTI254021.size = sizeof(Trodreader254021);
NTI254021.kind = 17;
NTI254021.base = (&NTI3608);
TMP914[0] = &TMP902[15];
TMP902[15].kind = 1;
TMP902[15].offset = offsetof(Trodreader254021, pos);
TMP902[15].typ = (&NTI104);
TMP902[15].name = "pos";
TMP914[1] = &TMP902[16];
TMP902[16].kind = 1;
TMP902[16].offset = offsetof(Trodreader254021, s);
TMP902[16].typ = (&NTI140);
TMP902[16].name = "s";
TMP914[2] = &TMP902[17];
TMP902[17].kind = 1;
TMP902[17].offset = offsetof(Trodreader254021, options);
TMP902[17].typ = (&NTI163011);
TMP902[17].name = "options";
TMP914[3] = &TMP902[18];
TMP902[18].kind = 1;
TMP902[18].offset = offsetof(Trodreader254021, reason);
TMP902[18].typ = (&NTI254002);
TMP902[18].name = "reason";
TMP914[4] = &TMP902[19];
TMP902[19].kind = 1;
TMP902[19].offset = offsetof(Trodreader254021, moddeps);
TMP902[19].typ = (&NTI216913);
TMP902[19].name = "modDeps";
TMP914[5] = &TMP902[20];
TMP902[20].kind = 1;
TMP902[20].offset = offsetof(Trodreader254021, files);
TMP902[20].typ = (&NTI216913);
TMP902[20].name = "files";
TMP914[6] = &TMP902[21];
TMP902[21].kind = 1;
TMP902[21].offset = offsetof(Trodreader254021, dataidx);
TMP902[21].typ = (&NTI104);
TMP902[21].name = "dataIdx";
TMP914[7] = &TMP902[22];
TMP902[22].kind = 1;
TMP902[22].offset = offsetof(Trodreader254021, convertersidx);
TMP902[22].typ = (&NTI104);
TMP902[22].name = "convertersIdx";
TMP914[8] = &TMP902[23];
TMP902[23].kind = 1;
TMP902[23].offset = offsetof(Trodreader254021, initidx);
TMP902[23].typ = (&NTI104);
TMP902[23].name = "initIdx";
TMP914[9] = &TMP902[24];
TMP902[24].kind = 1;
TMP902[24].offset = offsetof(Trodreader254021, interfidx);
TMP902[24].typ = (&NTI104);
TMP902[24].name = "interfIdx";
TMP914[10] = &TMP902[25];
TMP902[25].kind = 1;
TMP902[25].offset = offsetof(Trodreader254021, compilerprocsidx);
TMP902[25].typ = (&NTI104);
TMP902[25].name = "compilerProcsIdx";
TMP914[11] = &TMP902[26];
TMP902[26].kind = 1;
TMP902[26].offset = offsetof(Trodreader254021, methodsidx);
TMP902[26].typ = (&NTI104);
TMP902[26].name = "methodsIdx";
TMP914[12] = &TMP902[27];
TMP902[27].kind = 1;
TMP902[27].offset = offsetof(Trodreader254021, filename);
TMP902[27].typ = (&NTI138);
TMP902[27].name = "filename";
TMP914[13] = &TMP902[28];
NTI254019.size = sizeof(Tindex254019);
NTI254019.kind = 18;
NTI254019.base = 0;
NTI254019.flags = 2;
TMP915[0] = &TMP902[30];
TMP902[30].kind = 1;
TMP902[30].offset = offsetof(Tindex254019, lastidxkey);
TMP902[30].typ = (&NTI104);
TMP902[30].name = "lastIdxKey";
TMP915[1] = &TMP902[31];
TMP902[31].kind = 1;
TMP902[31].offset = offsetof(Tindex254019, lastidxval);
TMP902[31].typ = (&NTI104);
TMP902[31].name = "lastIdxVal";
TMP915[2] = &TMP902[32];
TMP902[32].kind = 1;
TMP902[32].offset = offsetof(Tindex254019, tab);
TMP902[32].typ = (&NTI223163);
TMP902[32].name = "tab";
TMP915[3] = &TMP902[33];
TMP902[33].kind = 1;
TMP902[33].offset = offsetof(Tindex254019, r);
TMP902[33].typ = (&NTI138);
TMP902[33].name = "r";
TMP915[4] = &TMP902[34];
TMP902[34].kind = 1;
TMP902[34].offset = offsetof(Tindex254019, offset);
TMP902[34].typ = (&NTI104);
TMP902[34].name = "offset";
TMP902[29].len = 5; TMP902[29].kind = 2; TMP902[29].sons = &TMP915[0];
NTI254019.node = &TMP902[29];
TMP902[28].kind = 1;
TMP902[28].offset = offsetof(Trodreader254021, index);
TMP902[28].typ = (&NTI254019);
TMP902[28].name = "index";
TMP914[14] = &TMP902[35];
TMP902[35].kind = 1;
TMP902[35].offset = offsetof(Trodreader254021, imports);
TMP902[35].typ = (&NTI254019);
TMP902[35].name = "imports";
TMP914[15] = &TMP902[36];
TMP902[36].kind = 1;
TMP902[36].offset = offsetof(Trodreader254021, readerindex);
TMP902[36].typ = (&NTI104);
TMP902[36].name = "readerIndex";
TMP914[16] = &TMP902[37];
TMP902[37].kind = 1;
TMP902[37].offset = offsetof(Trodreader254021, line);
TMP902[37].typ = (&NTI104);
TMP902[37].name = "line";
TMP914[17] = &TMP902[38];
TMP902[38].kind = 1;
TMP902[38].offset = offsetof(Trodreader254021, moduleid);
TMP902[38].typ = (&NTI104);
TMP902[38].name = "moduleID";
TMP914[18] = &TMP902[39];
TMP902[39].kind = 1;
TMP902[39].offset = offsetof(Trodreader254021, syms);
TMP902[39].typ = (&NTI254054);
TMP902[39].name = "syms";
TMP914[19] = &TMP902[40];
TMP902[40].kind = 1;
TMP902[40].offset = offsetof(Trodreader254021, memfile);
TMP902[40].typ = (&NTI252202);
TMP902[40].name = "memfile";
TMP914[20] = &TMP902[41];
TMP902[41].kind = 1;
TMP902[41].offset = offsetof(Trodreader254021, methods);
TMP902[41].typ = (&NTI216792);
TMP902[41].name = "methods";
TMP914[21] = &TMP902[42];
TMP902[42].kind = 1;
TMP902[42].offset = offsetof(Trodreader254021, origfile);
TMP902[42].typ = (&NTI138);
TMP902[42].name = "origFile";
TMP914[22] = &TMP902[43];
TMP902[43].kind = 1;
TMP902[43].offset = offsetof(Trodreader254021, inviewmode);
TMP902[43].typ = (&NTI130);
TMP902[43].name = "inViewMode";
TMP902[14].len = 23; TMP902[14].kind = 2; TMP902[14].sons = &TMP914[0];
NTI254021.node = &TMP902[14];
NTI254023.size = sizeof(Trodreader254021*);
NTI254023.kind = 22;
NTI254023.base = (&NTI254021);
NTI254023.marker = TMP923;
TMP902[13].kind = 1;
TMP902[13].offset = offsetof(Tfilemodulerec256075, rd);
TMP902[13].typ = (&NTI254023);
TMP902[13].name = "rd";
TMP910[3] = &TMP902[44];
TMP902[44].kind = 1;
TMP902[44].offset = offsetof(Tfilemodulerec256075, hash);
TMP902[44].typ = (&NTI194003);
TMP902[44].name = "hash";
TMP910[4] = &TMP902[45];
TMP902[45].kind = 1;
TMP902[45].offset = offsetof(Tfilemodulerec256075, hashdone);
TMP902[45].typ = (&NTI130);
TMP902[45].name = "hashDone";
TMP902[0].len = 5; TMP902[0].kind = 2; TMP902[0].sons = &TMP910[0];
NTI256075.node = &TMP902[0];
NTI256077.size = sizeof(Tfilemodulemap256077*);
NTI256077.kind = 24;
NTI256077.base = (&NTI256075);
NTI256077.marker = TMP924;
}

