/* 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>
typedef struct Tcontext263020 Tcontext263020;
typedef struct Tsym213822 Tsym213822;
typedef struct Tscope213816 Tscope213816;
typedef struct Tstrtable213794 Tstrtable213794;
typedef struct Tsymseq213792 Tsymseq213792;
typedef struct Tnodeseq213784 Tnodeseq213784;
typedef struct Tpasscontext260002 Tpasscontext260002;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tproccon263008 Tproccon263008;
typedef struct Intset210035 Intset210035;
typedef struct Trunk210031 Trunk210031;
typedef struct Trunkseq210033 Trunkseq210033;
typedef struct Tlinkedlist135016 Tlinkedlist135016;
typedef struct Tlistentry135010 Tlistentry135010;
typedef struct Tidtable213840 Tidtable213840;
typedef struct Tidpairseq213838 Tidpairseq213838;
typedef struct Tnode213790 Tnode213790;
typedef struct Ttype213828 Ttype213828;
typedef struct Tlineinfo181337 Tlineinfo181337;
typedef struct Tctx262036 Tctx262036;
typedef struct TY263140 TY263140;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tidobj188006 Tidobj188006;
typedef struct Ttypeseq213824 Ttypeseq213824;
typedef struct TY213925 TY213925;
typedef struct Tident188012 Tident188012;
typedef struct Tloc213804 Tloc213804;
typedef struct Ropeobj168006 Ropeobj168006;
typedef struct Tlib213808 Tlib213808;
typedef struct Cell47705 Cell47705;
typedef struct Cellset47717 Cellset47717;
typedef struct Gcheap50018 Gcheap50018;
typedef struct Gcstack50016 Gcstack50016;
typedef struct Cellseq47721 Cellseq47721;
typedef struct Pagedesc47713 Pagedesc47713;
typedef struct Memregion29887 Memregion29887;
typedef struct Smallchunk29839 Smallchunk29839;
typedef struct Llchunk29881 Llchunk29881;
typedef struct Bigchunk29841 Bigchunk29841;
typedef struct Intset29814 Intset29814;
typedef struct Trunk29810 Trunk29810;
typedef struct Avlnode29885 Avlnode29885;
typedef struct Gcstat50014 Gcstat50014;
typedef struct Ttabiter220071 Ttabiter220071;
typedef struct Toverloaditer268296 Toverloaditer268296;
typedef struct Tidentiter220084 Tidentiter220084;
typedef struct Tidpair213836 Tidpair213836;
typedef struct TY262242 TY262242;
typedef struct TY182093 TY182093;
typedef struct PprocHEX3Aobjecttype262221 PprocHEX3Aobjecttype262221;
typedef struct TY262261 TY262261;
typedef struct Tinstantiationpair263010 Tinstantiationpair263010;
typedef struct Tinstantiation213812 Tinstantiation213812;
typedef struct Basechunk29837 Basechunk29837;
typedef struct Freecell29829 Freecell29829;
typedef struct TY262222 TY262222;
typedef struct TY262227 TY262227;
typedef struct TY262262 TY262262;
typedef struct Vmargs262030 Vmargs262030;
typedef struct TY213913 TY213913;
typedef struct Tblock262018 Tblock262018;
typedef struct TY262202 TY262202;
struct  Tstrtable213794  {
NI counter;
Tsymseq213792* data;
};
struct  Tscope213816  {
NI depthlevel;
Tstrtable213794 symbols;
Tnodeseq213784* usingsyms;
Tscope213816* parent;
};
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  TNimObject  {
TNimType* m_type;
};
struct  Tpasscontext260002  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Intset210035  {
NI counter;
NI max;
Trunk210031* head;
Trunkseq210033* data;
};
struct  Tlinkedlist135016  {
Tlistentry135010* head;
Tlistentry135010* tail;
NI counter;
};
struct  Tidtable213840  {
NI counter;
Tidpairseq213838* data;
};
typedef N_NIMCALL_PTR(Tnode213790*, TY263071) (Tcontext263020* c, Tnode213790* n);
typedef N_NIMCALL_PTR(Tnode213790*, TY263076) (Tcontext263020* c, Tnode213790* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode213790*, TY263084) (Tcontext263020* c, Tnode213790* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode213790*, TY263092) (Tcontext263020* c, Tnode213790* n);
typedef N_NIMCALL_PTR(Tnode213790*, TY263097) (Tcontext263020* c, Tnode213790* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode213790*, TY263105) (Tcontext263020* c, Tnode213790* n);
typedef N_NIMCALL_PTR(Tnode213790*, TY263110) (Tcontext263020* c, Tnode213790* n, Tnode213790* norig, NU32 filter);
typedef N_NIMCALL_PTR(Ttype213828*, TY263117) (Tcontext263020* c, Tnode213790* n, Ttype213828* prev);
typedef struct {
N_NIMCALL_PTR(Tnode213790*, ClPrc) (Tcontext263020* c, Tidtable213840 pt, Tnode213790* n, void* ClEnv);
void* ClEnv;
} TY263123;
typedef struct {
N_NIMCALL_PTR(Tsym213822*, ClPrc) (Tcontext263020* c, Tsym213822* fn, Tidtable213840 pt, Tlineinfo181337 info, void* ClEnv);
void* ClEnv;
} TY263129;
typedef N_NIMCALL_PTR(Tsym213822*, TY263145) (Tcontext263020* c, Tsym213822* dc, Ttype213828* t, Tlineinfo181337 info, NU8 op);
struct  Tcontext263020  {
  Tpasscontext260002 Sup;
Tsym213822* module;
Tscope213816* currentscope;
Tscope213816* importtable;
Tscope213816* toplevelscope;
Tproccon263008* p;
Tsymseq213792* friendmodules;
NI instcounter;
Intset210035 ambiguoussymbols;
NI intypeclass;
NI ingenericcontext;
NI inunrolledcontext;
NI compilescontextid;
NI compilescontextidgenerator;
NI ingenericinst;
Tsymseq213792* converters;
Tsymseq213792* patterns;
Tlinkedlist135016 optionstack;
Tidtable213840 symmapping;
Tlinkedlist135016 libs;
TY263071 semconstexpr;
TY263076 semexpr;
TY263084 semtryexpr;
TY263092 semtryconstexpr;
TY263097 semoperand;
TY263105 semconstboolexpr;
TY263110 semoverloadedcall;
TY263117 semtypenode;
TY263123 seminferredlambda;
TY263129 semgenerateinstance;
Intset210035 includedfiles;
Tstrtable213794 userpragmas;
Tctx262036* evalcontext;
Intset210035 unknownidents;
TY263140* generics;
NI lastgenericidx;
NI hloloopdetector;
NI inparallelstmt;
TY263145 insttypeboundop;
};
struct  Tlineinfo181337  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tidobj188006  {
  TNimObject Sup;
NI id;
};
struct  Tloc213804  {
NU8 k;
NU8 s;
NU16 flags;
Ttype213828* t;
Ropeobj168006* r;
Ropeobj168006* heaproot;
};
struct  Tsym213822  {
  Tidobj188006 Sup;
NU8 kind;
union{
struct {Ttypeseq213824* typeinstcache;
Tscope213816* typscope;
} S1;
struct {TY213925* procinstcache;
Tsym213822* gcunsafetyreason;
} S2;
struct {TY213925* usedgenerics;
Tstrtable213794 tab;
} S3;
struct {Tsym213822* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype213828* typ;
Tident188012* name;
Tlineinfo181337 info;
Tsym213822* owner;
NU32 flags;
Tnode213790* ast;
NU32 options;
NI position;
NI offset;
Tloc213804 loc;
Tlib213808* annex;
Tnode213790* constraint;
};
struct  Tident188012  {
  Tidobj188006 Sup;
NimStringDesc* s;
Tident188012* next;
NI h;
};
struct  Tnode213790  {
Ttype213828* typ;
Tlineinfo181337 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym213822* sym;
} S4;
struct {Tident188012* ident;
} S5;
struct {Tnodeseq213784* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Cell47705  {
NI refcount;
TNimType* typ;
};
struct  Cellseq47721  {
NI len;
NI cap;
Cell47705** d;
};
struct  Cellset47717  {
NI counter;
NI max;
Pagedesc47713* head;
Pagedesc47713** data;
};
typedef Smallchunk29839* TY29902[512];
typedef Trunk29810* Trunkbuckets29812[256];
struct  Intset29814  {
Trunkbuckets29812 data;
};
struct  Memregion29887  {
NI minlargeobj;
NI maxlargeobj;
TY29902 freesmallchunks;
Llchunk29881* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk29841* freechunkslist;
Intset29814 chunkstarts;
Avlnode29885* root;
Avlnode29885* deleted;
Avlnode29885* last;
Avlnode29885* freeavlnodes;
};
struct  Gcstat50014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap50018  {
Gcstack50016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq47721 zct;
Cellseq47721 decstack;
Cellset47717 cycleroots;
Cellseq47721 tempstack;
NI recgclock;
Memregion29887 region;
Gcstat50014 stat;
};
struct  Ttabiter220071  {
NI h;
};
struct  Ttype213828  {
  Tidobj188006 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq213824* sons;
Tnode213790* n;
Tsym213822* owner;
Tsym213822* sym;
Tsym213822* destructor;
Tsym213822* deepcopy;
Tsym213822* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc213804 loc;
};
struct  Tidentiter220084  {
NI h;
Tident188012* name;
};
struct  Toverloaditer268296  {
Tidentiter220084 it;
Tsym213822* m;
NU8 mode;
NI symchoiceindex;
Tscope213816* scope;
Intset210035 insymchoice;
};
struct  Tproccon263008  {
Tsym213822* owner;
Tsym213822* resultsym;
NI nestedloopcounter;
NI nestedblockcounter;
NI intrystmt;
Tproccon263008* next;
NIM_BOOL wasforwarded;
Tnode213790* bracketexpr;
};
typedef NI TY29818[16];
struct  Trunk210031  {
Trunk210031* next;
NI key;
TY29818 bits;
};
struct  Tlistentry135010  {
  TNimObject Sup;
Tlistentry135010* prev;
Tlistentry135010* next;
};
struct  Tidpair213836  {
Tidobj188006* key;
TNimObject* val;
};
struct  Tctx262036  {
  Tpasscontext260002 Sup;
TY262242* code;
TY182093* debug;
Tnode213790* globals;
Tnode213790* constants;
Ttypeseq213824* types;
Tnode213790* currentexceptiona;
Tnode213790* currentexceptionb;
NI exceptioninstr;
PprocHEX3Aobjecttype262221* prc;
Tsym213822* module;
Tnode213790* callsite;
NU8 mode;
NU8 features;
NIM_BOOL traceactive;
NI loopiterations;
Tlineinfo181337 comesfromheuristic;
TY262261* callbacks;
NimStringDesc* errorflag;
};
struct  Tinstantiationpair263010  {
Tsym213822* genericsym;
Tinstantiation213812* inst;
};
struct  Ropeobj168006  {
  TNimObject Sup;
Ropeobj168006* left;
Ropeobj168006* right;
NI length;
NimStringDesc* data;
};
struct  Tlib213808  {
  Tlistentry135010 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj168006* name;
Tnode213790* path;
};
struct  Gcstack50016  {
Gcstack50016* prev;
Gcstack50016* next;
void* starts;
void* pos;
NI maxstacksize;
};
struct  Pagedesc47713  {
Pagedesc47713* next;
NI key;
TY29818 bits;
};
struct  Basechunk29837  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk29839  {
  Basechunk29837 Sup;
Smallchunk29839* next;
Smallchunk29839* prev;
Freecell29829* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk29881  {
NI size;
NI acc;
Llchunk29881* next;
};
struct  Bigchunk29841  {
  Basechunk29837 Sup;
Bigchunk29841* next;
Bigchunk29841* prev;
NI align;
NF data;
};
struct  Trunk29810  {
Trunk29810* next;
NI key;
TY29818 bits;
};
typedef Avlnode29885* TY29892[2];
struct  Avlnode29885  {
TY29892 link;
NI key;
NI upperbound;
NI level;
};
struct TY262227 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY262227 TY262230[256];
struct  PprocHEX3Aobjecttype262221  {
TY262222* blocks;
Tsym213822* sym;
TY262230 slots;
NI maxslots;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Vmargs262030* args, void* ClEnv);
void* ClEnv;
} Vmcallback262032;
struct TY262262 {
NimStringDesc* Field0;
Vmcallback262032 Field1;
};
struct  Tinstantiation213812  {
Tsym213822* sym;
Ttypeseq213824* concretetypes;
TY213913* usedby;
NI compilesid;
};
struct  Freecell29829  {
Freecell29829* next;
NI zerofield;
};
struct  Tblock262018  {
Tsym213822* label;
TY262202* fixups;
};
struct  Vmargs262030  {
NI ra;
NI rb;
NI rc;
void* slots;
Tnode213790* currentexception;
};
struct Tsymseq213792 {
  TGenericSeq Sup;
  Tsym213822* data[SEQ_DECL_SIZE];
};
struct Tnodeseq213784 {
  TGenericSeq Sup;
  Tnode213790* data[SEQ_DECL_SIZE];
};
struct Trunkseq210033 {
  TGenericSeq Sup;
  Trunk210031* data[SEQ_DECL_SIZE];
};
struct Tidpairseq213838 {
  TGenericSeq Sup;
  Tidpair213836 data[SEQ_DECL_SIZE];
};
struct TY263140 {
  TGenericSeq Sup;
  Tinstantiationpair263010 data[SEQ_DECL_SIZE];
};
struct Ttypeseq213824 {
  TGenericSeq Sup;
  Ttype213828* data[SEQ_DECL_SIZE];
};
struct TY213925 {
  TGenericSeq Sup;
  Tinstantiation213812* data[SEQ_DECL_SIZE];
};
struct TY262242 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY182093 {
  TGenericSeq Sup;
  Tlineinfo181337 data[SEQ_DECL_SIZE];
};
struct TY262261 {
  TGenericSeq Sup;
  TY262262 data[SEQ_DECL_SIZE];
};
struct TY262222 {
  TGenericSeq Sup;
  Tblock262018 data[SEQ_DECL_SIZE];
};
struct TY213913 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY262202 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, adddecl_268445)(Tcontext263020* c, Tsym213822* sym);
N_NIMCALL(NIM_BOOL, adduniquesym_268054)(Tscope213816* scope, Tsym213822* s);
N_NIMCALL(NIM_BOOL, strtableincl_224001)(Tstrtable213794* t, Tsym213822* n);
N_NIMCALL(void, wrongredefinition_268432)(Tlineinfo181337 info, NimStringDesc* s);
N_NIMCALL(void, localerror_186080)(Tlineinfo181337 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(void, addinterfacedeclaux_268461)(Tcontext263020* c, Tsym213822* sym);
N_NIMCALL(void, strtableadd_220061)(Tstrtable213794* t, Tsym213822* n);
N_NIMCALL(void, internalerror_186100)(Tlineinfo181337 info, NimStringDesc* errmsg);
static N_INLINE(NI, len_214059)(Tnode213790* n);
N_NIMCALL(NimStringDesc*, rendertree_232044)(Tnode213790* n, NU8 renderflags);
N_NIMCALL(Tident188012*, getident_188441)(NimStringDesc* identifier);
N_NIMCALL(Tident188012*, considerquotedident_268004)(Tnode213790* n);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_54019)(Cell47705* c);
static N_INLINE(NIM_BOOL, canbecycleroot_51658)(Cell47705* c);
static N_INLINE(void, rtladdcycleroot_52420)(Cell47705* c);
N_NOINLINE(void, incl_48447)(Cellset47717* s, Cell47705* cell);
static N_INLINE(Cell47705*, usrtocell_51640)(void* usr);
static N_INLINE(void, decref_53601)(Cell47705* c);
static N_INLINE(void, rtladdzct_53201)(Cell47705* c);
N_NOINLINE(void, addzct_51617)(Cellseq47721* s, Cell47705* c);
N_NIMCALL(void, newstrtable_217015)(Tstrtable213794* Result);
static N_INLINE(NI, scopedepth_263194)(Tcontext263020* c);
N_NIMCALL(void, ensurenomissingorunusedsymbols_268001)(Tscope213816* scope);
N_NIMCALL(Tsym213822*, inittabiter_220073)(Ttabiter220071* ti, Tstrtable213794 tab);
N_NIMCALL(NimStringDesc*, getsymrepr_268309)(Tsym213822* s);
N_NIMCALL(NimStringDesc*, getprocheader_239324)(Tsym213822* sym, NU8 prefer);
N_NIMCALL(void, message_186095)(Tlineinfo181337 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(Tsym213822*, nextiter_220078)(Ttabiter220071* ti, Tstrtable213794 tab);
N_NIMCALL(void, rawclosescope_268065)(Tcontext263020* c);
N_NIMCALL(Tsym213822*, skipalias_268088)(Tsym213822* s, Tnode213790* n);
N_NIMCALL(void, replacedeprecated_267207)(Tlineinfo181337 info, Tsym213822* oldsym, Tsym213822* newsym);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Tsym213822*, searchinscopes_268131)(Tcontext263020* c, Tident188012* s);
N_NIMCALL(Tsym213822*, strtableget_220066)(Tstrtable213794 t, Tident188012* name);
N_NIMCALL(Tsym213822*, errorsym_268243)(Tcontext263020* c, Tnode213790* n);
N_NIMCALL(Tsym213822*, newsym_214684)(NU8 symkind, Tident188012* name, Tsym213822* owner, Tlineinfo181337 info);
N_NIMCALL(Tsym213822*, getcurrowner_263210)(void);
N_NIMCALL(Ttype213828*, errortype_263901)(Tcontext263020* c);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(NIM_BOOL, contains_210811)(Intset210035 s, NI key);
N_NIMCALL(void, loadstub_253825)(Tsym213822* s);
N_NIMCALL(Tsym213822*, qualifiedlookup_268652)(Tcontext263020* c, Tnode213790* n, NU8 flags);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Tsym213822*, initidentiter_220087)(Tidentiter220084* ti, Tstrtable213794 tab, Tident188012* s);
N_NIMCALL(void, initintset_210885)(Intset210035* Result);
N_NIMCALL(void, incl_210832)(Intset210035* s, NI key);
N_NIMCALL(Tsym213822*, nextidentiter_220093)(Tidentiter220084* ti, Tstrtable213794 tab);
N_NIMCALL(NI, sonslen_216351)(Tnode213790* n);
N_NIMCALL(Tsym213822*, firstidentexcluding_224500)(Tidentiter220084* ti, Tstrtable213794 tab, Tident188012* s, Intset210035 excluding);
N_NIMCALL(Tsym213822*, nextidentexcluding_224462)(Tidentiter220084* ti, Tstrtable213794 tab, Intset210035 excluding);
N_NIMCALL(void, addoverloadablesymat_268496)(Tscope213816* scope, Tsym213822* fn);
N_NIMCALL(void, adddeclat_268455)(Tscope213816* scope, Tsym213822* sym);
STRING_LITERAL(TMP1152, "addInterfaceDeclAux", 19);
STRING_LITERAL(TMP2773, "<Error>", 7);
STRING_LITERAL(TMP2774, "", 0);
STRING_LITERAL(TMP2835, "use ", 4);
STRING_LITERAL(TMP2836, " instead; ", 10);
STRING_LITERAL(TMP2837, "err:", 4);
STRING_LITERAL(TMP2838, "lookUp", 6);
STRING_LITERAL(TMP3323, "addOverloadableSymAt", 20);
extern NU8 gcmd_159123;
extern TNimType NTI213818; /* PScope */
extern Gcheap50018 gch_50059;

N_NIMCALL(NIM_BOOL, adduniquesym_268054)(Tscope213816* scope, Tsym213822* s) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = strtableincl_224001((&(*scope).symbols), s);
	result = !(LOC1);
	return result;
}

N_NIMCALL(void, wrongredefinition_268432)(Tlineinfo181337 info, NimStringDesc* s) {
	{
		if (!!((gcmd_159123 == ((NU8) 18)))) goto LA3;
		localerror_186080(info, ((NU16) 41), s);
	}
	LA3: ;
}

N_NIMCALL(void, adddecl_268445)(Tcontext263020* c, Tsym213822* sym) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = adduniquesym_268054((*c).currentscope, sym);
		if (!!(LOC3)) goto LA4;
		wrongredefinition_268432((*sym).info, (*(*sym).name).s);
	}
	LA4: ;
}

N_NIMCALL(void, addinterfacedeclaux_268461)(Tcontext263020* c, Tsym213822* sym) {
	{
		if (!(((*sym).flags &(1U<<((NU)(((NU8) 1))&31U)))!=0)) goto LA3;
		{
			if (!!(((*c).module == NIM_NIL))) goto LA7;
			strtableadd_220061((&(*(*c).module).kindU.S3.tab), sym);
		}
		goto LA5;
		LA7: ;
		{
			internalerror_186100((*sym).info, ((NimStringDesc*) &TMP1152));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(void, addinterfacedecl_268538)(Tcontext263020* c, Tsym213822* sym) {
	adddecl_268445(c, sym);
	addinterfacedeclaux_268461(c, sym);
}

static N_INLINE(NI, len_214059)(Tnode213790* 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;
}

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(Tident188012*, considerquotedident_268004)(Tnode213790* n) {
	Tident188012* result;
{	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	{
		result = (*n).kindU.S5.ident;
	}
	break;
	case ((NU8) 3):
	{
		result = (*(*n).kindU.S4.sym).name;
	}
	break;
	case ((NU8) 53):
	{
		NI LOC4;
		LOC4 = 0;
		LOC4 = len_214059(n);
		switch (LOC4) {
		case ((NI) 0):
		{
			NimStringDesc* LOC6;
			LOC6 = 0;
			LOC6 = rendertree_232044(n, 0);
			localerror_186080((*n).info, ((NU16) 20), LOC6);
			result = getident_188441(((NimStringDesc*) &TMP2773));
		}
		break;
		case ((NI) 1):
		{
			result = considerquotedident_268004((*n).kindU.S6.sons->data[((NI) 0)]);
		}
		break;
		default:
		{
			NimStringDesc* id;
			id = copyString(((NimStringDesc*) &TMP2774));
			{
				NI i_268032;
				NI HEX3Atmp_268042;
				NI LOC10;
				NI res_268045;
				i_268032 = 0;
				HEX3Atmp_268042 = 0;
				LOC10 = 0;
				LOC10 = len_214059(n);
				HEX3Atmp_268042 = (LOC10 - 1);
				res_268045 = ((NI) 0);
				{
					while (1) {
						Tnode213790* x;
						if (!(res_268045 <= HEX3Atmp_268042)) goto LA12;
						i_268032 = res_268045;
						x = (*n).kindU.S6.sons->data[i_268032];
						switch ((*x).kind) {
						case ((NU8) 2):
						{
							id = resizeString(id, (*(*x).kindU.S5.ident).s->Sup.len + 0);
appendString(id, (*(*x).kindU.S5.ident).s);
						}
						break;
						case ((NU8) 3):
						{
							id = resizeString(id, (*(*(*x).kindU.S4.sym).name).s->Sup.len + 0);
appendString(id, (*(*(*x).kindU.S4.sym).name).s);
						}
						break;
						default:
						{
							NimStringDesc* LOC16;
							LOC16 = 0;
							LOC16 = rendertree_232044(n, 0);
							localerror_186080((*n).info, ((NU16) 20), LOC16);
							result = getident_188441(((NimStringDesc*) &TMP2773));
							goto BeforeRet;
						}
						break;
						}
						res_268045 += ((NI) 1);
					} LA12: ;
				}
			}
			result = getident_188441(id);
		}
		break;
		}
	}
	break;
	case ((NU8) 57):
	case ((NU8) 56):
	{
		result = (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name;
	}
	break;
	default:
	{
		NimStringDesc* LOC19;
		LOC19 = 0;
		LOC19 = rendertree_232044(n, 0);
		localerror_186080((*n).info, ((NU16) 20), LOC19);
		result = getident_188441(((NimStringDesc*) &TMP2773));
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

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

static N_INLINE(void, rtladdcycleroot_52420)(Cell47705* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_48447((&gch_50059.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_54019)(Cell47705* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_51658(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_52420(c);
	}
	LA4: ;
}

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

static N_INLINE(void, rtladdzct_53201)(Cell47705* c) {
	addzct_51617((&gch_50059.zct), c);
}

static N_INLINE(void, decref_53601)(Cell47705* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_53201(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_51658(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_52420(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell47705* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_51640(src);
		incref_54019(LOC5);
	}
	LA3: ;
	{
		Cell47705* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_51640((*dest));
		decref_53601(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(NI, scopedepth_263194)(Tcontext263020* c) {
	NI result;
	result = 0;
	{
		if (!!(((*c).currentscope == NIM_NIL))) goto LA3;
		result = (*(*c).currentscope).depthlevel;
	}
	goto LA1;
	LA3: ;
	{
		result = ((NI) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tscope213816*, openscope_268060)(Tcontext263020* c) {
	Tscope213816* result;
	Tscope213816* LOC1;
	NI LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tscope213816*) newObj((&NTI213818), sizeof(Tscope213816));
	asgnRef((void**) (&(*LOC1).parent), (*c).currentscope);
	newstrtable_217015((&(*LOC1).symbols));
	LOC2 = 0;
	LOC2 = scopedepth_263194(c);
	(*LOC1).depthlevel = (NI)(LOC2 + ((NI) 1));
	result = LOC1;
	asgnRef((void**) (&(*c).currentscope), result);
	return result;
}

N_NIMCALL(NimStringDesc*, getsymrepr_268309)(Tsym213822* s) {
	NimStringDesc* result;
	result = 0;
	switch ((*s).kind) {
	case ((NU8) 12):
	case ((NU8) 13):
	case ((NU8) 15):
	case ((NU8) 14):
	{
		result = getprocheader_239324(s, ((NU8) 0));
	}
	break;
	default:
	{
		result = copyString((*(*s).name).s);
	}
	break;
	}
	return result;
}

N_NIMCALL(void, ensurenomissingorunusedsymbols_268001)(Tscope213816* scope) {
	Ttabiter220071 it;
	Tsym213822* s;
	NI missingimpls;
	memset((void*)(&it), 0, sizeof(it));
	s = inittabiter_220073((&it), (*scope).symbols);
	missingimpls = ((NI) 0);
	{
		while (1) {
			if (!!((s == NIM_NIL))) goto LA2;
			{
				if (!(((*s).flags &(1U<<((NU)(((NU8) 4))&31U)))!=0)) goto LA5;
				{
					NimStringDesc* LOC11;
					if (!(missingimpls == ((NI) 0))) goto LA9;
					LOC11 = 0;
					LOC11 = getsymrepr_268309(s);
					localerror_186080((*s).info, ((NU16) 142), LOC11);
				}
				LA9: ;
				missingimpls += ((NI) 1);
			}
			goto LA3;
			LA5: ;
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = ((3 & (*s).flags) == 0);
				if (!(LOC13)) goto LA14;
				LOC13 = (((*s).options &(1U<<((NU)(((NU8) 12))&31U)))!=0);
				LA14: ;
				if (!LOC13) goto LA15;
				{
					if (!!(((1056793 &(1U<<((NU)((*s).kind)&31U)))!=0))) goto LA19;
					{
						NIM_BOOL LOC23;
						NimStringDesc* LOC27;
						LOC23 = 0;
						LOC23 = !(((*s).typ == NIM_NIL));
						if (!(LOC23)) goto LA24;
						LOC23 = !((((*(*s).typ).flags &(1U<<((NU)(((NU8) 24))&31U)))!=0));
						LA24: ;
						if (!LOC23) goto LA25;
						LOC27 = 0;
						LOC27 = getsymrepr_268309(s);
						message_186095((*s).info, ((NU16) 271), LOC27);
					}
					LA25: ;
				}
				LA19: ;
			}
			goto LA3;
			LA15: ;
			LA3: ;
			s = nextiter_220078((&it), (*scope).symbols);
		} LA2: ;
	}
}

N_NIMCALL(void, rawclosescope_268065)(Tcontext263020* c) {
	asgnRef((void**) (&(*c).currentscope), (*(*c).currentscope).parent);
}

N_NIMCALL(void, closescope_268068)(Tcontext263020* c) {
	ensurenomissingorunusedsymbols_268001((*c).currentscope);
	rawclosescope_268065(c);
}

N_NIMCALL(Tsym213822*, skipalias_268088)(Tsym213822* s, Tnode213790* n) {
	Tsym213822* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (s == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = !(((*s).kind == ((NU8) 24)));
		LA4: ;
		if (!LOC3) goto LA5;
		result = s;
	}
	goto LA1;
	LA5: ;
	{
		result = (*s).owner;
		{
			if (!(gcmd_159123 == ((NU8) 7))) goto LA10;
			replacedeprecated_267207((*n).info, s, result);
		}
		goto LA8;
		LA10: ;
		{
			NimStringDesc* LOC13;
			LOC13 = 0;
			LOC13 = rawNewString((*(*result).name).s->Sup.len + (*(*s).name).s->Sup.len + 14);
appendString(LOC13, ((NimStringDesc*) &TMP2835));
appendString(LOC13, (*(*result).name).s);
appendString(LOC13, ((NimStringDesc*) &TMP2836));
appendString(LOC13, (*(*s).name).s);
			message_186095((*n).info, ((NU16) 241), LOC13);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym213822*, searchinscopes_268131)(Tcontext263020* c, Tident188012* s) {
	Tsym213822* result;
{	result = 0;
	{
		Tscope213816* scope_268136;
		Tscope213816* HEX3Atmp_268150;
		Tscope213816* current_268153;
		scope_268136 = 0;
		HEX3Atmp_268150 = 0;
		HEX3Atmp_268150 = (*c).currentscope;
		current_268153 = HEX3Atmp_268150;
		{
			while (1) {
				if (!!((current_268153 == NIM_NIL))) goto LA3;
				scope_268136 = current_268153;
				result = strtableget_220066((*scope_268136).symbols, s);
				{
					if (!!((result == NIM_NIL))) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				current_268153 = (*current_268153).parent;
			} LA3: ;
		}
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Tsym213822*, errorsym_268243)(Tcontext263020* c, Tnode213790* n) {
	Tsym213822* result;
	Tnode213790* m;
	Tident188012* ident;
	Tsym213822* LOC12;
	result = 0;
	m = n;
	{
		if (!((*m).kind == ((NU8) 45))) goto LA3;
		m = (*m).kindU.S6.sons->data[((NI) 1)];
	}
	LA3: ;
	{
		if (!((*m).kind == ((NU8) 2) || (*m).kind == ((NU8) 3) || (*m).kind == ((NU8) 53))) goto LA7;
		ident = considerquotedident_268004(m);
	}
	goto LA5;
	LA7: ;
	{
		NimStringDesc* LOC10;
		NimStringDesc* LOC11;
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = rendertree_232044(m, 0);
		LOC10 = rawNewString(LOC11->Sup.len + 4);
appendString(LOC10, ((NimStringDesc*) &TMP2837));
appendString(LOC10, LOC11);
		ident = getident_188441(LOC10);
	}
	LA5: ;
	LOC12 = 0;
	LOC12 = getcurrowner_263210();
	result = newsym_214684(((NU8) 0), ident, LOC12, (*n).info);
	asgnRefNoCycle((void**) (&(*result).typ), errortype_263901(c));
	(*result).flags |= ((NU32)1)<<((((NU8) 29))%(sizeof(NU32)*8));
	{
		NIM_BOOL LOC15;
		LOC15 = 0;
		LOC15 = !((gcmd_159123 == ((NU8) 18)));
		if (!(LOC15)) goto LA16;
		LOC15 = ((*c).compilescontextid == ((NI) 0));
		LA16: ;
		if (!LOC15) goto LA17;
		strtableadd_220061((&(*(*c).importtable).symbols), result);
	}
	LA17: ;
	return result;
}

N_NIMCALL(Tsym213822*, lookup_268601)(Tcontext263020* c, Tnode213790* n) {
	Tsym213822* result;
{	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	{
		Tsym213822* LOC2;
		LOC2 = 0;
		LOC2 = searchinscopes_268131(c, (*n).kindU.S5.ident);
		result = skipalias_268088(LOC2, n);
		{
			if (!(result == NIM_NIL)) goto LA5;
			localerror_186080((*n).info, ((NU16) 63), (*(*n).kindU.S5.ident).s);
			result = errorsym_268243(c, n);
		}
		LA5: ;
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.sym;
	}
	break;
	case ((NU8) 53):
	{
		Tident188012* ident;
		Tsym213822* LOC9;
		ident = considerquotedident_268004(n);
		LOC9 = 0;
		LOC9 = searchinscopes_268131(c, ident);
		result = skipalias_268088(LOC9, n);
		{
			if (!(result == NIM_NIL)) goto LA12;
			localerror_186080((*n).info, ((NU16) 63), (*ident).s);
			result = errorsym_268243(c, n);
		}
		LA12: ;
	}
	break;
	default:
	{
		internalerror_186100((*n).info, ((NimStringDesc*) &TMP2838));
		goto BeforeRet;
	}
	break;
	}
	{
		NIM_BOOL LOC17;
		LOC17 = 0;
		LOC17 = contains_210811((*c).ambiguoussymbols, (*result).Sup.id);
		if (!LOC17) goto LA18;
		localerror_186080((*n).info, ((NU16) 66), (*(*result).name).s);
	}
	LA18: ;
	{
		if (!((*result).kind == ((NU8) 22))) goto LA22;
		loadstub_253825(result);
	}
	LA22: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym213822*, qualifiedlookup_268652)(Tcontext263020* c, Tnode213790* n, NU8 flags) {
	Tsym213822* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		Tident188012* ident;
		Tsym213822* LOC2;
		ident = considerquotedident_268004(n);
		LOC2 = 0;
		LOC2 = searchinscopes_268131(c, ident);
		result = skipalias_268088(LOC2, n);
		{
			NIM_BOOL LOC5;
			LOC5 = 0;
			LOC5 = (result == NIM_NIL);
			if (!(LOC5)) goto LA6;
			LOC5 = ((flags &(1U<<((NU)(((NU8) 1))&7U)))!=0);
			LA6: ;
			if (!LOC5) goto LA7;
			localerror_186080((*n).info, ((NU16) 63), (*ident).s);
			result = errorsym_268243(c, n);
		}
		goto LA3;
		LA7: ;
		{
			NIM_BOOL LOC10;
			NIM_BOOL LOC11;
			LOC10 = 0;
			LOC11 = 0;
			LOC11 = ((flags &(1U<<((NU)(((NU8) 0))&7U)))!=0);
			if (!(LOC11)) goto LA12;
			LOC11 = !((result == NIM_NIL));
			LA12: ;
			LOC10 = LOC11;
			if (!(LOC10)) goto LA13;
			LOC10 = contains_210811((*c).ambiguoussymbols, (*result).Sup.id);
			LA13: ;
			if (!LOC10) goto LA14;
			localerror_186080((*n).info, ((NU16) 66), (*ident).s);
		}
		goto LA3;
		LA14: ;
		LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.sym;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = ((flags &(1U<<((NU)(((NU8) 0))&7U)))!=0);
			if (!(LOC19)) goto LA20;
			LOC19 = contains_210811((*c).ambiguoussymbols, (*result).Sup.id);
			LA20: ;
			if (!LOC19) goto LA21;
			localerror_186080((*n).info, ((NU16) 66), (*(*(*n).kindU.S4.sym).name).s);
		}
		LA21: ;
	}
	break;
	case ((NU8) 45):
	{
		Tsym213822* m;
		result = NIM_NIL;
		m = qualifiedlookup_268652(c, (*n).kindU.S6.sons->data[((NI) 0)], (flags & 2));
		{
			NIM_BOOL LOC26;
			Tident188012* ident;
			LOC26 = 0;
			LOC26 = !((m == NIM_NIL));
			if (!(LOC26)) goto LA27;
			LOC26 = ((*m).kind == ((NU8) 6));
			LA27: ;
			if (!LOC26) goto LA28;
			ident = NIM_NIL;
			{
				if (!((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 2))) goto LA32;
				ident = (*(*n).kindU.S6.sons->data[((NI) 1)]).kindU.S5.ident;
			}
			goto LA30;
			LA32: ;
			{
				if (!((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 53))) goto LA35;
				ident = considerquotedident_268004((*n).kindU.S6.sons->data[((NI) 1)]);
			}
			goto LA30;
			LA35: ;
			LA30: ;
			{
				if (!!((ident == NIM_NIL))) goto LA39;
				{
					Tsym213822* LOC45;
					if (!(m == (*c).module)) goto LA43;
					LOC45 = 0;
					LOC45 = strtableget_220066((*(*c).toplevelscope).symbols, ident);
					result = skipalias_268088(LOC45, n);
				}
				goto LA41;
				LA43: ;
				{
					Tsym213822* LOC47;
					LOC47 = 0;
					LOC47 = strtableget_220066((*m).kindU.S3.tab, ident);
					result = skipalias_268088(LOC47, n);
				}
				LA41: ;
				{
					NIM_BOOL LOC50;
					LOC50 = 0;
					LOC50 = (result == NIM_NIL);
					if (!(LOC50)) goto LA51;
					LOC50 = ((flags &(1U<<((NU)(((NU8) 1))&7U)))!=0);
					LA51: ;
					if (!LOC50) goto LA52;
					localerror_186080((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 63), (*ident).s);
					result = errorsym_268243(c, (*n).kindU.S6.sons->data[((NI) 1)]);
				}
				LA52: ;
			}
			goto LA37;
			LA39: ;
			{
				if (!((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 3))) goto LA55;
				result = (*(*n).kindU.S6.sons->data[((NI) 1)]).kindU.S4.sym;
			}
			goto LA37;
			LA55: ;
			{
				NIM_BOOL LOC58;
				NimStringDesc* LOC62;
				LOC58 = 0;
				LOC58 = ((flags &(1U<<((NU)(((NU8) 1))&7U)))!=0);
				if (!(LOC58)) goto LA59;
				LOC58 = !(((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 57) || (*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 56)));
				LA59: ;
				if (!LOC58) goto LA60;
				LOC62 = 0;
				LOC62 = rendertree_232044((*n).kindU.S6.sons->data[((NI) 1)], 0);
				localerror_186080((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 20), LOC62);
				result = errorsym_268243(c, (*n).kindU.S6.sons->data[((NI) 1)]);
			}
			goto LA37;
			LA60: ;
			LA37: ;
		}
		LA28: ;
	}
	break;
	default:
	{
		result = NIM_NIL;
	}
	break;
	}
	{
		NIM_BOOL LOC66;
		LOC66 = 0;
		LOC66 = !((result == NIM_NIL));
		if (!(LOC66)) goto LA67;
		LOC66 = ((*result).kind == ((NU8) 22));
		LA67: ;
		if (!LOC66) goto LA68;
		loadstub_253825(result);
	}
	LA68: ;
	return result;
}

N_NIMCALL(Tsym213822*, initoverloaditer_268890)(Toverloaditer268296* o, Tcontext263020* c, Tnode213790* n) {
	Tsym213822* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		Tident188012* ident;
		ident = considerquotedident_268004(n);
		unsureAsgnRef((void**) (&(*o).scope), (*c).currentscope);
		(*o).mode = ((NU8) 1);
		{
			while (1) {
				Tsym213822* LOC4;
				LOC4 = 0;
				LOC4 = initidentiter_220087((&(*o).it), (*(*o).scope).symbols, ident);
				result = skipalias_268088(LOC4, n);
				{
					if (!!((result == NIM_NIL))) goto LA7;
					goto LA2;
				}
				goto LA5;
				LA7: ;
				{
					unsureAsgnRef((void**) (&(*o).scope), (*(*o).scope).parent);
					{
						if (!((*o).scope == NIM_NIL)) goto LA12;
						goto LA2;
					}
					LA12: ;
				}
				LA5: ;
			}
		} LA2: ;
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.sym;
		(*o).mode = ((NU8) 0);
	}
	break;
	case ((NU8) 45):
	{
		(*o).mode = ((NU8) 3);
		unsureAsgnRef((void**) (&(*o).m), qualifiedlookup_268652(c, (*n).kindU.S6.sons->data[((NI) 0)], 2));
		{
			NIM_BOOL LOC18;
			Tident188012* ident;
			LOC18 = 0;
			LOC18 = !(((*o).m == NIM_NIL));
			if (!(LOC18)) goto LA19;
			LOC18 = ((*(*o).m).kind == ((NU8) 6));
			LA19: ;
			if (!LOC18) goto LA20;
			ident = NIM_NIL;
			{
				if (!((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 2))) goto LA24;
				ident = (*(*n).kindU.S6.sons->data[((NI) 1)]).kindU.S5.ident;
			}
			goto LA22;
			LA24: ;
			{
				if (!((*(*n).kindU.S6.sons->data[((NI) 1)]).kind == ((NU8) 53))) goto LA27;
				ident = considerquotedident_268004((*n).kindU.S6.sons->data[((NI) 1)]);
			}
			goto LA22;
			LA27: ;
			LA22: ;
			{
				if (!!((ident == NIM_NIL))) goto LA31;
				{
					Tsym213822* LOC37;
					if (!((*o).m == (*c).module)) goto LA35;
					LOC37 = 0;
					LOC37 = initidentiter_220087((&(*o).it), (*(*c).toplevelscope).symbols, ident);
					result = skipalias_268088(LOC37, n);
					(*o).mode = ((NU8) 2);
				}
				goto LA33;
				LA35: ;
				{
					Tsym213822* LOC39;
					LOC39 = 0;
					LOC39 = initidentiter_220087((&(*o).it), (*(*o).m).kindU.S3.tab, ident);
					result = skipalias_268088(LOC39, n);
				}
				LA33: ;
			}
			goto LA29;
			LA31: ;
			{
				NimStringDesc* LOC41;
				LOC41 = 0;
				LOC41 = rendertree_232044((*n).kindU.S6.sons->data[((NI) 1)], 0);
				localerror_186080((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 20), LOC41);
				result = errorsym_268243(c, (*n).kindU.S6.sons->data[((NI) 1)]);
			}
			LA29: ;
		}
		LA20: ;
	}
	break;
	case ((NU8) 56):
	case ((NU8) 57):
	{
		(*o).mode = ((NU8) 4);
		result = (*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym;
		(*o).symchoiceindex = ((NI) 1);
		initintset_210885((&(*o).insymchoice));
		incl_210832((&(*o).insymchoice), (*result).Sup.id);
	}
	break;
	default:
	{
	}
	break;
	}
	{
		NIM_BOOL LOC46;
		LOC46 = 0;
		LOC46 = !((result == NIM_NIL));
		if (!(LOC46)) goto LA47;
		LOC46 = ((*result).kind == ((NU8) 22));
		LA47: ;
		if (!LOC46) goto LA48;
		loadstub_253825(result);
	}
	LA48: ;
	return result;
}

N_NIMCALL(Tsym213822*, nextoverloaditer_269041)(Toverloaditer268296* o, Tcontext263020* c, Tnode213790* n) {
	Tsym213822* result;
	result = 0;
	switch ((*o).mode) {
	case ((NU8) 0):
	{
		result = NIM_NIL;
	}
	break;
	case ((NU8) 1):
	{
		{
			Tsym213822* LOC7;
			if (!!(((*o).scope == NIM_NIL))) goto LA5;
			LOC7 = 0;
			LOC7 = nextidentiter_220093((&(*o).it), (*(*o).scope).symbols);
			result = skipalias_268088(LOC7, n);
			{
				while (1) {
					Tsym213822* LOC14;
					if (!(result == NIM_NIL)) goto LA9;
					unsureAsgnRef((void**) (&(*o).scope), (*(*o).scope).parent);
					{
						if (!((*o).scope == NIM_NIL)) goto LA12;
						goto LA8;
					}
					LA12: ;
					LOC14 = 0;
					LOC14 = initidentiter_220087((&(*o).it), (*(*o).scope).symbols, (*o).it.name);
					result = skipalias_268088(LOC14, n);
				} LA9: ;
			} LA8: ;
		}
		goto LA3;
		LA5: ;
		{
			result = NIM_NIL;
		}
		LA3: ;
	}
	break;
	case ((NU8) 2):
	{
		Tsym213822* LOC17;
		LOC17 = 0;
		LOC17 = nextidentiter_220093((&(*o).it), (*(*c).toplevelscope).symbols);
		result = skipalias_268088(LOC17, n);
	}
	break;
	case ((NU8) 3):
	{
		Tsym213822* LOC19;
		LOC19 = 0;
		LOC19 = nextidentiter_220093((&(*o).it), (*(*o).m).kindU.S3.tab);
		result = skipalias_268088(LOC19, n);
	}
	break;
	case ((NU8) 4):
	{
		{
			NI LOC23;
			LOC23 = 0;
			LOC23 = sonslen_216351(n);
			if (!((*o).symchoiceindex < LOC23)) goto LA24;
			result = (*(*n).kindU.S6.sons->data[(*o).symchoiceindex]).kindU.S4.sym;
			incl_210832((&(*o).insymchoice), (*result).Sup.id);
			(*o).symchoiceindex += ((NI) 1);
		}
		goto LA21;
		LA24: ;
		{
			Tsym213822* LOC29;
			if (!((*n).kind == ((NU8) 57))) goto LA27;
			(*o).mode = ((NU8) 5);
			unsureAsgnRef((void**) (&(*o).scope), (*c).currentscope);
			LOC29 = 0;
			LOC29 = firstidentexcluding_224500((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (*o).insymchoice);
			result = skipalias_268088(LOC29, n);
			{
				while (1) {
					Tsym213822* LOC36;
					if (!(result == NIM_NIL)) goto LA31;
					unsureAsgnRef((void**) (&(*o).scope), (*(*o).scope).parent);
					{
						if (!((*o).scope == NIM_NIL)) goto LA34;
						goto LA30;
					}
					LA34: ;
					LOC36 = 0;
					LOC36 = firstidentexcluding_224500((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (*o).insymchoice);
					result = skipalias_268088(LOC36, n);
				} LA31: ;
			} LA30: ;
		}
		goto LA21;
		LA27: ;
		LA21: ;
	}
	break;
	case ((NU8) 5):
	{
		Tsym213822* LOC38;
		LOC38 = 0;
		LOC38 = nextidentexcluding_224462((&(*o).it), (*(*o).scope).symbols, (*o).insymchoice);
		result = skipalias_268088(LOC38, n);
		{
			while (1) {
				Tsym213822* LOC45;
				if (!(result == NIM_NIL)) goto LA40;
				unsureAsgnRef((void**) (&(*o).scope), (*(*o).scope).parent);
				{
					if (!((*o).scope == NIM_NIL)) goto LA43;
					goto LA39;
				}
				LA43: ;
				LOC45 = 0;
				LOC45 = firstidentexcluding_224500((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (*o).insymchoice);
				result = skipalias_268088(LOC45, n);
			} LA40: ;
		} LA39: ;
	}
	break;
	}
	{
		NIM_BOOL LOC48;
		LOC48 = 0;
		LOC48 = !((result == NIM_NIL));
		if (!(LOC48)) goto LA49;
		LOC48 = ((*result).kind == ((NU8) 22));
		LA49: ;
		if (!LOC48) goto LA50;
		loadstub_253825(result);
	}
	LA50: ;
	return result;
}

N_NIMCALL(void, addprelimdecl_268451)(Tcontext263020* c, Tsym213822* sym) {
	NIM_BOOL LOC1;
	LOC1 = 0;
	LOC1 = adduniquesym_268054((*c).currentscope, sym);
}

N_NIMCALL(NI, lastoverloadscope_269029)(Toverloaditer268296* o) {
	NI result;
	result = 0;
	switch ((*o).mode) {
	case ((NU8) 1):
	{
		{
			if (!(*o).scope == 0) goto LA4;
			result = ((NI) -1);
		}
		goto LA2;
		LA4: ;
		{
			result = (*(*o).scope).depthlevel;
		}
		LA2: ;
	}
	break;
	case ((NU8) 2):
	{
		result = ((NI) 1);
	}
	break;
	case ((NU8) 3):
	{
		result = ((NI) 0);
	}
	break;
	default:
	{
		result = ((NI) -1);
	}
	break;
	}
	return result;
}

N_NIMCALL(Tsym213822*, searchinscopes_268209)(Tcontext263020* c, Tident188012* s, NU32 filter) {
	Tsym213822* result;
{	result = 0;
	{
		Tscope213816* scope_268215;
		Tscope213816* HEX3Atmp_268239;
		Tscope213816* current_268242;
		scope_268215 = 0;
		HEX3Atmp_268239 = 0;
		HEX3Atmp_268239 = (*c).currentscope;
		current_268242 = HEX3Atmp_268239;
		{
			while (1) {
				if (!!((current_268242 == NIM_NIL))) goto LA3;
				scope_268215 = current_268242;
				result = strtableget_220066((*scope_268215).symbols, s);
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = !((result == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC6 = ((filter &(1U<<((NU)((*result).kind)&31U)))!=0);
					LA7: ;
					if (!LOC6) goto LA8;
					goto BeforeRet;
				}
				LA8: ;
				current_268242 = (*current_268242).parent;
			} LA3: ;
		}
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, addoverloadablesymat_268496)(Tscope213816* scope, Tsym213822* fn) {
	Tsym213822* check;
{	{
		if (!!(((258112 &(1U<<((NU)((*fn).kind)&31U)))!=0))) goto LA3;
		internalerror_186100((*fn).info, ((NimStringDesc*) &TMP3323));
		goto BeforeRet;
	}
	LA3: ;
	check = strtableget_220066((*scope).symbols, (*fn).name);
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = !((check == NIM_NIL));
		if (!(LOC7)) goto LA8;
		LOC7 = !(((258112 &(1U<<((NU)((*check).kind)&31U)))!=0));
		LA8: ;
		if (!LOC7) goto LA9;
		wrongredefinition_268432((*fn).info, (*(*fn).name).s);
	}
	goto LA5;
	LA9: ;
	{
		strtableadd_220061((&(*scope).symbols), fn);
	}
	LA5: ;
	}BeforeRet: ;
}

N_NIMCALL(void, addinterfaceoverloadablesymat_268542)(Tcontext263020* c, Tscope213816* scope, Tsym213822* sym) {
	addoverloadablesymat_268496(scope, sym);
	addinterfacedeclaux_268461(c, sym);
}

N_NIMCALL(void, adddeclat_268455)(Tscope213816* scope, Tsym213822* sym) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = adduniquesym_268054(scope, sym);
		if (!!(LOC3)) goto LA4;
		wrongredefinition_268432((*sym).info, (*(*sym).name).s);
	}
	LA4: ;
}

N_NIMCALL(void, addinterfacedeclat_268491)(Tcontext263020* c, Tscope213816* scope, Tsym213822* sym) {
	adddeclat_268455(scope, sym);
	addinterfacedeclaux_268461(c, sym);
}

N_NIMCALL(Tsym213822*, localsearchinscope_268126)(Tcontext263020* c, Tident188012* s) {
	Tsym213822* result;
	result = 0;
	result = strtableget_220066((*(*c).currentscope).symbols, s);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_lookupsInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, compiler_lookupsDatInit000)(void) {
}

