/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/rodread.o compiler/nimcache/rodread.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <setjmp.h>

#include <string.h>

#include <stdio.h>
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tsym188833 tsym188833;
typedef struct TGenericSeq TGenericSeq;
typedef struct tidtable188849 tidtable188849;
typedef struct tidpairseq188847 tidpairseq188847;
typedef struct tidpair188845 tidpair188845;
typedef struct tidobj167013 tidobj167013;
typedef struct TNimObject TNimObject;
typedef struct tfilemodulemap238523 tfilemodulemap238523;
typedef struct tfilemodulerec238521 tfilemodulerec238521;
typedef struct NimStringDesc NimStringDesc;
typedef struct trodreader236024 trodreader236024;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct TY188922 TY188922;
typedef struct tindex236022 tindex236022;
typedef struct tiitable197207 tiitable197207;
typedef struct tiipairseq197205 tiipairseq197205;
typedef struct tiipair197203 tiipair197203;
typedef struct tmemfile234204 tmemfile234204;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct ttype188837 ttype188837;
typedef struct tscope188827 tscope188827;
typedef struct TY188933 TY188933;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct tident167019 tident167019;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tnode188803 tnode188803;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
typedef struct TY79484 TY79484;
typedef struct E_Base E_Base;
typedef struct TSafePoint TSafePoint;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tidpair188845  {
tidobj167013* Key;
TNimObject* Val;
};
struct  tidtable188849  {
NI Counter;
tidpairseq188847* Data;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tfilemodulerec238521  {
NimStringDesc* Filename;
NU8 Reason;
trodreader236024* Rd;
NI32 Crc;
NIM_BOOL Crcdone;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tiipair197203  {
NI Key;
NI Val;
};
struct  tiitable197207  {
NI Counter;
tiipairseq197205* Data;
};
struct  tindex236022  {
NI Lastidxkey;
NI Lastidxval;
tiitable197207 Tab;
NimStringDesc* R;
NI Offset;
};
struct  tmemfile234204  {
void* Mem;
NI Size;
int Handle;
};
struct  trodreader236024  {
  TNimObject Sup;
NI Pos;
NCSTRING S;
NU32 Options;
NU8 Reason;
TY188922* Moddeps;
TY188922* Files;
NI Dataidx;
NI Convertersidx;
NI Initidx;
NI Interfidx;
NI Compilerprocsidx;
NI Methodsidx;
NimStringDesc* Filename;
tindex236022 Index;
tindex236022 Imports;
NI Readerindex;
NI Line;
NI Moduleid;
tidtable188849 Syms;
tmemfile234204 Memfile;
tsymseq188805* Methods;
NimStringDesc* Origfile;
NIM_BOOL Inviewmode;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct TY79484 {
NimStringDesc* Field0;
NI Field1;
};
struct  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (E_Base* e, void* ClEnv);
void* ClEnv;
} TY11626;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY11626 raiseAction;
};
typedef NimStringDesc* TY165283[4];
typedef NimStringDesc* TY236015[9];
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct tidpairseq188847 {
  TGenericSeq Sup;
  tidpair188845 data[SEQ_DECL_SIZE];
};
struct tfilemodulemap238523 {
  TGenericSeq Sup;
  tfilemodulerec238521 data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct tiipairseq197205 {
  TGenericSeq Sup;
  tiipair197203 data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP822)(void* p, NI op);
N_NIMCALL(void, TMP823)(void* p, NI op);
static N_INLINE(void, nimGCunref)(void* p);
static N_INLINE(void, decref_46402)(tcell41090* c);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
static N_INLINE(NIM_BOOL, canbecycleroot_44462)(tcell41090* c);
static N_INLINE(void, rtladdcycleroot_45235)(tcell41090* c);
N_NOINLINE(void, incl_41855)(tcellset41102* s, tcell41090* cell);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, initidtable_189120)(tidtable188849* x);
N_NIMCALL(void, initstrtable_189110)(tstrtable188807* x);
static N_INLINE(NI, getid_187402)(void);
N_NIMCALL(void, loadmaxids_187501)(NimStringDesc* project);
N_NIMCALL(NimStringDesc*, HEX2F_108477)(NimStringDesc* head, NimStringDesc* tail);
N_NIMCALL(NU8, checkdep_238973)(NI32 fileidx);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, tofilename_164780)(NI32 fileidx);
N_NIMCALL(NI32, getcrc_238925)(NI32 fileidx);
N_NIMCALL(void, internalerror_165606)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_165714)(TY79484 x_165718);
N_NIMCALL(NI32, crcfromfile_144031)(NimStringDesc* filename);
N_NIMCALL(NimStringDesc*, togeneratedfile_137883)(NimStringDesc* path, NimStringDesc* ext);
N_NIMCALL(NimStringDesc*, withpackagename_137873)(NimStringDesc* path);
N_NIMCALL(trodreader236024*, newrodreader_238340)(NimStringDesc* modfilename, NI32 crc, NI readerindex);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(tmemfile234204, open_234803)(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(E_Base*, getCurrentException)(void);
static N_INLINE(void, popCurrentException)(void);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_46827)(tcell41090* c);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(NIM_BOOL, startswith_238313)(NCSTRING buf, NimStringDesc* token, NI pos);
N_NIMCALL(void, initiitable_197213)(tiitable197207* x);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
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_237795)(trodreader236024* r, NI32 crc);
N_NIMCALL(NimStringDesc*, rdword_237449)(trodreader236024* r);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
N_NIMCALL(NI, decodevint_196305)(NCSTRING s, NI* pos);
static N_INLINE(void, setid_187444)(NI id);
N_NIMCALL(NimStringDesc*, decodestr_196126)(NCSTRING s, NI* pos);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_237765)(NU8 old, NU8 new_237768);
N_NIMCALL(NIM_BOOL, isdefined_168022)(tident167019* symbol);
N_NIMCALL(tident167019*, getident_167456)(NimStringDesc* identifier);
N_NIMCALL(NI, countdefinedsymbols_168042)(void);
N_NIMCALL(NimStringDesc*, findmodule_138312)(NimStringDesc* modulename, NimStringDesc* currentmodule);
N_NIMCALL(NI32, fileinfoidx_163721)(NimStringDesc* filename);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NimStringDesc*, tofullpath_164788)(NI32 fileidx);
N_NIMCALL(void, skipsection_237327)(trodreader236024* r);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, processindex_237635)(trodreader236024* r, tindex236022* idx, FILE* outf);
N_NIMCALL(void, iitableput_197223)(tiitable197207* t, NI key, NI val);
N_NIMCALL(void, write_10479)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(void, rawmessage_165386)(NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_NIMCALL(void, close_235243)(tmemfile234204* f);
N_NIMCALL(void, idtableput_197147)(tidtable188849* t, tidobj167013* key, TNimObject* val);
N_NIMCALL(void, processinterf_237510)(trodreader236024* r, tsym188833* module);
N_NIMCALL(tsym188833*, newstub_237486)(trodreader236024* r, NimStringDesc* name, NI id);
N_NIMCALL(void, registerid_187201)(tidobj167013* id);
N_NIMCALL(void, strtableadd_197078)(tstrtable188807* t, tsym188833* n);
N_NIMCALL(void, processcompilerprocs_237571)(trodreader236024* r, tsym188833* module);
N_NIMCALL(TNimObject*, idtableget_197142)(tidtable188849 t, NI key);
N_NIMCALL(void, loadconverters_238857)(trodreader236024* r);
N_NIMCALL(tsym188833*, rrgetsym_236078)(trodreader236024* r, NI id, tlineinfo163527 info);
N_NIMCALL(NI, iitableget_197218)(tiitable197207 t, NI key);
N_NIMCALL(void, encodevint_196256)(NI x, NimStringDesc** result);
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
N_NIMCALL(trodreader236024*, getreader_238604)(NI moduleid);
N_NIMCALL(tsym188833*, decodesymsafepos_238553)(trodreader236024* rd, NI offset, tlineinfo163527 info);
N_NIMCALL(tsym188833*, decodesym_237010)(trodreader236024* r, tlineinfo163527 info);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(ttype188837*, rrgettype_236084)(trodreader236024* r, NI id, tlineinfo163527 info);
N_NIMCALL(ttype188837*, decodetype_236707)(trodreader236024* r, tlineinfo163527 info);
N_NIMCALL(tnode188803*, decodenode_236556)(trodreader236024* r, tlineinfo163527 finfo);
N_NIMCALL(tnode188803*, decodenodelazybody_236254)(trodreader236024* r, tlineinfo163527 finfo, tsym188833* belongsto);
N_NIMCALL(tnode188803*, newnodei_189099)(NU8 kind, tlineinfo163527 info);
N_NIMCALL(void, decodelineinfo_236090)(trodreader236024* r, tlineinfo163527* info);
N_NIMCALL(tlineinfo163527, newlineinfo_164069)(NI32 fileinfoidx, NI line, NI col);
N_NIMCALL(NI64, decodevbiggestint_196516)(NCSTRING s, NI* pos);
N_NIMCALL(NF, nsuParseFloat)(NimStringDesc* s);
N_NIMCALL(void, addsonnilallowed_193294)(tnode188803* father, tnode188803* son);
N_NIMCALL(void, skipnode_236148)(trodreader236024* r);
N_NIMCALL(tlineinfo163527, unknownlineinfo_164203)(void);
N_NIMCALL(void, decodeloc_236563)(trodreader236024* r, tloc188817* loc, tlineinfo163527 info);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(trope145007*, torope_145058)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(void, rawaddson_193092)(ttype188837* father, ttype188837* son);
N_NIMCALL(tlib188821*, decodelib_236937)(trodreader236024* r, tlineinfo163527 info);
N_NIMCALL(void, rawloadstub_236071)(tsym188833* s);
N_NIMCALL(void, loadmethods_238882)(trodreader236024* r);
N_NIMCALL(tnode188803*, newnode_189065)(NU8 kind);
N_NIMCALL(void, addson_189207)(tnode188803* father, tnode188803* son);
static N_INLINE(void, gcdisable_6602)(void);
static N_INLINE(void, gcenable_6604)(void);
STRING_LITERAL(TMP1722, "compiler/rodread.nim", 20);
NIM_CONST TY79484 TMP1721 = {((NimStringDesc*) &TMP1722),
803}
;
STRING_LITERAL(TMP1723, "rod", 3);
STRING_LITERAL(TMP1725, "NIM:", 4);
STRING_LITERAL(TMP1726, "", 0);
STRING_LITERAL(TMP1727, "1215", 4);
STRING_LITERAL(TMP1728, "CRC", 3);
STRING_LITERAL(TMP1729, "ID", 2);
STRING_LITERAL(TMP1730, "ORIGFILE", 8);
STRING_LITERAL(TMP1731, "OPTIONS", 7);
STRING_LITERAL(TMP1732, "GOPTIONS", 8);
STRING_LITERAL(TMP1733, "CMD", 3);
STRING_LITERAL(TMP1734, "DEFINES", 7);
STRING_LITERAL(TMP1735, "FILES", 5);
STRING_LITERAL(TMP1736, "INCLUDES", 8);
STRING_LITERAL(TMP1737, "DEPS", 4);
STRING_LITERAL(TMP1738, "INTERF", 6);
STRING_LITERAL(TMP1739, "COMPILERPROCS", 13);
STRING_LITERAL(TMP1740, "INDEX", 5);
STRING_LITERAL(TMP1741, "IMPORTS", 7);
STRING_LITERAL(TMP1742, "CONVERTERS", 10);
STRING_LITERAL(TMP1743, "METHODS", 7);
STRING_LITERAL(TMP1744, "DATA", 4);
STRING_LITERAL(TMP1745, "INIT", 4);
STRING_LITERAL(TMP1748, "skipSection ", 12);
STRING_LITERAL(TMP1749, " ", 1);
STRING_LITERAL(TMP1750, "\012", 1);
STRING_LITERAL(TMP1751, "invalid section: \'", 18);
STRING_LITERAL(TMP1752, "\' at ", 5);
STRING_LITERAL(TMP1753, " in ", 4);
STRING_LITERAL(TMP1754, "no need to recompile: $1", 24);
STRING_LITERAL(TMP1755, "symbol file for $1 does not exist", 33);
STRING_LITERAL(TMP1756, "symbol file for $1 has the wrong version", 40);
STRING_LITERAL(TMP1757, "file edited since last compilation: $1", 38);
STRING_LITERAL(TMP1758, "list of conditional symbols changed for: $1", 43);
STRING_LITERAL(TMP1759, "list of options changed for: $1", 31);
STRING_LITERAL(TMP1760, "an include file edited: $1", 26);
STRING_LITERAL(TMP1761, "a module $1 depends on has changed", 34);
NIM_CONST TY236015 reasontofrmt_236014 = {((NimStringDesc*) &TMP1726),
((NimStringDesc*) &TMP1754),
((NimStringDesc*) &TMP1755),
((NimStringDesc*) &TMP1756),
((NimStringDesc*) &TMP1757),
((NimStringDesc*) &TMP1758),
((NimStringDesc*) &TMP1759),
((NimStringDesc*) &TMP1760),
((NimStringDesc*) &TMP1761)}
;
STRING_LITERAL(TMP1762, "handleSymbolFile", 16);
STRING_LITERAL(TMP1763, "processInterf", 13);
STRING_LITERAL(TMP1764, "processCompilerProcs", 20);
STRING_LITERAL(TMP1765, "importConverters", 16);
STRING_LITERAL(TMP1767, "missing from both indexes: +", 28);
STRING_LITERAL(TMP1768, "dataIdx == 0", 12);
STRING_LITERAL(TMP1769, "decodeSym: no id", 16);
STRING_LITERAL(TMP1770, "decodeSym: no ident", 19);
STRING_LITERAL(TMP1771, "decodeSym: wrong id", 19);
STRING_LITERAL(TMP1772, "rrGetType", 9);
STRING_LITERAL(TMP1773, "decodeType: no id", 17);
STRING_LITERAL(TMP1774, "decodeNode: nkIdent", 19);
STRING_LITERAL(TMP1775, "decodeNode: nkSym", 17);
STRING_LITERAL(TMP1776, "decodeNode: \')\' missing", 23);
STRING_LITERAL(TMP1777, "decodeNode: \'(\' missing ", 24);
STRING_LITERAL(TMP1778, "decodeLoc ", 10);
STRING_LITERAL(TMP1779, "decodeType ^(", 13);
STRING_LITERAL(TMP1780, "decodeLib: 1", 12);
STRING_LITERAL(TMP1781, "decodeLib: 2", 12);
STRING_LITERAL(TMP1782, "rrGetSym: no reader found: +", 28);
STRING_LITERAL(TMP1783, "loadStub", 8);
STRING_LITERAL(TMP1784, "loadStub: invalid key", 21);
STRING_LITERAL(TMP1785, "loadStub: wrong symbol", 22);
STRING_LITERAL(TMP1786, "loadStub: wrong ID", 18);
STRING_LITERAL(TMP1787, "loadMethods", 11);
STRING_LITERAL(TMP1789, "loadInitSection", 15);
tstrtable188807 rodcompilerprocs_236058;
tidtable188849 gtypetable_236075;
tfilemodulemap238523* gmods_238550;
TNimType NTI238521; /* TFileModuleRec */
extern TNimType NTI143; /* string */
TNimType NTI236003; /* TReasonForRecompile */
extern TNimType NTI2409; /* TObject */
TNimType NTI236024; /* TRodReader */
extern TNimType NTI106; /* int */
extern TNimType NTI145; /* cstring */
extern TNimType NTI137012; /* TOptions */
extern TNimType NTI188922; /* seq[int32] */
TNimType NTI236022; /* TIndex */
extern TNimType NTI197207; /* TIITable */
extern TNimType NTI188849; /* TIdTable */
extern TNimType NTI234204; /* TMemFile */
extern TNimType NTI188805; /* TSymSeq */
extern TNimType NTI134; /* bool */
TNimType NTI236026; /* PRodReader */
extern TNimType NTI144007; /* TCrc32 */
TNimType NTI238523; /* TFileModuleMap */
extern tgcheap43016 gch_43044;
extern NU32 gglobaloptions_137111;
extern NI gfrontendid_187007;
extern NimStringDesc* gprojectpath_137207;
extern NimStringDesc* gprojectname_137206;
extern TSafePoint* exchandler_13039;
extern TNimType NTI2435; /* EOS */
extern E_Base* currexception_13041;
extern NU32 goptions_137108;
extern NU8 gcmd_137113;
extern NI32 systemfileidx_163641;
extern NI gverbosity_137120;
extern TNimType NTI188801; /* PSym */
extern TNimType NTI188833; /* TSym */
extern TNimType NTI188799; /* PType */
extern TNimType NTI188837; /* TType */
extern TNimType NTI188831; /* PLib */
extern TNimType NTI188821; /* TLib */
N_NIMCALL(void, TMP822)(void* p, NI op) {
	trodreader236024* a;
	a = (trodreader236024*)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, TMP823)(void* p, NI op) {
	tfilemodulemap238523* a;
	NI LOC1;
	a = (tfilemodulemap238523*)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_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

static N_INLINE(NIM_BOOL, canbecycleroot_44462)(tcell41090* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).Typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_45235)(tcell41090* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_41855(&gch_43044.Cycleroots, c);
	}
	LA3: ;
}

static N_INLINE(void, decref_46402)(tcell41090* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_44462(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_45235(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

static N_INLINE(void, nimGCunref)(void* p) {
	tcell41090* LOC1;
	LOC1 = 0;
	LOC1 = usrtocell_44443(p);
	decref_46402(LOC1);
}

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

N_NIMCALL(NI32, getcrc_238925)(NI32 fileidx) {
	NI32 result;
	NimStringDesc* LOC12;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (((NI32) 0) <= fileidx);
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) (fileidx)) < gmods_238550->Sup.len);
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_165714(TMP1721);
		internalerror_165606(LOC7);
	}
	LA5: ;
	{
		if (!gmods_238550->data[fileidx].Crcdone) goto LA10;
		result = gmods_238550->data[fileidx].Crc;
		goto BeforeRet;
	}
	LA10: ;
	LOC12 = 0;
	LOC12 = tofilename_164780(fileidx);
	result = crcfromfile_144031(LOC12);
	gmods_238550->data[fileidx].Crc = result;
	BeforeRet: ;
	return result;
}

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

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

static N_INLINE(E_Base*, getCurrentException)(void) {
	E_Base* result;
	result = 0;
	result = currexception_13041;
	return result;
}

static N_INLINE(void, incref_46827)(tcell41090* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_44462(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_45235(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell41090* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_44443(src);
		incref_46827(LOC5);
	}
	LA3: ;
	{
		tcell41090* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_44443((*dest));
		decref_46402(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(void, popCurrentException)(void) {
	asgnRef((void**) &currexception_13041, (*currexception_13041).parent);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, startswith_238313)(NCSTRING buf, NimStringDesc* token, NI pos) {
	NIM_BOOL result;
	NI s;
	result = 0;
	s = 0;
	while (1) {
		NIM_BOOL LOC2;
		LOC2 = 0;
		LOC2 = (s < token->Sup.len);
		if (!(LOC2)) goto LA3;
		LOC2 = ((NU8)(buf[(NI32)(pos + s)]) == (NU8)(token->data[s]));
		LA3: ;
		if (!LOC2) goto LA1;
		s += 1;
	} LA1: ;
	result = (s == token->Sup.len);
	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)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(trodreader236024*, newrodreader_238340)(NimStringDesc* modfilename, NI32 crc, NI readerindex) {
	trodreader236024* result;
	TSafePoint TMP1724;
	trodreader236024* r;
	NimStringDesc* LOC4;
	result = 0;
	result = (trodreader236024*) newObj((&NTI236026), sizeof(trodreader236024));
	(*result).Sup.m_type = (&NTI236024);
	pushSafePoint(&TMP1724);
	TMP1724.status = setjmp(TMP1724.context);
	if (TMP1724.status == 0) {
		(*result).Memfile = open_234803(modfilename, ((NU8) 0), -1, 0, -1);
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI2435))) {
			TMP1724.status = 0;
			result = NIM_NIL;
			popCurrentException();
			goto BeforeRet;
			popCurrentException();
		}
	}
	if (TMP1724.status != 0) reraiseException();
	if ((*result).Files) nimGCunrefNoCycle((*result).Files);
	(*result).Files = (TY188922*) newSeqRC1((&NTI188922), 0);
	if ((*result).Moddeps) nimGCunrefNoCycle((*result).Moddeps);
	(*result).Moddeps = (TY188922*) newSeqRC1((&NTI188922), 0);
	if ((*result).Methods) nimGCunrefNoCycle((*result).Methods);
	(*result).Methods = (tsymseq188805*) newSeqRC1((&NTI188805), 0);
	r = result;
	(*r).Reason = ((NU8) 1);
	(*r).Pos = 0;
	(*r).Line = 1;
	(*r).Readerindex = readerindex;
	LOC4 = 0;
	LOC4 = (*r).Filename; (*r).Filename = copyStringRC1(modfilename);
	if (LOC4) nimGCunrefNoCycle(LOC4);
	initidtable_189120(&(*r).Syms);
	(*r).S = ((NCSTRING) ((*r).Memfile.Mem));
	{
		NIM_BOOL LOC7;
		NimStringDesc* version;
		LOC7 = 0;
		LOC7 = startswith_238313((*r).S, ((NimStringDesc*) &TMP1725), 0);
		if (!LOC7) goto LA8;
		initiitable_197213(&(*r).Index.Tab);
		initiitable_197213(&(*r).Imports.Tab);
		(*r).Pos += 4;
		version = copyString(((NimStringDesc*) &TMP1726));
		while (1) {
			if (!!((((NU8)((*r).S[(*r).Pos])) == ((NU8)(0)) || ((NU8)((*r).S[(*r).Pos])) == ((NU8)(10))))) goto LA10;
			version = addChar(version, (*r).S[(*r).Pos]);
			(*r).Pos += 1;
		} LA10: ;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(10))) goto LA13;
			(*r).Pos += 1;
		}
		LA13: ;
		{
			if (!!(eqStrings(version, ((NimStringDesc*) &TMP1727)))) goto LA17;
			result = NIM_NIL;
		}
		LA17: ;
	}
	goto LA5;
	LA8: ;
	{
		result = NIM_NIL;
	}
	LA5: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, rdword_237449)(trodreader236024* r) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1726));
	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 LA1;
		result = addChar(result, (*r).S[(*r).Pos]);
		(*r).Pos += 1;
	} LA1: ;
	return result;
}

static N_INLINE(void, setid_187444)(NI id) {
	gfrontendid_187007 = ((gfrontendid_187007 >= (NI32)(id + 1)) ? gfrontendid_187007 : (NI32)(id + 1));
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell41090* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_44443(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell41090* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_44443((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_46002(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(NIM_BOOL, cmdchangetriggersrecompilation_237765)(NU8 old, NU8 new_237768) {
	NIM_BOOL result;
	result = 0;
	{
		if (!(old == new_237768)) 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_237768)&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;
}

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

N_NIMCALL(void, skipsection_237327)(trodreader236024* r) {
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(58))) goto LA3;
		while (1) {
			if (!((NU8)(10) < (NU8)((*r).S[(*r).Pos]))) goto LA5;
			(*r).Pos += 1;
		} LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NI c;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(40))) goto LA7;
		c = 0;
		(*r).Pos += 1;
		while (1) {
			switch (((NU8)((*r).S[(*r).Pos]))) {
			case 10:
			{
				(*r).Line += 1;
			}
			break;
			case 40:
			{
				c += 1;
			}
			break;
			case 41:
			{
				{
					if (!(c == 0)) goto LA15;
					(*r).Pos += 1;
					goto LA9;
				}
				goto LA13;
				LA15: ;
				{
					if (!(0 < c)) goto LA18;
					c -= 1;
				}
				goto LA13;
				LA18: ;
				LA13: ;
			}
			break;
			case 0:
			{
				goto LA9;
			}
			break;
			default:
			{
			}
			break;
			}
			(*r).Pos += 1;
		} LA9: ;
	}
	goto LA1;
	LA7: ;
	{
		NimStringDesc* LOC23;
		NimStringDesc* LOC24;
		LOC23 = 0;
		LOC24 = 0;
		LOC24 = nimIntToStr((*r).Line);
		LOC23 = rawNewString(LOC24->Sup.len + 12);
appendString(LOC23, ((NimStringDesc*) &TMP1748));
appendString(LOC23, LOC24);
		internalerror_165606(LOC23);
	}
	LA1: ;
}

N_NIMCALL(void, processindex_237635)(trodreader236024* r, tindex236022* idx, FILE* outf) {
	NI key;
	NI val;
	NI tmp;
	key = 0;
	val = 0;
	tmp = 0;
	(*r).Pos += 2;
	(*r).Line += 1;
	while (1) {
		NIM_BOOL LOC2;
		LOC2 = 0;
		LOC2 = ((NU8)(10) < (NU8)((*r).S[(*r).Pos]));
		if (!(LOC2)) goto LA3;
		LOC2 = !(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)));
		LA3: ;
		if (!LOC2) goto LA1;
		tmp = decodevint_196305((*r).S, &(*r).Pos);
		{
			NI LOC8;
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(32))) goto LA6;
			(*r).Pos += 1;
			key = (NI32)((*idx).Lastidxkey + tmp);
			LOC8 = 0;
			LOC8 = decodevint_196305((*r).S, &(*r).Pos);
			val = (NI32)(LOC8 + (*idx).Lastidxval);
		}
		goto LA4;
		LA6: ;
		{
			key = (NI32)((*idx).Lastidxkey + 1);
			val = (NI32)(tmp + (*idx).Lastidxval);
		}
		LA4: ;
		iitableput_197223(&(*idx).Tab, key, val);
		{
			TY165283 LOC14;
			if (!!(outf == 0)) goto LA12;
			memset((void*)LOC14, 0, sizeof(LOC14));
			LOC14[0] = nimIntToStr(key);
			LOC14[1] = copyString(((NimStringDesc*) &TMP1749));
			LOC14[2] = nimIntToStr(val);
			LOC14[3] = copyString(((NimStringDesc*) &TMP1750));
			write_10479(outf, LOC14, 4);
		}
		LA12: ;
		(*idx).Lastidxkey = key;
		(*idx).Lastidxval = val;
		setid_187444(key);
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(10))) goto LA17;
			(*r).Pos += 1;
			(*r).Line += 1;
		}
		LA17: ;
	} LA1: ;
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA21;
		(*r).Pos += 1;
	}
	LA21: ;
}

N_NIMCALL(void, processrodfile_237795)(trodreader236024* r, NI32 crc) {
	NimStringDesc* w;
	NI d;
	NI inclcrc;
	w = 0;
	d = 0;
	inclcrc = 0;
	while (1) {
		NimStringDesc* section;
		if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(0)))) goto LA1;
		section = rdword_237449(r);
		{
			if (!!(((*r).Reason == ((NU8) 1)))) goto LA4;
			goto LA1;
		}
		LA4: ;
		switch (hashString(section) & 31) {
		case 0: 
if (eqStrings(section, ((NimStringDesc*) &TMP1729))) goto LA7;
if (eqStrings(section, ((NimStringDesc*) &TMP1736))) goto LA14;
break;
		case 9: 
if (eqStrings(section, ((NimStringDesc*) &TMP1730))) goto LA8;
if (eqStrings(section, ((NimStringDesc*) &TMP1740))) goto LA18;
break;
		case 10: 
if (eqStrings(section, ((NimStringDesc*) &TMP1731))) goto LA9;
if (eqStrings(section, ((NimStringDesc*) &TMP1733))) goto LA11;
if (eqStrings(section, ((NimStringDesc*) &TMP1743))) goto LA21;
break;
		case 11: 
if (eqStrings(section, ((NimStringDesc*) &TMP1728))) goto LA6;
break;
		case 12: 
if (eqStrings(section, ((NimStringDesc*) &TMP1745))) goto LA23;
break;
		case 13: 
if (eqStrings(section, ((NimStringDesc*) &TMP1734))) goto LA12;
if (eqStrings(section, ((NimStringDesc*) &TMP1744))) goto LA22;
break;
		case 17: 
if (eqStrings(section, ((NimStringDesc*) &TMP1735))) goto LA13;
break;
		case 25: 
if (eqStrings(section, ((NimStringDesc*) &TMP1732))) goto LA10;
if (eqStrings(section, ((NimStringDesc*) &TMP1742))) goto LA20;
break;
		case 26: 
if (eqStrings(section, ((NimStringDesc*) &TMP1738))) goto LA16;
break;
		case 28: 
if (eqStrings(section, ((NimStringDesc*) &TMP1737))) goto LA15;
break;
		case 29: 
if (eqStrings(section, ((NimStringDesc*) &TMP1741))) goto LA19;
break;
		case 30: 
if (eqStrings(section, ((NimStringDesc*) &TMP1739))) goto LA17;
break;
		}
		goto LA24;
		LA6: ;
		{
			(*r).Pos += 1;
			{
				NI LOC29;
				LOC29 = 0;
				LOC29 = decodevint_196305((*r).S, &(*r).Pos);
				if (!!((((NI) (crc)) == LOC29))) goto LA30;
				(*r).Reason = ((NU8) 4);
			}
			LA30: ;
		}
		goto LA25;
		LA7: ;
		{
			(*r).Pos += 1;
			(*r).Moduleid = decodevint_196305((*r).S, &(*r).Pos);
			setid_187444((*r).Moduleid);
		}
		goto LA25;
		LA8: ;
		{
			(*r).Pos += 1;
			asgnRefNoCycle((void**) &(*r).Origfile, decodestr_196126((*r).S, &(*r).Pos));
		}
		goto LA25;
		LA9: ;
		{
			NI LOC35;
			(*r).Pos += 1;
			LOC35 = 0;
			LOC35 = decodevint_196305((*r).S, &(*r).Pos);
			(*r).Options = ((NU32) (((NI32) (LOC35))));
			{
				if (!!((goptions_137108 == (*r).Options))) goto LA38;
				(*r).Reason = ((NU8) 6);
			}
			LA38: ;
		}
		goto LA25;
		LA10: ;
		{
			NU32 dep;
			NI LOC41;
			(*r).Pos += 1;
			LOC41 = 0;
			LOC41 = decodevint_196305((*r).S, &(*r).Pos);
			dep = ((NU32) (((NI32) (LOC41))));
			{
				if (!!((gglobaloptions_137111 == dep))) goto LA44;
				(*r).Reason = ((NU8) 6);
			}
			LA44: ;
		}
		goto LA25;
		LA11: ;
		{
			NU8 dep;
			NI LOC47;
			(*r).Pos += 1;
			LOC47 = 0;
			LOC47 = decodevint_196305((*r).S, &(*r).Pos);
			dep = ((NU8) (((NI32) (LOC47))));
			{
				NIM_BOOL LOC50;
				LOC50 = 0;
				LOC50 = cmdchangetriggersrecompilation_237765(dep, gcmd_137113);
				if (!LOC50) goto LA51;
				(*r).Reason = ((NU8) 6);
			}
			LA51: ;
		}
		goto LA25;
		LA12: ;
		{
			(*r).Pos += 1;
			d = 0;
			while (1) {
				if (!((NU8)(10) < (NU8)((*r).S[(*r).Pos]))) goto LA54;
				w = decodestr_196126((*r).S, &(*r).Pos);
				d += 1;
				{
					tident167019* LOC57;
					NIM_BOOL LOC58;
					LOC57 = 0;
					LOC57 = getident_167456(w);
					LOC58 = 0;
					LOC58 = isdefined_168022(LOC57);
					if (!!(LOC58)) goto LA59;
					(*r).Reason = ((NU8) 5);
				}
				LA59: ;
				{
					if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(32))) goto LA63;
					(*r).Pos += 1;
				}
				LA63: ;
			} LA54: ;
			{
				NI LOC67;
				LOC67 = 0;
				LOC67 = countdefinedsymbols_168042();
				if (!!((d == LOC67))) goto LA68;
				(*r).Reason = ((NU8) 5);
			}
			LA68: ;
		}
		goto LA25;
		LA13: ;
		{
			(*r).Pos += 2;
			(*r).Line += 1;
			while (1) {
				NimStringDesc* relativepath;
				NimStringDesc* resolvedpath;
				NimStringDesc* finalpath;
				NI32 LOC77;
				if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)))) goto LA71;
				relativepath = decodestr_196126((*r).S, &(*r).Pos);
				resolvedpath = findmodule_138312(relativepath, (*r).Origfile);
				{
					if (!(0 < resolvedpath->Sup.len)) goto LA74;
					finalpath = resolvedpath;
				}
				goto LA72;
				LA74: ;
				{
					finalpath = relativepath;
				}
				LA72: ;
				LOC77 = 0;
				LOC77 = fileinfoidx_163721(finalpath);
				(*r).Files = (TY188922*) incrSeq(&((*r).Files)->Sup, sizeof(NI32));
				(*r).Files->data[(*r).Files->Sup.len-1] = LOC77;
				(*r).Pos += 1;
				(*r).Line += 1;
			} LA71: ;
			{
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA80;
				(*r).Pos += 1;
			}
			LA80: ;
		}
		goto LA25;
		LA14: ;
		{
			(*r).Pos += 2;
			(*r).Line += 1;
			while (1) {
				NI LOC84;
				if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)))) goto LA83;
				LOC84 = 0;
				LOC84 = decodevint_196305((*r).S, &(*r).Pos);
				w = tofullpath_164788((*r).Files->data[LOC84]);
				(*r).Pos += 1;
				inclcrc = decodevint_196305((*r).S, &(*r).Pos);
				{
					if (!((*r).Reason == ((NU8) 1))) goto LA87;
					{
						NIM_BOOL LOC91;
						NIM_BOOL LOC92;
						NI32 LOC94;
						LOC91 = 0;
						LOC92 = 0;
						LOC92 = nosexistsFile(w);
						LOC91 = !(LOC92);
						if (LOC91) goto LA93;
						LOC94 = 0;
						LOC94 = crcfromfile_144031(w);
						LOC91 = !((inclcrc == ((NI) (LOC94))));
						LA93: ;
						if (!LOC91) goto LA95;
						(*r).Reason = ((NU8) 7);
					}
					LA95: ;
				}
				LA87: ;
				{
					if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(10))) goto LA99;
					(*r).Pos += 1;
					(*r).Line += 1;
				}
				LA99: ;
			} LA83: ;
			{
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA103;
				(*r).Pos += 1;
			}
			LA103: ;
		}
		goto LA25;
		LA15: ;
		{
			(*r).Pos += 1;
			while (1) {
				NI LOC107;
				if (!((NU8)(10) < (NU8)((*r).S[(*r).Pos]))) goto LA106;
				LOC107 = 0;
				LOC107 = decodevint_196305((*r).S, &(*r).Pos);
				(*r).Moddeps = (TY188922*) incrSeq(&((*r).Moddeps)->Sup, sizeof(NI32));
				(*r).Moddeps->data[(*r).Moddeps->Sup.len-1] = (*r).Files->data[((NI32) (LOC107))];
				{
					if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(32))) goto LA110;
					(*r).Pos += 1;
				}
				LA110: ;
			} LA106: ;
		}
		goto LA25;
		LA16: ;
		{
			(*r).Interfidx = (NI32)((*r).Pos + 2);
			skipsection_237327(r);
		}
		goto LA25;
		LA17: ;
		{
			(*r).Compilerprocsidx = (NI32)((*r).Pos + 2);
			skipsection_237327(r);
		}
		goto LA25;
		LA18: ;
		{
			processindex_237635(r, &(*r).Index, NIM_NIL);
		}
		goto LA25;
		LA19: ;
		{
			processindex_237635(r, &(*r).Imports, NIM_NIL);
		}
		goto LA25;
		LA20: ;
		{
			(*r).Convertersidx = (NI32)((*r).Pos + 1);
			skipsection_237327(r);
		}
		goto LA25;
		LA21: ;
		{
			(*r).Methodsidx = (NI32)((*r).Pos + 1);
			skipsection_237327(r);
		}
		goto LA25;
		LA22: ;
		{
			(*r).Dataidx = (NI32)((*r).Pos + 2);
			goto LA1;
		}
		goto LA25;
		LA23: ;
		{
			(*r).Initidx = (NI32)((*r).Pos + 2);
			skipsection_237327(r);
		}
		goto LA25;
		LA24: ;
		{
			NimStringDesc* LOC121;
			NimStringDesc* LOC122;
			LOC121 = 0;
			LOC122 = 0;
			LOC122 = nimIntToStr((*r).Line);
			LOC121 = rawNewString(section->Sup.len + LOC122->Sup.len + (*r).Filename->Sup.len + 27);
appendString(LOC121, ((NimStringDesc*) &TMP1751));
appendString(LOC121, section);
appendString(LOC121, ((NimStringDesc*) &TMP1752));
appendString(LOC121, LOC122);
appendString(LOC121, ((NimStringDesc*) &TMP1753));
appendString(LOC121, (*r).Filename);
			internalerror_165606(LOC121);
			skipsection_237327(r);
		}
		LA25: ;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(10))) goto LA125;
			(*r).Pos += 1;
			(*r).Line += 1;
		}
		LA125: ;
	} LA1: ;
}

N_NIMCALL(NU8, checkdep_238973)(NI32 fileidx) {
	NU8 result;
	NimStringDesc* filename;
	NI32 crc;
	trodreader236024* r;
	NimStringDesc* rodfile;
	NimStringDesc* LOC9;
	result = 0;
	{
		if (!(gmods_238550->Sup.len <= ((NI) (fileidx)))) goto LA3;
		gmods_238550 = (tfilemodulemap238523*) setLengthSeq(&(gmods_238550)->Sup, sizeof(tfilemodulerec238521), ((NI) ((NI32)(fileidx + ((NI32) 1)))));
	}
	LA3: ;
	{
		if (!!((gmods_238550->data[fileidx].Reason == ((NU8) 0)))) goto LA7;
		result = gmods_238550->data[fileidx].Reason;
		goto BeforeRet;
	}
	LA7: ;
	filename = tofilename_164780(fileidx);
	crc = getcrc_238925(fileidx);
	gmods_238550->data[fileidx].Reason = ((NU8) 1);
	result = ((NU8) 1);
	r = NIM_NIL;
	LOC9 = 0;
	LOC9 = withpackagename_137873(filename);
	rodfile = togeneratedfile_137883(LOC9, ((NimStringDesc*) &TMP1723));
	r = newrodreader_238340(rodfile, crc, ((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_237795(r, crc);
		result = (*r).Reason;
		{
			NU8 res;
			NI i_239089;
			NI HEX3Atmp_239150;
			NI res_239152;
			if (!(result == ((NU8) 1))) goto LA23;
			res = checkdep_238973(systemfileidx_163641);
			{
				if (!!((res == ((NU8) 1)))) goto LA27;
				result = ((NU8) 8);
			}
			LA27: ;
			i_239089 = 0;
			HEX3Atmp_239150 = 0;
			HEX3Atmp_239150 = ((*r).Moddeps->Sup.len-1);
			res_239152 = 0;
			while (1) {
				if (!(res_239152 <= HEX3Atmp_239150)) goto LA29;
				i_239089 = res_239152;
				res = checkdep_238973((*r).Moddeps->data[i_239089]);
				{
					if (!!((res == ((NU8) 1)))) goto LA32;
					result = ((NU8) 8);
				}
				LA32: ;
				res_239152 += 1;
			} LA29: ;
		}
		LA23: ;
	}
	LA10: ;
	{
		NIM_BOOL LOC36;
		NimStringDesc* LOC40;
		LOC36 = 0;
		LOC36 = !((result == ((NU8) 1)));
		if (!(LOC36)) goto LA37;
		LOC36 = (0 < gverbosity_137120);
		LA37: ;
		if (!LOC36) goto LA38;
		LOC40 = 0;
		LOC40 = nsuFormatSingleElem(reasontofrmt_236014[(result)- 0], filename);
		rawmessage_165386(((NU16) 265), LOC40);
	}
	LA38: ;
	{
		NIM_BOOL LOC43;
		LOC43 = 0;
		LOC43 = !((result == ((NU8) 1)));
		if (LOC43) goto LA44;
		LOC43 = ((gglobaloptions_137111 &(1<<((((NU8) 1))&31)))!=0);
		LA44: ;
		if (!LOC43) goto LA45;
		{
			if (!!((r == NIM_NIL))) goto LA49;
			close_235243(&(*r).Memfile);
		}
		LA49: ;
		r = NIM_NIL;
	}
	LA45: ;
	asgnRef((void**) &gmods_238550->data[fileidx].Rd, r);
	gmods_238550->data[fileidx].Reason = result;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym188833*, newstub_237486)(trodreader236024* r, NimStringDesc* name, NI id) {
	tsym188833* result;
	result = 0;
	result = (tsym188833*) newObj((&NTI188801), sizeof(tsym188833));
	(*result).Sup.Sup.m_type = (&NTI188833);
	(*result).Kind = ((NU8) 23);
	(*result).Sup.Id = id;
	asgnRefNoCycle((void**) &(*result).Name, getident_167456(name));
	(*result).Position = (*r).Readerindex;
	setid_187444(id);
	{
		if (!NIM_FALSE) goto LA3;
		registerid_187201(&result->Sup);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, processinterf_237510)(trodreader236024* r, tsym188833* module) {
	{
		if (!((*r).Interfidx == 0)) goto LA3;
		internalerror_165606(((NimStringDesc*) &TMP1763));
	}
	LA3: ;
	(*r).Pos = (*r).Interfidx;
	while (1) {
		NIM_BOOL LOC6;
		NimStringDesc* w;
		NI key;
		tsym188833* s;
		LOC6 = 0;
		LOC6 = ((NU8)(10) < (NU8)((*r).S[(*r).Pos]));
		if (!(LOC6)) goto LA7;
		LOC6 = !(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)));
		LA7: ;
		if (!LOC6) goto LA5;
		w = decodestr_196126((*r).S, &(*r).Pos);
		(*r).Pos += 1;
		key = decodevint_196305((*r).S, &(*r).Pos);
		(*r).Pos += 1;
		s = newstub_237486(r, w, key);
		asgnRefNoCycle((void**) &(*s).Owner, module);
		strtableadd_197078(&(*module).kindU.S3.Tab, s);
		idtableput_197147(&(*r).Syms, &s->Sup, &s->Sup.Sup);
	} LA5: ;
}

N_NIMCALL(void, processcompilerprocs_237571)(trodreader236024* r, tsym188833* module) {
	{
		if (!((*r).Compilerprocsidx == 0)) goto LA3;
		internalerror_165606(((NimStringDesc*) &TMP1764));
	}
	LA3: ;
	(*r).Pos = (*r).Compilerprocsidx;
	while (1) {
		NIM_BOOL LOC6;
		NimStringDesc* w;
		NI key;
		tsym188833* s;
		TNimObject* LOC8;
		LOC6 = 0;
		LOC6 = ((NU8)(10) < (NU8)((*r).S[(*r).Pos]));
		if (!(LOC6)) goto LA7;
		LOC6 = !(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)));
		LA7: ;
		if (!LOC6) goto LA5;
		w = decodestr_196126((*r).S, &(*r).Pos);
		(*r).Pos += 1;
		key = decodevint_196305((*r).S, &(*r).Pos);
		(*r).Pos += 1;
		LOC8 = 0;
		LOC8 = idtableget_197142((*r).Syms, key);
		s = ((tsym188833*) (LOC8));
		{
			if (!(s == NIM_NIL)) goto LA11;
			s = newstub_237486(r, w, key);
			asgnRefNoCycle((void**) &(*s).Owner, module);
			idtableput_197147(&(*r).Syms, &s->Sup, &s->Sup.Sup);
		}
		LA11: ;
		strtableadd_197078(&rodcompilerprocs_236058, s);
	} LA5: ;
}

N_NIMCALL(trodreader236024*, getreader_238604)(NI moduleid) {
	trodreader236024* result;
	NI i_238640;
	NI HEX3Atmp_238658;
	NI res_238660;
	result = 0;
	i_238640 = 0;
	HEX3Atmp_238658 = 0;
	HEX3Atmp_238658 = gmods_238550->Sup.len - 1;
	res_238660 = 0;
	while (1) {
		if (!(res_238660 <= HEX3Atmp_238658)) goto LA1;
		i_238640 = res_238660;
		result = gmods_238550->data[i_238640].Rd;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = !((result == NIM_NIL));
			if (!(LOC4)) goto LA5;
			LOC4 = ((*result).Moduleid == moduleid);
			LA5: ;
			if (!LOC4) goto LA6;
			goto BeforeRet;
		}
		LA6: ;
		res_238660 += 1;
	} LA1: ;
	result = NIM_NIL;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, decodelineinfo_236090)(trodreader236024* r, tlineinfo163527* info) {
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(63))) goto LA3;
		(*r).Pos += 1;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(44))) goto LA7;
			(*info).Col = ((NI16) -1);
		}
		goto LA5;
		LA7: ;
		{
			NI LOC10;
			LOC10 = 0;
			LOC10 = decodevint_196305((*r).S, &(*r).Pos);
			(*info).Col = ((NI16) (LOC10));
		}
		LA5: ;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(44))) goto LA13;
			(*r).Pos += 1;
			{
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(44))) goto LA17;
				(*info).Line = ((NI16) -1);
			}
			goto LA15;
			LA17: ;
			{
				NI LOC20;
				LOC20 = 0;
				LOC20 = decodevint_196305((*r).S, &(*r).Pos);
				(*info).Line = ((NI16) (LOC20));
			}
			LA15: ;
			{
				NI LOC25;
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(44))) goto LA23;
				(*r).Pos += 1;
				LOC25 = 0;
				LOC25 = decodevint_196305((*r).S, &(*r).Pos);
				(*info) = newlineinfo_164069((*r).Files->data[LOC25], ((NI) ((*info).Line)), ((NI) ((*info).Col)));
			}
			LA23: ;
		}
		LA13: ;
	}
	LA3: ;
}

N_NIMCALL(void, skipnode_236148)(trodreader236024* r) {
	NI par;
	NI pos;
	par = 0;
	pos = (NI32)((*r).Pos + 1);
	while (1) {
		switch (((NU8)((*r).S[pos]))) {
		case 41:
		{
			{
				if (!(par == 0)) goto LA5;
				goto LA1;
			}
			LA5: ;
			par -= 1;
		}
		break;
		case 40:
		{
			par += 1;
		}
		break;
		default:
		{
		}
		break;
		}
		pos += 1;
	} LA1: ;
	(*r).Pos = (NI32)(pos + 1);
}

N_NIMCALL(tnode188803*, decodenodelazybody_236254)(trodreader236024* r, tlineinfo163527 finfo, tsym188833* belongsto) {
	tnode188803* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC9;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(40))) goto LA3;
		(*r).Pos += 1;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA7;
			(*r).Pos += 1;
			goto BeforeRet;
		}
		LA7: ;
		LOC9 = 0;
		LOC9 = decodevint_196305((*r).S, &(*r).Pos);
		result = newnodei_189099(((NU8) (LOC9)), finfo);
		decodelineinfo_236090(r, &(*result).Info);
		{
			NI LOC14;
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(36))) goto LA12;
			(*r).Pos += 1;
			LOC14 = 0;
			LOC14 = decodevint_196305((*r).S, &(*r).Pos);
			(*result).Flags = ((NU16) (((NI32) (LOC14))));
		}
		LA12: ;
		{
			NI id;
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(94))) goto LA17;
			(*r).Pos += 1;
			id = decodevint_196305((*r).S, &(*r).Pos);
			asgnRefNoCycle((void**) &(*result).Typ, rrgettype_236084(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 += 1;
				(*result).kindU.S1.Intval = decodevbiggestint_196516((*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 += 1;
				fl = decodestr_196126((*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 += 1;
				asgnRefNoCycle((void**) &(*result).kindU.S3.Strval, decodestr_196126((*r).S, &(*r).Pos));
			}
			goto LA30;
			LA32: ;
			{
				NimStringDesc* LOC35;
				LOC35 = 0;
				LOC35 = (*result).kindU.S3.Strval; (*result).kindU.S3.Strval = copyStringRC1(((NimStringDesc*) &TMP1726));
				if (LOC35) nimGCunrefNoCycle(LOC35);
			}
			LA30: ;
		}
		break;
		case ((NU8) 2):
		{
			{
				NimStringDesc* fl;
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(33))) goto LA39;
				(*r).Pos += 1;
				fl = decodestr_196126((*r).S, &(*r).Pos);
				asgnRefNoCycle((void**) &(*result).kindU.S5.Ident, getident_167456(fl));
			}
			goto LA37;
			LA39: ;
			{
				internalerror_165591((*result).Info, ((NimStringDesc*) &TMP1774));
			}
			LA37: ;
		}
		break;
		case ((NU8) 3):
		{
			{
				NI id;
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(33))) goto LA45;
				(*r).Pos += 1;
				id = decodevint_196305((*r).S, &(*r).Pos);
				asgnRefNoCycle((void**) &(*result).kindU.S4.Sym, rrgetsym_236078(r, id, (*result).Info));
			}
			goto LA43;
			LA45: ;
			{
				internalerror_165591((*result).Info, ((NimStringDesc*) &TMP1775));
			}
			LA43: ;
		}
		break;
		default:
		{
			NI i;
			i = 0;
			while (1) {
				if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)))) goto LA49;
				{
					NIM_BOOL LOC52;
					LOC52 = 0;
					LOC52 = !((belongsto == NIM_NIL));
					if (!(LOC52)) goto LA53;
					LOC52 = (i == 6);
					LA53: ;
					if (!LOC52) goto LA54;
					addsonnilallowed_193294(result, NIM_NIL);
					(*belongsto).Offset = (*r).Pos;
					skipnode_236148(r);
				}
				goto LA50;
				LA54: ;
				{
					tnode188803* LOC57;
					LOC57 = 0;
					LOC57 = decodenodelazybody_236254(r, (*result).Info, NIM_NIL);
					addsonnilallowed_193294(result, LOC57);
				}
				LA50: ;
				i += 1;
			} LA49: ;
		}
		break;
		}
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA60;
			(*r).Pos += 1;
		}
		goto LA58;
		LA60: ;
		{
			internalerror_165591((*result).Info, ((NimStringDesc*) &TMP1776));
		}
		LA58: ;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC64;
		NimStringDesc* LOC65;
		LOC64 = 0;
		LOC65 = 0;
		LOC65 = nimIntToStr((*r).Pos);
		LOC64 = rawNewString(LOC65->Sup.len + 24);
appendString(LOC64, ((NimStringDesc*) &TMP1777));
appendString(LOC64, LOC65);
		internalerror_165591(finfo, LOC64);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, decodenode_236556)(trodreader236024* r, tlineinfo163527 finfo) {
	tnode188803* result;
	result = 0;
	result = decodenodelazybody_236254(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[((NI32)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

N_NIMCALL(void, decodeloc_236563)(trodreader236024* r, tloc188817* loc, tlineinfo163527 info) {
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(60))) goto LA3;
		(*r).Pos += 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_196305((*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 += 1;
			LOC15 = 0;
			LOC15 = decodevint_196305((*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 += 1;
			LOC21 = 0;
			LOC21 = decodevint_196305((*r).S, &(*r).Pos);
			(*loc).Flags = ((NU8) (((NI32) (LOC21))));
		}
		goto LA17;
		LA19: ;
		{
			(*loc).Flags = 0;
		}
		LA17: ;
		{
			NI LOC27;
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(94))) goto LA25;
			(*r).Pos += 1;
			LOC27 = 0;
			LOC27 = decodevint_196305((*r).S, &(*r).Pos);
			unsureAsgnRef((void**) &(*loc).T, rrgettype_236084(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 += 1;
			LOC33 = 0;
			LOC33 = decodestr_196126((*r).S, &(*r).Pos);
			unsureAsgnRef((void**) &(*loc).R, torope_145058(LOC33));
		}
		goto LA29;
		LA31: ;
		{
			unsureAsgnRef((void**) &(*loc).R, NIM_NIL);
		}
		LA29: ;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(63))) goto LA37;
			(*r).Pos += 1;
			(*loc).A = decodevint_196305((*r).S, &(*r).Pos);
		}
		goto LA35;
		LA37: ;
		{
			(*loc).A = 0;
		}
		LA35: ;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(62))) goto LA42;
			(*r).Pos += 1;
		}
		goto LA40;
		LA42: ;
		{
			NimStringDesc* LOC45;
			LOC45 = 0;
			LOC45 = rawNewString(11);
appendString(LOC45, ((NimStringDesc*) &TMP1778));
appendChar(LOC45, (*r).S[(*r).Pos]);
			internalerror_165591(info, LOC45);
		}
		LA40: ;
	}
	LA3: ;
}

N_NIMCALL(ttype188837*, decodetype_236707)(trodreader236024* r, tlineinfo163527 info) {
	ttype188837* result;
	NI LOC9;
	result = 0;
	result = NIM_NIL;
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(91))) goto LA3;
		(*r).Pos += 1;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(93))) goto LA7;
			(*r).Pos += 1;
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = (ttype188837*) newObj((&NTI188799), sizeof(ttype188837));
	(*result).Sup.Sup.m_type = (&NTI188837);
	LOC9 = 0;
	LOC9 = decodevint_196305((*r).S, &(*r).Pos);
	(*result).Kind = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(43))) goto LA12;
		(*r).Pos += 1;
		(*result).Sup.Id = decodevint_196305((*r).S, &(*r).Pos);
		setid_187444((*result).Sup.Id);
		{
			if (!NIM_FALSE) goto LA16;
			registerid_187201(&result->Sup);
		}
		LA16: ;
	}
	goto LA10;
	LA12: ;
	{
		internalerror_165591(info, ((NimStringDesc*) &TMP1773));
	}
	LA10: ;
	idtableput_197147(&gtypetable_236075, &result->Sup, &result->Sup.Sup);
	{
		tlineinfo163527 LOC23;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(40))) goto LA21;
		LOC23 = unknownlineinfo_164203();
		asgnRefNoCycle((void**) &(*result).N, decodenode_236556(r, LOC23));
	}
	LA21: ;
	{
		NI LOC28;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(36))) goto LA26;
		(*r).Pos += 1;
		LOC28 = 0;
		LOC28 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Flags = ((NU32) (((NI32) (LOC28))));
	}
	LA26: ;
	{
		NI LOC33;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(63))) goto LA31;
		(*r).Pos += 1;
		LOC33 = 0;
		LOC33 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Callconv = ((NU8) (LOC33));
	}
	LA31: ;
	{
		NI LOC38;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(42))) goto LA36;
		(*r).Pos += 1;
		LOC38 = 0;
		LOC38 = decodevint_196305((*r).S, &(*r).Pos);
		asgnRefNoCycle((void**) &(*result).Owner, rrgetsym_236078(r, LOC38, info));
	}
	LA36: ;
	{
		NI LOC43;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(38))) goto LA41;
		(*r).Pos += 1;
		LOC43 = 0;
		LOC43 = decodevint_196305((*r).S, &(*r).Pos);
		asgnRefNoCycle((void**) &(*result).Sym, rrgetsym_236078(r, LOC43, info));
	}
	LA41: ;
	{
		NI LOC48;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(47))) goto LA46;
		(*r).Pos += 1;
		LOC48 = 0;
		LOC48 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Size = ((NI64) (LOC48));
	}
	goto LA44;
	LA46: ;
	{
		(*result).Size = -1;
	}
	LA44: ;
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(61))) goto LA52;
		(*r).Pos += 1;
		(*result).Align = decodevint_196305((*r).S, &(*r).Pos);
	}
	goto LA50;
	LA52: ;
	{
		(*result).Align = 2;
	}
	LA50: ;
	decodeloc_236563(r, &(*result).Loc, info);
	while (1) {
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(94))) goto LA55;
		(*r).Pos += 1;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(40))) goto LA58;
			(*r).Pos += 1;
			{
				if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(41))) goto LA62;
				(*r).Pos += 1;
			}
			goto LA60;
			LA62: ;
			{
				NimStringDesc* LOC65;
				LOC65 = 0;
				LOC65 = rawNewString(14);
appendString(LOC65, ((NimStringDesc*) &TMP1779));
appendChar(LOC65, (*r).S[(*r).Pos]);
				internalerror_165591(info, LOC65);
			}
			LA60: ;
			rawaddson_193092(result, NIM_NIL);
		}
		goto LA56;
		LA58: ;
		{
			NI d;
			ttype188837* LOC67;
			d = decodevint_196305((*r).S, &(*r).Pos);
			LOC67 = 0;
			LOC67 = rrgettype_236084(r, d, info);
			rawaddson_193092(result, LOC67);
		}
		LA56: ;
	} LA55: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype188837*, rrgettype_236084)(trodreader236024* r, NI id, tlineinfo163527 info) {
	ttype188837* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_197142(gtypetable_236075, id);
	result = ((ttype188837*) (LOC1));
	{
		NI oldpos;
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		oldpos = (*r).Pos;
		d = iitableget_197218((*r).Index.Tab, id);
		{
			if (!(d == (-2147483647 -1))) goto LA8;
			internalerror_165591(info, ((NimStringDesc*) &TMP1772));
		}
		LA8: ;
		(*r).Pos = (NI32)(d + (*r).Dataidx);
		result = decodetype_236707(r, info);
		(*r).Pos = oldpos;
	}
	LA4: ;
	return result;
}

N_NIMCALL(tlib188821*, decodelib_236937)(trodreader236024* r, tlineinfo163527 info) {
	tlib188821* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC5;
		NimStringDesc* LOC10;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(124))) goto LA3;
		result = (tlib188821*) newObj((&NTI188831), sizeof(tlib188821));
		(*result).Sup.Sup.m_type = (&NTI188821);
		(*r).Pos += 1;
		LOC5 = 0;
		LOC5 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Kind = ((NU8) (LOC5));
		{
			if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(124)))) goto LA8;
			internalerror_165606(((NimStringDesc*) &TMP1780));
		}
		LA8: ;
		(*r).Pos += 1;
		LOC10 = 0;
		LOC10 = decodestr_196126((*r).S, &(*r).Pos);
		asgnRefNoCycle((void**) &(*result).Name, torope_145058(LOC10));
		{
			if (!!(((NU8)((*r).S[(*r).Pos]) == (NU8)(124)))) goto LA13;
			internalerror_165606(((NimStringDesc*) &TMP1781));
		}
		LA13: ;
		(*r).Pos += 1;
		asgnRefNoCycle((void**) &(*result).Path, decodenode_236556(r, info));
	}
	LA3: ;
	return result;
}

N_NIMCALL(tsym188833*, decodesym_237010)(trodreader236024* r, tlineinfo163527 info) {
	tsym188833* result;
	NI id;
	tident167019* ident;
	NU8 k;
	NI LOC9;
	TNimObject* LOC21;
	result = 0;
	id = 0;
	ident = 0;
	result = NIM_NIL;
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(123))) goto LA3;
		(*r).Pos += 1;
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(125))) goto LA7;
			(*r).Pos += 1;
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	LOC9 = 0;
	LOC9 = decodevint_196305((*r).S, &(*r).Pos);
	k = ((NU8) (LOC9));
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(43))) goto LA12;
		(*r).Pos += 1;
		id = decodevint_196305((*r).S, &(*r).Pos);
		setid_187444(id);
	}
	goto LA10;
	LA12: ;
	{
		internalerror_165591(info, ((NimStringDesc*) &TMP1769));
	}
	LA10: ;
	{
		NimStringDesc* LOC19;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(38))) goto LA17;
		(*r).Pos += 1;
		LOC19 = 0;
		LOC19 = decodestr_196126((*r).S, &(*r).Pos);
		ident = getident_167456(LOC19);
	}
	goto LA15;
	LA17: ;
	{
		internalerror_165591(info, ((NimStringDesc*) &TMP1770));
	}
	LA15: ;
	LOC21 = 0;
	LOC21 = idtableget_197142((*r).Syms, id);
	result = ((tsym188833*) (LOC21));
	{
		if (!(result == NIM_NIL)) goto LA24;
		result = (tsym188833*) newObj((&NTI188801), sizeof(tsym188833));
		(*result).Sup.Sup.m_type = (&NTI188833);
		(*result).Sup.Id = id;
		idtableput_197147(&(*r).Syms, &result->Sup, &result->Sup.Sup);
		{
			if (!NIM_FALSE) goto LA28;
			registerid_187201(&result->Sup);
		}
		LA28: ;
	}
	goto LA22;
	LA24: ;
	{
		if (!!(((*result).Sup.Id == id))) goto LA31;
		internalerror_165591(info, ((NimStringDesc*) &TMP1771));
	}
	goto LA22;
	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 LA22;
	LA36: ;
	{
		genericReset((void*)&(*result), (&NTI188833));
		(*result).Sup.Id = id;
	}
	LA22: ;
	(*result).Kind = k;
	asgnRefNoCycle((void**) &(*result).Name, ident);
	{
		NI LOC43;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(94))) goto LA41;
		(*r).Pos += 1;
		LOC43 = 0;
		LOC43 = decodevint_196305((*r).S, &(*r).Pos);
		asgnRefNoCycle((void**) &(*result).Typ, rrgettype_236084(r, LOC43, info));
	}
	LA41: ;
	decodelineinfo_236090(r, &(*result).Info);
	{
		NI LOC48;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(42))) goto LA46;
		(*r).Pos += 1;
		LOC48 = 0;
		LOC48 = decodevint_196305((*r).S, &(*r).Pos);
		asgnRefNoCycle((void**) &(*result).Owner, rrgetsym_236078(r, LOC48, (*result).Info));
	}
	LA46: ;
	{
		NI LOC53;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(36))) goto LA51;
		(*r).Pos += 1;
		LOC53 = 0;
		LOC53 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Flags = ((NU32) (((NI32) (LOC53))));
	}
	LA51: ;
	{
		NI LOC58;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(64))) goto LA56;
		(*r).Pos += 1;
		LOC58 = 0;
		LOC58 = decodevint_196305((*r).S, &(*r).Pos);
		(*result).Magic = ((NU16) (LOC58));
	}
	LA56: ;
	{
		NI LOC63;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(33))) goto LA61;
		(*r).Pos += 1;
		LOC63 = 0;
		LOC63 = decodevint_196305((*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 += 1;
		(*result).Position = decodevint_196305((*r).S, &(*r).Pos);
	}
	goto LA65;
	LA67: ;
	{
		if (!!(((520256 &(1<<(((*result).Kind)&31)))!=0))) goto LA70;
		(*result).Position = 0;
	}
	goto LA65;
	LA70: ;
	LA65: ;
	{
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(96))) goto LA74;
		(*r).Pos += 1;
		(*result).Offset = decodevint_196305((*r).S, &(*r).Pos);
	}
	goto LA72;
	LA74: ;
	{
		(*result).Offset = -1;
	}
	LA72: ;
	decodeloc_236563(r, &(*result).Loc, (*result).Info);
	asgnRef((void**) &(*result).Annex, decodelib_236937(r, info));
	{
		tlineinfo163527 LOC81;
		if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(35))) goto LA79;
		(*r).Pos += 1;
		LOC81 = unknownlineinfo_164203();
		asgnRefNoCycle((void**) &(*result).Constraint, decodenode_236556(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_236254(r, (*result).Info, result));
			(*result).Position = (*r).Readerindex;
		}
		goto LA86;
		LA88: ;
		{
			asgnRefNoCycle((void**) &(*result).Ast, decodenode_236556(r, (*result).Info));
		}
		LA86: ;
	}
	LA84: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym188833*, decodesymsafepos_238553)(trodreader236024* rd, NI offset, tlineinfo163527 info) {
	tsym188833* result;
	NI oldpos;
	result = 0;
	{
		if (!((*rd).Dataidx == 0)) goto LA3;
		internalerror_165591(info, ((NimStringDesc*) &TMP1768));
	}
	LA3: ;
	oldpos = (*rd).Pos;
	(*rd).Pos = (NI32)(offset + (*rd).Dataidx);
	result = decodesym_237010(rd, info);
	(*rd).Pos = oldpos;
	return result;
}

N_NIMCALL(void, rawloadstub_236071)(tsym188833* s) {
	trodreader236024* rd;
	NI theid;
	NI d;
	tsym188833* rs;
	tlineinfo163527 LOC9;
	{
		if (!!(((*s).Kind == ((NU8) 23)))) goto LA3;
		internalerror_165606(((NimStringDesc*) &TMP1783));
	}
	LA3: ;
	rd = gmods_238550->data[(*s).Position].Rd;
	theid = (*s).Sup.Id;
	d = iitableget_197218((*rd).Index.Tab, (*s).Sup.Id);
	{
		if (!(d == (-2147483647 -1))) goto LA7;
		internalerror_165606(((NimStringDesc*) &TMP1784));
	}
	LA7: ;
	LOC9 = unknownlineinfo_164203();
	rs = decodesymsafepos_238553(rd, d, LOC9);
	{
		if (!!((rs == s))) goto LA12;
		internalerror_165591((*rs).Info, ((NimStringDesc*) &TMP1785));
	}
	goto LA10;
	LA12: ;
	{
		if (!!(((*rs).Sup.Id == theid))) goto LA15;
		internalerror_165591((*rs).Info, ((NimStringDesc*) &TMP1786));
	}
	goto LA10;
	LA15: ;
	LA10: ;
}

N_NIMCALL(tsym188833*, rrgetsym_236078)(trodreader236024* r, NI id, tlineinfo163527 info) {
	tsym188833* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_197142((*r).Syms, id);
	result = ((tsym188833*) (LOC1));
	{
		NI d;
		if (!(result == NIM_NIL)) goto LA4;
		d = iitableget_197218((*r).Index.Tab, id);
		{
			NI moduleid;
			trodreader236024* rd;
			if (!(d == (-2147483647 -1))) goto LA8;
			moduleid = iitableget_197218((*r).Imports.Tab, id);
			{
				NimStringDesc* x;
				NimStringDesc* LOC14;
				if (!(moduleid < 0)) goto LA12;
				x = copyString(((NimStringDesc*) &TMP1726));
				encodevint_196256(id, &x);
				LOC14 = 0;
				LOC14 = rawNewString(x->Sup.len + 28);
appendString(LOC14, ((NimStringDesc*) &TMP1767));
appendString(LOC14, x);
				internalerror_165591(info, LOC14);
			}
			LA12: ;
			rd = getreader_238604(moduleid);
			d = iitableget_197218((*rd).Index.Tab, id);
			{
				if (!!((d == (-2147483647 -1)))) goto LA17;
				result = decodesymsafepos_238553(rd, d, info);
			}
			goto LA15;
			LA17: ;
			{
				NimStringDesc* x;
				NimStringDesc* LOC20;
				x = copyString(((NimStringDesc*) &TMP1726));
				encodevint_196256(id, &x);
				LOC20 = 0;
				LOC20 = rawNewString(x->Sup.len + 28);
appendString(LOC20, ((NimStringDesc*) &TMP1782));
appendString(LOC20, x);
				internalerror_165591(info, LOC20);
			}
			LA15: ;
		}
		goto LA6;
		LA8: ;
		{
			result = decodesymsafepos_238553(r, d, info);
		}
		LA6: ;
	}
	LA4: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = !((result == NIM_NIL));
		if (!(LOC24)) goto LA25;
		LOC24 = ((*result).Kind == ((NU8) 23));
		LA25: ;
		if (!LOC24) goto LA26;
		rawloadstub_236071(result);
	}
	LA26: ;
	return result;
}

N_NIMCALL(void, loadconverters_238857)(trodreader236024* r) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).Convertersidx == 0);
		if (LOC3) goto LA4;
		LOC3 = ((*r).Dataidx == 0);
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_165606(((NimStringDesc*) &TMP1765));
	}
	LA5: ;
	(*r).Pos = (*r).Convertersidx;
	while (1) {
		NI d;
		tlineinfo163527 LOC8;
		tsym188833* LOC9;
		if (!((NU8)(10) < (NU8)((*r).S[(*r).Pos]))) goto LA7;
		d = decodevint_196305((*r).S, &(*r).Pos);
		LOC8 = unknownlineinfo_164203();
		LOC9 = 0;
		LOC9 = rrgetsym_236078(r, d, LOC8);
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(32))) goto LA12;
			(*r).Pos += 1;
		}
		LA12: ;
	} LA7: ;
}

N_NIMCALL(void, loadmethods_238882)(trodreader236024* r) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).Methodsidx == 0);
		if (LOC3) goto LA4;
		LOC3 = ((*r).Dataidx == 0);
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_165606(((NimStringDesc*) &TMP1787));
	}
	LA5: ;
	(*r).Pos = (*r).Methodsidx;
	while (1) {
		NI d;
		tlineinfo163527 LOC8;
		tsym188833* LOC9;
		if (!((NU8)(10) < (NU8)((*r).S[(*r).Pos]))) goto LA7;
		d = decodevint_196305((*r).S, &(*r).Pos);
		LOC8 = unknownlineinfo_164203();
		LOC9 = 0;
		LOC9 = rrgetsym_236078(r, d, LOC8);
		(*r).Methods = (tsymseq188805*) incrSeq(&((*r).Methods)->Sup, sizeof(tsym188833*));
		asgnRefNoCycle((void**) &(*r).Methods->data[(*r).Methods->Sup.len-1], LOC9);
		{
			if (!((NU8)((*r).S[(*r).Pos]) == (NU8)(32))) goto LA12;
			(*r).Pos += 1;
		}
		LA12: ;
	} LA7: ;
}

N_NIMCALL(trodreader236024*, handlesymbolfile_236061)(tsym188833* module) {
	trodreader236024* result;
	NI32 fileidx;
	NimStringDesc* LOC5;
	NU8 LOC6;
	result = 0;
	fileidx = ((NI32) ((*module).Position));
	{
		if (!!(((gglobaloptions_137111 &(1<<((((NU8) 14))&31)))!=0))) goto LA3;
		(*module).Sup.Id = getid_187402();
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = HEX2F_108477(gprojectpath_137207, gprojectname_137206);
	loadmaxids_187501(LOC5);
	LOC6 = 0;
	LOC6 = checkdep_238973(fileidx);
	{
		if (!(gmods_238550->data[fileidx].Reason == ((NU8) 0))) goto LA9;
		internalerror_165606(((NimStringDesc*) &TMP1762));
	}
	LA9: ;
	result = gmods_238550->data[fileidx].Rd;
	{
		if (!!((result == NIM_NIL))) goto LA13;
		(*module).Sup.Id = (*result).Moduleid;
		idtableput_197147(&(*result).Syms, &module->Sup, &module->Sup.Sup);
		processinterf_237510(result, module);
		processcompilerprocs_237571(result, module);
		loadconverters_238857(result);
		loadmethods_238882(result);
	}
	goto LA11;
	LA13: ;
	{
		(*module).Sup.Id = getid_187402();
	}
	LA11: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, loadinitsection_236066)(trodreader236024* r) {
	tnode188803* result;
	NI oldpos;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*r).Initidx == 0);
		if (LOC3) goto LA4;
		LOC3 = ((*r).Dataidx == 0);
		LA4: ;
		if (!LOC3) goto LA5;
		internalerror_165606(((NimStringDesc*) &TMP1789));
	}
	LA5: ;
	oldpos = (*r).Pos;
	(*r).Pos = (*r).Initidx;
	result = newnode_189065(((NU8) 114));
	while (1) {
		NIM_BOOL LOC8;
		NI d;
		NI p;
		tlineinfo163527 LOC10;
		tnode188803* LOC11;
		LOC8 = 0;
		LOC8 = ((NU8)(10) < (NU8)((*r).S[(*r).Pos]));
		if (!(LOC8)) goto LA9;
		LOC8 = !(((NU8)((*r).S[(*r).Pos]) == (NU8)(41)));
		LA9: ;
		if (!LOC8) goto LA7;
		d = decodevint_196305((*r).S, &(*r).Pos);
		(*r).Pos += 1;
		p = (*r).Pos;
		(*r).Pos = (NI32)(d + (*r).Dataidx);
		LOC10 = unknownlineinfo_164203();
		LOC11 = 0;
		LOC11 = decodenode_236556(r, LOC10);
		addson_189207(result, LOC11);
		(*r).Pos = p;
	} LA7: ;
	(*r).Pos = oldpos;
	return result;
}

static N_INLINE(void, gcdisable_6602)(void) {
	gch_43044.Recgclock += 1;
}

static N_INLINE(void, gcenable_6604)(void) {
	{
		if (!(0 < gch_43044.Recgclock)) goto LA3;
		gch_43044.Recgclock -= 1;
	}
	LA3: ;
}

N_NIMCALL(void, loadstub_239239)(tsym188833* s) {
	gcdisable_6602();
	rawloadstub_236071(s);
	gcenable_6604();
}

N_NIMCALL(tnode188803*, getbody_239244)(tsym188833* s) {
	tnode188803* result;
	result = 0;
	result = (*(*s).Ast).kindU.S6.Sons->data[6];
	{
		trodreader236024* r;
		NI oldpos;
		if (!(result == NIM_NIL)) goto LA3;
		r = gmods_238550->data[(*s).Position].Rd;
		oldpos = (*r).Pos;
		(*r).Pos = (*s).Offset;
		result = decodenode_236556(r, (*s).Info);
		(*r).Pos = oldpos;
		asgnRefNoCycle((void**) &(*(*s).Ast).kindU.S6.Sons->data[6], result);
		(*s).Offset = 0;
	}
	LA3: ;
	return result;
}
N_NOINLINE(void, rodreadInit)(void) {
	if (gmods_238550) nimGCunref(gmods_238550);
	gmods_238550 = (tfilemodulemap238523*) newSeqRC1((&NTI238523), 0);
	initidtable_189120(&gtypetable_236075);
	initstrtable_189110(&rodcompilerprocs_236058);
}

N_NOINLINE(void, rodreadDatInit)(void) {
static TNimNode* TMP807[5];
static TNimNode* TMP808[9];
NI TMP810;
static char* NIM_CONST TMP809[9] = {
"rrEmpty", 
"rrNone", 
"rrRodDoesNotExist", 
"rrRodInvalid", 
"rrCrcChange", 
"rrDefines", 
"rrOptions", 
"rrInclDeps", 
"rrModDeps"};
static TNimNode* TMP811[23];
static TNimNode* TMP812[5];
static TNimNode TMP799[46];
NTI238521.size = sizeof(tfilemodulerec238521);
NTI238521.kind = 18;
NTI238521.base = 0;
TMP807[0] = &TMP799[1];
TMP799[1].kind = 1;
TMP799[1].offset = offsetof(tfilemodulerec238521, Filename);
TMP799[1].typ = (&NTI143);
TMP799[1].name = "filename";
TMP807[1] = &TMP799[2];
NTI236003.size = sizeof(NU8);
NTI236003.kind = 14;
NTI236003.base = 0;
NTI236003.flags = 3;
for (TMP810 = 0; TMP810 < 9; TMP810++) {
TMP799[TMP810+3].kind = 1;
TMP799[TMP810+3].offset = TMP810;
TMP799[TMP810+3].name = TMP809[TMP810];
TMP808[TMP810] = &TMP799[TMP810+3];
}
TMP799[12].len = 9; TMP799[12].kind = 2; TMP799[12].sons = &TMP808[0];
NTI236003.node = &TMP799[12];
TMP799[2].kind = 1;
TMP799[2].offset = offsetof(tfilemodulerec238521, Reason);
TMP799[2].typ = (&NTI236003);
TMP799[2].name = "reason";
TMP807[2] = &TMP799[13];
NTI236024.size = sizeof(trodreader236024);
NTI236024.kind = 17;
NTI236024.base = (&NTI2409);
TMP811[0] = &TMP799[15];
TMP799[15].kind = 1;
TMP799[15].offset = offsetof(trodreader236024, Pos);
TMP799[15].typ = (&NTI106);
TMP799[15].name = "pos";
TMP811[1] = &TMP799[16];
TMP799[16].kind = 1;
TMP799[16].offset = offsetof(trodreader236024, S);
TMP799[16].typ = (&NTI145);
TMP799[16].name = "s";
TMP811[2] = &TMP799[17];
TMP799[17].kind = 1;
TMP799[17].offset = offsetof(trodreader236024, Options);
TMP799[17].typ = (&NTI137012);
TMP799[17].name = "options";
TMP811[3] = &TMP799[18];
TMP799[18].kind = 1;
TMP799[18].offset = offsetof(trodreader236024, Reason);
TMP799[18].typ = (&NTI236003);
TMP799[18].name = "reason";
TMP811[4] = &TMP799[19];
TMP799[19].kind = 1;
TMP799[19].offset = offsetof(trodreader236024, Moddeps);
TMP799[19].typ = (&NTI188922);
TMP799[19].name = "modDeps";
TMP811[5] = &TMP799[20];
TMP799[20].kind = 1;
TMP799[20].offset = offsetof(trodreader236024, Files);
TMP799[20].typ = (&NTI188922);
TMP799[20].name = "files";
TMP811[6] = &TMP799[21];
TMP799[21].kind = 1;
TMP799[21].offset = offsetof(trodreader236024, Dataidx);
TMP799[21].typ = (&NTI106);
TMP799[21].name = "dataIdx";
TMP811[7] = &TMP799[22];
TMP799[22].kind = 1;
TMP799[22].offset = offsetof(trodreader236024, Convertersidx);
TMP799[22].typ = (&NTI106);
TMP799[22].name = "convertersIdx";
TMP811[8] = &TMP799[23];
TMP799[23].kind = 1;
TMP799[23].offset = offsetof(trodreader236024, Initidx);
TMP799[23].typ = (&NTI106);
TMP799[23].name = "initIdx";
TMP811[9] = &TMP799[24];
TMP799[24].kind = 1;
TMP799[24].offset = offsetof(trodreader236024, Interfidx);
TMP799[24].typ = (&NTI106);
TMP799[24].name = "interfIdx";
TMP811[10] = &TMP799[25];
TMP799[25].kind = 1;
TMP799[25].offset = offsetof(trodreader236024, Compilerprocsidx);
TMP799[25].typ = (&NTI106);
TMP799[25].name = "compilerProcsIdx";
TMP811[11] = &TMP799[26];
TMP799[26].kind = 1;
TMP799[26].offset = offsetof(trodreader236024, Methodsidx);
TMP799[26].typ = (&NTI106);
TMP799[26].name = "methodsIdx";
TMP811[12] = &TMP799[27];
TMP799[27].kind = 1;
TMP799[27].offset = offsetof(trodreader236024, Filename);
TMP799[27].typ = (&NTI143);
TMP799[27].name = "filename";
TMP811[13] = &TMP799[28];
NTI236022.size = sizeof(tindex236022);
NTI236022.kind = 18;
NTI236022.base = 0;
NTI236022.flags = 2;
TMP812[0] = &TMP799[30];
TMP799[30].kind = 1;
TMP799[30].offset = offsetof(tindex236022, Lastidxkey);
TMP799[30].typ = (&NTI106);
TMP799[30].name = "lastIdxKey";
TMP812[1] = &TMP799[31];
TMP799[31].kind = 1;
TMP799[31].offset = offsetof(tindex236022, Lastidxval);
TMP799[31].typ = (&NTI106);
TMP799[31].name = "lastIdxVal";
TMP812[2] = &TMP799[32];
TMP799[32].kind = 1;
TMP799[32].offset = offsetof(tindex236022, Tab);
TMP799[32].typ = (&NTI197207);
TMP799[32].name = "tab";
TMP812[3] = &TMP799[33];
TMP799[33].kind = 1;
TMP799[33].offset = offsetof(tindex236022, R);
TMP799[33].typ = (&NTI143);
TMP799[33].name = "r";
TMP812[4] = &TMP799[34];
TMP799[34].kind = 1;
TMP799[34].offset = offsetof(tindex236022, Offset);
TMP799[34].typ = (&NTI106);
TMP799[34].name = "offset";
TMP799[29].len = 5; TMP799[29].kind = 2; TMP799[29].sons = &TMP812[0];
NTI236022.node = &TMP799[29];
TMP799[28].kind = 1;
TMP799[28].offset = offsetof(trodreader236024, Index);
TMP799[28].typ = (&NTI236022);
TMP799[28].name = "index";
TMP811[14] = &TMP799[35];
TMP799[35].kind = 1;
TMP799[35].offset = offsetof(trodreader236024, Imports);
TMP799[35].typ = (&NTI236022);
TMP799[35].name = "imports";
TMP811[15] = &TMP799[36];
TMP799[36].kind = 1;
TMP799[36].offset = offsetof(trodreader236024, Readerindex);
TMP799[36].typ = (&NTI106);
TMP799[36].name = "readerIndex";
TMP811[16] = &TMP799[37];
TMP799[37].kind = 1;
TMP799[37].offset = offsetof(trodreader236024, Line);
TMP799[37].typ = (&NTI106);
TMP799[37].name = "line";
TMP811[17] = &TMP799[38];
TMP799[38].kind = 1;
TMP799[38].offset = offsetof(trodreader236024, Moduleid);
TMP799[38].typ = (&NTI106);
TMP799[38].name = "moduleID";
TMP811[18] = &TMP799[39];
TMP799[39].kind = 1;
TMP799[39].offset = offsetof(trodreader236024, Syms);
TMP799[39].typ = (&NTI188849);
TMP799[39].name = "syms";
TMP811[19] = &TMP799[40];
TMP799[40].kind = 1;
TMP799[40].offset = offsetof(trodreader236024, Memfile);
TMP799[40].typ = (&NTI234204);
TMP799[40].name = "memfile";
TMP811[20] = &TMP799[41];
TMP799[41].kind = 1;
TMP799[41].offset = offsetof(trodreader236024, Methods);
TMP799[41].typ = (&NTI188805);
TMP799[41].name = "methods";
TMP811[21] = &TMP799[42];
TMP799[42].kind = 1;
TMP799[42].offset = offsetof(trodreader236024, Origfile);
TMP799[42].typ = (&NTI143);
TMP799[42].name = "origFile";
TMP811[22] = &TMP799[43];
TMP799[43].kind = 1;
TMP799[43].offset = offsetof(trodreader236024, Inviewmode);
TMP799[43].typ = (&NTI134);
TMP799[43].name = "inViewMode";
TMP799[14].len = 23; TMP799[14].kind = 2; TMP799[14].sons = &TMP811[0];
NTI236024.node = &TMP799[14];
NTI236026.size = sizeof(trodreader236024*);
NTI236026.kind = 22;
NTI236026.base = (&NTI236024);
NTI236026.marker = TMP822;
TMP799[13].kind = 1;
TMP799[13].offset = offsetof(tfilemodulerec238521, Rd);
TMP799[13].typ = (&NTI236026);
TMP799[13].name = "rd";
TMP807[3] = &TMP799[44];
TMP799[44].kind = 1;
TMP799[44].offset = offsetof(tfilemodulerec238521, Crc);
TMP799[44].typ = (&NTI144007);
TMP799[44].name = "crc";
TMP807[4] = &TMP799[45];
TMP799[45].kind = 1;
TMP799[45].offset = offsetof(tfilemodulerec238521, Crcdone);
TMP799[45].typ = (&NTI134);
TMP799[45].name = "crcDone";
TMP799[0].len = 5; TMP799[0].kind = 2; TMP799[0].sons = &TMP807[0];
NTI238521.node = &TMP799[0];
NTI238523.size = sizeof(tfilemodulemap238523*);
NTI238523.kind = 24;
NTI238523.base = (&NTI238521);
NTI238523.marker = TMP823;
}

