/* Generated by Nim Compiler v0.11.2 */
/*   (c) 2015 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64
#include "nimbase.h"

#include <string.h>
typedef struct Tident168021 Tident168021;
typedef struct Tnode191813 Tnode191813;
typedef struct Ttype191849 Ttype191849;
typedef struct Tlineinfo164338 Tlineinfo164338;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym191843 Tsym191843;
typedef struct Tnodeseq191807 Tnodeseq191807;
typedef struct Tidobj168015 Tidobj168015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Ttypeseq191845 Ttypeseq191845;
typedef struct Tscope191837 Tscope191837;
typedef struct TY191944 TY191944;
typedef struct Tstrtable191817 Tstrtable191817;
typedef struct Tsymseq191815 Tsymseq191815;
typedef struct Tloc191827 Tloc191827;
typedef struct Ropeobj162009 Ropeobj162009;
typedef struct Tlib191831 Tlib191831;
typedef struct Tcontext245023 Tcontext245023;
typedef struct Tpasscontext242005 Tpasscontext242005;
typedef struct Tproccon245011 Tproccon245011;
typedef struct Intset188056 Intset188056;
typedef struct Ttrunk188052 Ttrunk188052;
typedef struct Ttrunkseq188054 Ttrunkseq188054;
typedef struct Tlinkedlist130028 Tlinkedlist130028;
typedef struct Tlistentry130022 Tlistentry130022;
typedef struct Tidtable191861 Tidtable191861;
typedef struct Tidpairseq191859 Tidpairseq191859;
typedef struct Tctx244048 Tctx244048;
typedef struct TY245141 TY245141;
typedef struct Tcell46347 Tcell46347;
typedef struct Tcellset46359 Tcellset46359;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellseq46363 Tcellseq46363;
typedef struct Tpagedesc46355 Tpagedesc46355;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Ttabiter199119 Ttabiter199119;
typedef struct Toverloaditer250431 Toverloaditer250431;
typedef struct Tidentiter199141 Tidentiter199141;
typedef struct Tinstantiation191833 Tinstantiation191833;
typedef struct Tidpair191857 Tidpair191857;
typedef struct TY244253 TY244253;
typedef struct TY165033 TY165033;
typedef struct PprocHEX3Aobjecttype244232 PprocHEX3Aobjecttype244232;
typedef struct TY244272 TY244272;
typedef struct Tinstantiationpair245013 Tinstantiationpair245013;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
typedef struct TY191933 TY191933;
typedef struct TY244233 TY244233;
typedef struct TY244239 TY244239;
typedef struct TY244273 TY244273;
typedef struct Vmargs244042 Vmargs244042;
typedef struct Tblock244030 Tblock244030;
typedef struct TY244213 TY244213;
struct  Tlineinfo164338  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tnode191813  {
Ttype191849* typ;
Tlineinfo164338 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym191843* sym;
} S4;
struct {Tident168021* ident;
} S5;
struct {Tnodeseq191807* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tidobj168015  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable191817  {
NI counter;
Tsymseq191815* data;
};
struct  Tloc191827  {
NU8 k;
NU8 s;
NU16 flags;
Ttype191849* t;
Ropeobj162009* r;
Ropeobj162009* heaproot;
};
struct  Tsym191843  {
  Tidobj168015 Sup;
NU8 kind;
union{
struct {Ttypeseq191845* typeinstcache;
Tscope191837* typscope;
} S1;
struct {TY191944* procinstcache;
Tsym191843* gcunsafetyreason;
} S2;
struct {TY191944* usedgenerics;
Tstrtable191817 tab;
} S3;
struct {Tsym191843* guard;
} S4;
} kindU;
NU16 magic;
Ttype191849* typ;
Tident168021* name;
Tlineinfo164338 info;
Tsym191843* owner;
NU32 flags;
Tnode191813* ast;
NU32 options;
NI position;
NI offset;
Tloc191827 loc;
Tlib191831* annex;
Tnode191813* constraint;
};
struct  Tident168021  {
  Tidobj168015 Sup;
NimStringDesc* s;
Tident168021* next;
NI h;
};
struct  Tscope191837  {
NI depthlevel;
Tstrtable191817 symbols;
Tnodeseq191807* usingsyms;
Tscope191837* parent;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Tpasscontext242005  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Intset188056  {
NI counter;
NI max;
Ttrunk188052* head;
Ttrunkseq188054* data;
};
struct  Tlinkedlist130028  {
Tlistentry130022* head;
Tlistentry130022* tail;
NI counter;
};
struct  Tidtable191861  {
NI counter;
Tidpairseq191859* data;
};
typedef N_NIMCALL_PTR(Tnode191813*, TY245072) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245077) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245085) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245093) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245098) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245106) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245111) (Tcontext245023* c, Tnode191813* n, Tnode191813* norig, NU32 filter);
typedef N_NIMCALL_PTR(Ttype191849*, TY245118) (Tcontext245023* c, Tnode191813* n, Ttype191849* prev);
typedef struct {
N_NIMCALL_PTR(Tnode191813*, ClPrc) (Tcontext245023* c, Tidtable191861 pt, Tnode191813* n, void* ClEnv);
void* ClEnv;
} TY245124;
typedef struct {
N_NIMCALL_PTR(Tsym191843*, ClPrc) (Tcontext245023* c, Tsym191843* fn, Tidtable191861 pt, Tlineinfo164338 info, void* ClEnv);
void* ClEnv;
} TY245130;
typedef N_NIMCALL_PTR(Tsym191843*, TY245146) (Tcontext245023* c, Tsym191843* dc, Ttype191849* t, Tlineinfo164338 info, NU8 op);
struct  Tcontext245023  {
  Tpasscontext242005 Sup;
Tsym191843* module;
Tscope191837* currentscope;
Tscope191837* importtable;
Tscope191837* toplevelscope;
Tproccon245011* p;
Tsymseq191815* friendmodules;
NI instcounter;
Intset188056 ambiguoussymbols;
NI intypeclass;
NI ingenericcontext;
NI inunrolledcontext;
NI incompilescontext;
NI ingenericinst;
Tsymseq191815* converters;
Tsymseq191815* patterns;
Tlinkedlist130028 optionstack;
Tidtable191861 symmapping;
Tlinkedlist130028 libs;
TY245072 semconstexpr;
TY245077 semexpr;
TY245085 semtryexpr;
TY245093 semtryconstexpr;
TY245098 semoperand;
TY245106 semconstboolexpr;
TY245111 semoverloadedcall;
TY245118 semtypenode;
TY245124 seminferredlambda;
TY245130 semgenerateinstance;
Intset188056 includedfiles;
Tstrtable191817 userpragmas;
Tctx244048* evalcontext;
Intset188056 unknownidents;
TY245141* generics;
NI lastgenericidx;
NI hloloopdetector;
NI inparallelstmt;
TY245146 insttypeboundop;
};
struct  Tcell46347  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46363  {
NI len;
NI cap;
Tcell46347** d;
};
struct  Tcellset46359  {
NI counter;
NI max;
Tpagedesc46355* head;
Tpagedesc46355** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46363 zct;
Tcellseq46363 decstack;
Tcellset46359 cycleroots;
Tcellseq46363 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
struct  Ttabiter199119  {
NI h;
};
struct  Ttype191849  {
  Tidobj168015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq191845* sons;
Tnode191813* n;
Tsym191843* owner;
Tsym191843* sym;
Tsym191843* destructor;
Tsym191843* deepcopy;
Tsym191843* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc191827 loc;
};
struct  Tidentiter199141  {
NI h;
Tident168021* name;
};
struct  Toverloaditer250431  {
Tidentiter199141 it;
Tsym191843* m;
NU8 mode;
NI symchoiceindex;
Tscope191837* scope;
Intset188056 insymchoice;
};
struct  Ropeobj162009  {
  TNimObject Sup;
Ropeobj162009* left;
Ropeobj162009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Tlib191831  {
  Tlistentry130022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj162009* name;
Tnode191813* path;
};
struct  Tproccon245011  {
Tsym191843* owner;
Tsym191843* resultsym;
NI nestedloopcounter;
NI nestedblockcounter;
NI intrystmt;
Tproccon245011* next;
NIM_BOOL wasforwarded;
Tnode191813* bracketexpr;
};
typedef NI TY27420[8];
struct  Ttrunk188052  {
Ttrunk188052* next;
NI key;
TY27420 bits;
};
struct  Tidpair191857  {
Tidobj168015* key;
TNimObject* val;
};
struct  Tctx244048  {
  Tpasscontext242005 Sup;
TY244253* code;
TY165033* debug;
Tnode191813* globals;
Tnode191813* constants;
Ttypeseq191845* types;
Tnode191813* currentexceptiona;
Tnode191813* currentexceptionb;
NI exceptioninstr;
PprocHEX3Aobjecttype244232* prc;
Tsym191843* module;
Tnode191813* callsite;
NU8 mode;
NU8 features;
NIM_BOOL traceactive;
NI loopiterations;
Tlineinfo164338 comesfromheuristic;
TY244272* callbacks;
NimStringDesc* errorflag;
};
struct  Tinstantiationpair245013  {
Tsym191843* genericsym;
Tinstantiation191833* inst;
};
struct  Tpagedesc46355  {
Tpagedesc46355* next;
NI key;
TY27420 bits;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
typedef Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Tinstantiation191833  {
Tsym191843* sym;
Ttypeseq191845* concretetypes;
TY191933* usedby;
};
struct TY244239 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY244239 TY244236[256];
struct  PprocHEX3Aobjecttype244232  {
TY244233* blocks;
Tsym191843* sym;
TY244236 slots;
NI maxslots;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Vmargs244042* args, void* ClEnv);
void* ClEnv;
} Vmcallback244044;
struct TY244273 {
NimStringDesc* Field0;
Vmcallback244044 Field1;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct  Tblock244030  {
Tsym191843* label;
TY244213* fixups;
};
struct  Vmargs244042  {
NI ra;
NI rb;
NI rc;
void* slots;
Tnode191813* currentexception;
};
struct Tnodeseq191807 {
  TGenericSeq Sup;
  Tnode191813* data[SEQ_DECL_SIZE];
};
struct Ttypeseq191845 {
  TGenericSeq Sup;
  Ttype191849* data[SEQ_DECL_SIZE];
};
struct TY191944 {
  TGenericSeq Sup;
  Tinstantiation191833* data[SEQ_DECL_SIZE];
};
struct Tsymseq191815 {
  TGenericSeq Sup;
  Tsym191843* data[SEQ_DECL_SIZE];
};
struct Ttrunkseq188054 {
  TGenericSeq Sup;
  Ttrunk188052* data[SEQ_DECL_SIZE];
};
struct Tidpairseq191859 {
  TGenericSeq Sup;
  Tidpair191857 data[SEQ_DECL_SIZE];
};
struct TY245141 {
  TGenericSeq Sup;
  Tinstantiationpair245013 data[SEQ_DECL_SIZE];
};
struct TY244253 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY165033 {
  TGenericSeq Sup;
  Tlineinfo164338 data[SEQ_DECL_SIZE];
};
struct TY244272 {
  TGenericSeq Sup;
  TY244273 data[SEQ_DECL_SIZE];
};
struct TY191933 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY244233 {
  TGenericSeq Sup;
  Tblock244030 data[SEQ_DECL_SIZE];
};
struct TY244213 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
static N_INLINE(NI, len_192097)(Tnode191813* n);
N_NIMCALL(void, localerror_166155)(Tlineinfo164338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_213058)(Tnode191813* n, NU8 renderflags);
N_NIMCALL(Tident168021*, getident_168463)(NimStringDesc* identifier);
N_NIMCALL(Tident168021*, considerquotedident_250010)(Tnode191813* 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_52222)(Tcell46347* c);
static N_INLINE(NIM_BOOL, canbecycleroot_49867)(Tcell46347* c);
static N_INLINE(void, rtladdcycleroot_50623)(Tcell46347* c);
N_NOINLINE(void, incl_47065)(Tcellset46359* s, Tcell46347* cell);
static N_INLINE(Tcell46347*, usrtocell_49846)(void* usr);
static N_INLINE(void, decref_51804)(Tcell46347* c);
static N_INLINE(void, rtladdzct_51404)(Tcell46347* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46363* s, Tcell46347* c);
N_NIMCALL(void, newstrtable_195027)(Tstrtable191817* Result);
static N_INLINE(NI, scopedepth_245233)(Tcontext245023* c);
N_NIMCALL(NIM_BOOL, adduniquesym_250079)(Tscope191837* scope, Tsym191843* s);
N_NIMCALL(NIM_BOOL, strtableincl_203607)(Tstrtable191817* t, Tsym191843* n);
N_NIMCALL(void, wrongredefinition_250588)(Tlineinfo164338 info, NimStringDesc* s);
N_NIMCALL(void, ensurenomissingorunusedsymbols_250004)(Tscope191837* scope);
N_NIMCALL(Tsym191843*, inittabiter_199124)(Ttabiter199119* ti, Tstrtable191817 tab);
N_NIMCALL(NimStringDesc*, getsymrepr_250447)(Tsym191843* s);
N_NIMCALL(NimStringDesc*, getprocheader_221447)(Tsym191843* sym, NU8 prefer);
N_NIMCALL(void, message_166188)(Tlineinfo164338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(Tsym191843*, nextiter_199132)(Ttabiter199119* ti, Tstrtable191817 tab);
N_NIMCALL(void, rawclosescope_250102)(Tcontext245023* c);
N_NIMCALL(Tsym191843*, skipalias_250150)(Tsym191843* s, Tnode191813* n);
N_NIMCALL(void, replacedeprecated_249273)(Tlineinfo164338 info, Tsym191843* oldsym, Tsym191843* newsym);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(Tsym191843*, searchinscopes_250205)(Tcontext245023* c, Tident168021* s);
N_NIMCALL(Tsym191843*, strtableget_199111)(Tstrtable191817 t, Tident168021* name);
N_NIMCALL(Tsym191843*, errorsym_250372)(Tcontext245023* c, Tnode191813* n);
N_NIMCALL(Tsym191843*, newsym_192655)(NU8 symkind, Tident168021* name, Tsym191843* owner, Tlineinfo164338 info);
N_NIMCALL(Tsym191843*, getcurrowner_245255)(void);
N_NIMCALL(Ttype191849*, errortype_246150)(Tcontext245023* c);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, strtableadd_199103)(Tstrtable191817* t, Tsym191843* n);
N_NIMCALL(void, internalerror_166199)(Tlineinfo164338 info, NimStringDesc* errmsg);
N_NIMCALL(NIM_BOOL, contains_188829)(Intset188056* s, NI key);
N_NIMCALL(void, loadstub_236638)(Tsym191843* s);
N_NIMCALL(Tsym191843*, qualifiedlookup_250864)(Tcontext245023* c, Tnode191813* n, NU8 flags);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(Tsym191843*, initidentiter_199147)(Tidentiter199141* ti, Tstrtable191817 tab, Tident168021* s);
N_NIMCALL(void, initintset_188927)(Intset188056* Result);
N_NIMCALL(void, incl_188856)(Intset188056* s, NI key);
N_NIMCALL(Tsym191843*, nextidentiter_199156)(Tidentiter199141* ti, Tstrtable191817 tab);
N_NIMCALL(NI, sonslen_194403)(Tnode191813* n);
N_NIMCALL(Tsym191843*, firstidentexcluding_204154)(Tidentiter199141* ti, Tstrtable191817 tab, Tident168021* s, Intset188056* excluding);
N_NIMCALL(Tsym191843*, nextidentexcluding_204104)(Tidentiter199141* ti, Tstrtable191817 tab, Intset188056* excluding);
N_NIMCALL(void, adddecl_250607)(Tcontext245023* c, Tsym191843* sym);
N_NIMCALL(void, addinterfacedeclaux_250641)(Tcontext245023* c, Tsym191843* sym);
N_NIMCALL(void, addoverloadablesymat_250688)(Tscope191837* scope, Tsym191843* fn);
N_NIMCALL(void, adddeclat_250629)(Tscope191837* scope, Tsym191843* sym);
STRING_LITERAL(TMP2624, "<Error>", 7);
STRING_LITERAL(TMP2625, "", 0);
STRING_LITERAL(TMP2690, "use ", 4);
STRING_LITERAL(TMP2691, " instead; ", 10);
STRING_LITERAL(TMP2692, "err:", 4);
STRING_LITERAL(TMP2693, "lookUp", 6);
STRING_LITERAL(TMP3036, "addInterfaceDeclAux", 19);
STRING_LITERAL(TMP3112, "addOverloadableSymAt", 20);
extern TNimType NTI191839; /* PScope */
extern Tgcheap48216 gch_48244;
extern NU8 gcmd_155130;

static N_INLINE(NI, len_192097)(Tnode191813* 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(Tident168021*, considerquotedident_250010)(Tnode191813* n) {
	Tident168021* 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_192097(n);
		switch (LOC4) {
		case ((NI) 0):
		{
			NimStringDesc* LOC6;
			LOC6 = 0;
			LOC6 = rendertree_213058(n, 0);
			localerror_166155((*n).info, ((NU16) 19), LOC6);
			result = getident_168463(((NimStringDesc*) &TMP2624));
		}
		break;
		case ((NI) 1):
		{
			result = considerquotedident_250010((*n).kindU.S6.sons->data[((NI) 0)]);
		}
		break;
		default:
		{
			NimStringDesc* id;
			id = copyString(((NimStringDesc*) &TMP2625));
			{
				NI i_250039;
				NI HEX3Atmp_250049;
				NI LOC10;
				NI res_250052;
				i_250039 = 0;
				HEX3Atmp_250049 = 0;
				LOC10 = 0;
				LOC10 = len_192097(n);
				HEX3Atmp_250049 = (LOC10 - 1);
				res_250052 = ((NI) 0);
				{
					while (1) {
						Tnode191813* x;
						if (!(res_250052 <= HEX3Atmp_250049)) goto LA12;
						i_250039 = res_250052;
						x = (*n).kindU.S6.sons->data[i_250039];
						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_213058(n, 0);
							localerror_166155((*n).info, ((NU16) 19), LOC16);
							result = getident_168463(((NimStringDesc*) &TMP2624));
							goto BeforeRet;
						}
						break;
						}
						res_250052 += ((NI) 1);
					} LA12: ;
				}
			}
			result = getident_168463(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_213058(n, 0);
		localerror_166155((*n).info, ((NU16) 19), LOC19);
		result = getident_168463(((NimStringDesc*) &TMP2624));
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

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

static N_INLINE(void, rtladdcycleroot_50623)(Tcell46347* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_47065((&gch_48244.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_52222)(Tcell46347* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_49867(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_50623(c);
	}
	LA4: ;
}

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

static N_INLINE(void, rtladdzct_51404)(Tcell46347* c) {
	addzct_49817((&gch_48244.zct), c);
}

static N_INLINE(void, decref_51804)(Tcell46347* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_49867(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_50623(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Tcell46347* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_49846(src);
		incref_52222(LOC5);
	}
	LA3: ;
	{
		Tcell46347* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_49846((*dest));
		decref_51804(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(NI, scopedepth_245233)(Tcontext245023* 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(Tscope191837*, openscope_250091)(Tcontext245023* c) {
	Tscope191837* result;
	Tscope191837* LOC1;
	NI LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tscope191837*) newObj((&NTI191839), sizeof(Tscope191837));
	asgnRef((void**) (&(*LOC1).parent), (*c).currentscope);
	newstrtable_195027((&(*LOC1).symbols));
	LOC2 = 0;
	LOC2 = scopedepth_245233(c);
	(*LOC1).depthlevel = (NI)(LOC2 + ((NI) 1));
	result = LOC1;
	asgnRef((void**) (&(*c).currentscope), result);
	return result;
}

N_NIMCALL(NIM_BOOL, adduniquesym_250079)(Tscope191837* scope, Tsym191843* s) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = strtableincl_203607((&(*scope).symbols), s);
	result = !(LOC1);
	return result;
}

N_NIMCALL(void, wrongredefinition_250588)(Tlineinfo164338 info, NimStringDesc* s) {
	{
		if (!!((gcmd_155130 == ((NU8) 18)))) goto LA3;
		localerror_166155(info, ((NU16) 40), s);
	}
	LA3: ;
}

N_NIMCALL(void, adddecl_250607)(Tcontext245023* c, Tsym191843* sym) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = adduniquesym_250079((*c).currentscope, sym);
		if (!!(LOC3)) goto LA4;
		wrongredefinition_250588((*sym).info, (*(*sym).name).s);
	}
	LA4: ;
}

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

N_NIMCALL(void, ensurenomissingorunusedsymbols_250004)(Tscope191837* scope) {
	Ttabiter199119 it;
	Tsym191843* s;
	NI missingimpls;
	memset((void*)(&it), 0, sizeof(it));
	s = inittabiter_199124((&it), (*scope).symbols);
	missingimpls = ((NI) 0);
	{
		while (1) {
			if (!!((s == NIM_NIL))) goto LA2;
			{
				if (!(((*s).flags &(1<<((((NU8) 4))&31)))!=0)) goto LA5;
				{
					NimStringDesc* LOC11;
					if (!(missingimpls == ((NI) 0))) goto LA9;
					LOC11 = 0;
					LOC11 = getsymrepr_250447(s);
					localerror_166155((*s).info, ((NU16) 138), 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 &(1<<((((NU8) 12))&31)))!=0);
				LA14: ;
				if (!LOC13) goto LA15;
				{
					if (!!(((2105369 &(1<<(((*s).kind)&31)))!=0))) goto LA19;
					{
						NIM_BOOL LOC23;
						NimStringDesc* LOC27;
						LOC23 = 0;
						LOC23 = !(((*s).typ == NIM_NIL));
						if (!(LOC23)) goto LA24;
						LOC23 = !((((*(*s).typ).flags &(1<<((((NU8) 24))&31)))!=0));
						LA24: ;
						if (!LOC23) goto LA25;
						LOC27 = 0;
						LOC27 = getsymrepr_250447(s);
						message_166188((*s).info, ((NU16) 264), LOC27);
					}
					LA25: ;
				}
				LA19: ;
			}
			goto LA3;
			LA15: ;
			LA3: ;
			s = nextiter_199132((&it), (*scope).symbols);
		} LA2: ;
	}
}

N_NIMCALL(void, rawclosescope_250102)(Tcontext245023* c) {
	asgnRef((void**) (&(*c).currentscope), (*(*c).currentscope).parent);
}

N_NIMCALL(void, closescope_250111)(Tcontext245023* c) {
	ensurenomissingorunusedsymbols_250004((*c).currentscope);
	rawclosescope_250102(c);
}

N_NIMCALL(Tsym191843*, skipalias_250150)(Tsym191843* s, Tnode191813* n) {
	Tsym191843* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (s == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = !(((*s).kind == ((NU8) 25)));
		LA4: ;
		if (!LOC3) goto LA5;
		result = s;
	}
	goto LA1;
	LA5: ;
	{
		result = (*s).owner;
		{
			if (!(gcmd_155130 == ((NU8) 7))) goto LA10;
			replacedeprecated_249273((*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*) &TMP2690));
appendString(LOC13, (*(*result).name).s);
appendString(LOC13, ((NimStringDesc*) &TMP2691));
appendString(LOC13, (*(*s).name).s);
			message_166188((*n).info, ((NU16) 234), LOC13);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym191843*, searchinscopes_250205)(Tcontext245023* c, Tident168021* s) {
	Tsym191843* result;
{	result = 0;
	{
		Tscope191837* scope_250210;
		Tscope191837* HEX3Atmp_250224;
		Tscope191837* current_250227;
		scope_250210 = 0;
		HEX3Atmp_250224 = 0;
		HEX3Atmp_250224 = (*c).currentscope;
		current_250227 = HEX3Atmp_250224;
		{
			while (1) {
				if (!!((current_250227 == NIM_NIL))) goto LA3;
				scope_250210 = current_250227;
				result = strtableget_199111((*scope_250210).symbols, s);
				{
					if (!!((result == NIM_NIL))) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				current_250227 = (*current_250227).parent;
			} LA3: ;
		}
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Tsym191843*, errorsym_250372)(Tcontext245023* c, Tnode191813* n) {
	Tsym191843* result;
	Tnode191813* m;
	Tident168021* ident;
	Tsym191843* 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_250010(m);
	}
	goto LA5;
	LA7: ;
	{
		NimStringDesc* LOC10;
		NimStringDesc* LOC11;
		LOC10 = 0;
		LOC11 = 0;
		LOC11 = rendertree_213058(m, 0);
		LOC10 = rawNewString(LOC11->Sup.len + 4);
appendString(LOC10, ((NimStringDesc*) &TMP2692));
appendString(LOC10, LOC11);
		ident = getident_168463(LOC10);
	}
	LA5: ;
	LOC12 = 0;
	LOC12 = getcurrowner_245255();
	result = newsym_192655(((NU8) 0), ident, LOC12, (*n).info);
	asgnRefNoCycle((void**) (&(*result).typ), errortype_246150(c));
	(*result).flags |= ((NI32)1)<<((((NU8) 29))%(sizeof(NI32)*8));
	{
		NIM_BOOL LOC15;
		LOC15 = 0;
		LOC15 = !((gcmd_155130 == ((NU8) 18)));
		if (!(LOC15)) goto LA16;
		LOC15 = ((*c).incompilescontext == ((NI) 0));
		LA16: ;
		if (!LOC15) goto LA17;
		strtableadd_199103((&(*(*c).importtable).symbols), result);
	}
	LA17: ;
	return result;
}

N_NIMCALL(Tsym191843*, lookup_250804)(Tcontext245023* c, Tnode191813* n) {
	Tsym191843* result;
{	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	{
		Tsym191843* LOC2;
		LOC2 = 0;
		LOC2 = searchinscopes_250205(c, (*n).kindU.S5.ident);
		result = skipalias_250150(LOC2, n);
		{
			if (!(result == NIM_NIL)) goto LA5;
			localerror_166155((*n).info, ((NU16) 61), (*(*n).kindU.S5.ident).s);
			result = errorsym_250372(c, n);
		}
		LA5: ;
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.sym;
	}
	break;
	case ((NU8) 53):
	{
		Tident168021* ident;
		Tsym191843* LOC9;
		ident = considerquotedident_250010(n);
		LOC9 = 0;
		LOC9 = searchinscopes_250205(c, ident);
		result = skipalias_250150(LOC9, n);
		{
			if (!(result == NIM_NIL)) goto LA12;
			localerror_166155((*n).info, ((NU16) 61), (*ident).s);
			result = errorsym_250372(c, n);
		}
		LA12: ;
	}
	break;
	default:
	{
		internalerror_166199((*n).info, ((NimStringDesc*) &TMP2693));
		goto BeforeRet;
	}
	break;
	}
	{
		NIM_BOOL LOC17;
		LOC17 = 0;
		LOC17 = contains_188829((&(*c).ambiguoussymbols), (*result).Sup.id);
		if (!LOC17) goto LA18;
		localerror_166155((*n).info, ((NU16) 62), (*(*result).name).s);
	}
	LA18: ;
	{
		if (!((*result).kind == ((NU8) 23))) goto LA22;
		loadstub_236638(result);
	}
	LA22: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym191843*, qualifiedlookup_250864)(Tcontext245023* c, Tnode191813* n, NU8 flags) {
	Tsym191843* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		Tident168021* ident;
		Tsym191843* LOC2;
		ident = considerquotedident_250010(n);
		LOC2 = 0;
		LOC2 = searchinscopes_250205(c, ident);
		result = skipalias_250150(LOC2, n);
		{
			NIM_BOOL LOC5;
			LOC5 = 0;
			LOC5 = (result == NIM_NIL);
			if (!(LOC5)) goto LA6;
			LOC5 = ((flags &(1<<((((NU8) 1))&7)))!=0);
			LA6: ;
			if (!LOC5) goto LA7;
			localerror_166155((*n).info, ((NU16) 61), (*ident).s);
			result = errorsym_250372(c, n);
		}
		goto LA3;
		LA7: ;
		{
			NIM_BOOL LOC10;
			NIM_BOOL LOC11;
			LOC10 = 0;
			LOC11 = 0;
			LOC11 = ((flags &(1<<((((NU8) 0))&7)))!=0);
			if (!(LOC11)) goto LA12;
			LOC11 = !((result == NIM_NIL));
			LA12: ;
			LOC10 = LOC11;
			if (!(LOC10)) goto LA13;
			LOC10 = contains_188829((&(*c).ambiguoussymbols), (*result).Sup.id);
			LA13: ;
			if (!LOC10) goto LA14;
			localerror_166155((*n).info, ((NU16) 62), (*ident).s);
		}
		goto LA3;
		LA14: ;
		LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.sym;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = ((flags &(1<<((((NU8) 0))&7)))!=0);
			if (!(LOC19)) goto LA20;
			LOC19 = contains_188829((&(*c).ambiguoussymbols), (*result).Sup.id);
			LA20: ;
			if (!LOC19) goto LA21;
			localerror_166155((*n).info, ((NU16) 62), (*(*(*n).kindU.S4.sym).name).s);
		}
		LA21: ;
	}
	break;
	case ((NU8) 45):
	{
		Tsym191843* m;
		result = NIM_NIL;
		m = qualifiedlookup_250864(c, (*n).kindU.S6.sons->data[((NI) 0)], (flags & 2));
		{
			NIM_BOOL LOC26;
			Tident168021* 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_250010((*n).kindU.S6.sons->data[((NI) 1)]);
			}
			goto LA30;
			LA35: ;
			LA30: ;
			{
				if (!!((ident == NIM_NIL))) goto LA39;
				{
					Tsym191843* LOC45;
					if (!(m == (*c).module)) goto LA43;
					LOC45 = 0;
					LOC45 = strtableget_199111((*(*c).toplevelscope).symbols, ident);
					result = skipalias_250150(LOC45, n);
				}
				goto LA41;
				LA43: ;
				{
					Tsym191843* LOC47;
					LOC47 = 0;
					LOC47 = strtableget_199111((*m).kindU.S3.tab, ident);
					result = skipalias_250150(LOC47, n);
				}
				LA41: ;
				{
					NIM_BOOL LOC50;
					LOC50 = 0;
					LOC50 = (result == NIM_NIL);
					if (!(LOC50)) goto LA51;
					LOC50 = ((flags &(1<<((((NU8) 1))&7)))!=0);
					LA51: ;
					if (!LOC50) goto LA52;
					localerror_166155((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 61), (*ident).s);
					result = errorsym_250372(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 &(1<<((((NU8) 1))&7)))!=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_213058((*n).kindU.S6.sons->data[((NI) 1)], 0);
				localerror_166155((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 19), LOC62);
				result = errorsym_250372(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) 23));
		LA67: ;
		if (!LOC66) goto LA68;
		loadstub_236638(result);
	}
	LA68: ;
	return result;
}

N_NIMCALL(Tsym191843*, initoverloaditer_251108)(Toverloaditer250431* o, Tcontext245023* c, Tnode191813* n) {
	Tsym191843* result;
	result = 0;
	switch ((*n).kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		Tident168021* ident;
		ident = considerquotedident_250010(n);
		unsureAsgnRef((void**) (&(*o).scope), (*c).currentscope);
		(*o).mode = ((NU8) 1);
		{
			while (1) {
				Tsym191843* LOC4;
				LOC4 = 0;
				LOC4 = initidentiter_199147((&(*o).it), (*(*o).scope).symbols, ident);
				result = skipalias_250150(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_250864(c, (*n).kindU.S6.sons->data[((NI) 0)], 2));
		{
			NIM_BOOL LOC18;
			Tident168021* 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_250010((*n).kindU.S6.sons->data[((NI) 1)]);
			}
			goto LA22;
			LA27: ;
			LA22: ;
			{
				if (!!((ident == NIM_NIL))) goto LA31;
				{
					Tsym191843* LOC37;
					if (!((*o).m == (*c).module)) goto LA35;
					LOC37 = 0;
					LOC37 = initidentiter_199147((&(*o).it), (*(*c).toplevelscope).symbols, ident);
					result = skipalias_250150(LOC37, n);
					(*o).mode = ((NU8) 2);
				}
				goto LA33;
				LA35: ;
				{
					Tsym191843* LOC39;
					LOC39 = 0;
					LOC39 = initidentiter_199147((&(*o).it), (*(*o).m).kindU.S3.tab, ident);
					result = skipalias_250150(LOC39, n);
				}
				LA33: ;
			}
			goto LA29;
			LA31: ;
			{
				NimStringDesc* LOC41;
				LOC41 = 0;
				LOC41 = rendertree_213058((*n).kindU.S6.sons->data[((NI) 1)], 0);
				localerror_166155((*(*n).kindU.S6.sons->data[((NI) 1)]).info, ((NU16) 19), LOC41);
				result = errorsym_250372(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_188927((&(*o).insymchoice));
		incl_188856((&(*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) 23));
		LA47: ;
		if (!LOC46) goto LA48;
		loadstub_236638(result);
	}
	LA48: ;
	return result;
}

N_NIMCALL(Tsym191843*, nextoverloaditer_251277)(Toverloaditer250431* o, Tcontext245023* c, Tnode191813* n) {
	Tsym191843* result;
	result = 0;
	switch ((*o).mode) {
	case ((NU8) 0):
	{
		result = NIM_NIL;
	}
	break;
	case ((NU8) 1):
	{
		{
			Tsym191843* LOC7;
			if (!!(((*o).scope == NIM_NIL))) goto LA5;
			LOC7 = 0;
			LOC7 = nextidentiter_199156((&(*o).it), (*(*o).scope).symbols);
			result = skipalias_250150(LOC7, n);
			{
				while (1) {
					Tsym191843* 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_199147((&(*o).it), (*(*o).scope).symbols, (*o).it.name);
					result = skipalias_250150(LOC14, n);
				} LA9: ;
			} LA8: ;
		}
		goto LA3;
		LA5: ;
		{
			result = NIM_NIL;
		}
		LA3: ;
	}
	break;
	case ((NU8) 2):
	{
		Tsym191843* LOC17;
		LOC17 = 0;
		LOC17 = nextidentiter_199156((&(*o).it), (*(*c).toplevelscope).symbols);
		result = skipalias_250150(LOC17, n);
	}
	break;
	case ((NU8) 3):
	{
		Tsym191843* LOC19;
		LOC19 = 0;
		LOC19 = nextidentiter_199156((&(*o).it), (*(*o).m).kindU.S3.tab);
		result = skipalias_250150(LOC19, n);
	}
	break;
	case ((NU8) 4):
	{
		{
			NI LOC23;
			LOC23 = 0;
			LOC23 = sonslen_194403(n);
			if (!((*o).symchoiceindex < LOC23)) goto LA24;
			result = (*(*n).kindU.S6.sons->data[(*o).symchoiceindex]).kindU.S4.sym;
			incl_188856((&(*o).insymchoice), (*result).Sup.id);
			(*o).symchoiceindex += ((NI) 1);
		}
		goto LA21;
		LA24: ;
		{
			Tsym191843* LOC29;
			if (!((*n).kind == ((NU8) 57))) goto LA27;
			(*o).mode = ((NU8) 5);
			unsureAsgnRef((void**) (&(*o).scope), (*c).currentscope);
			LOC29 = 0;
			LOC29 = firstidentexcluding_204154((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (&(*o).insymchoice));
			result = skipalias_250150(LOC29, n);
			{
				while (1) {
					Tsym191843* 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_204154((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (&(*o).insymchoice));
					result = skipalias_250150(LOC36, n);
				} LA31: ;
			} LA30: ;
		}
		goto LA21;
		LA27: ;
		LA21: ;
	}
	break;
	case ((NU8) 5):
	{
		Tsym191843* LOC38;
		LOC38 = 0;
		LOC38 = nextidentexcluding_204104((&(*o).it), (*(*o).scope).symbols, (&(*o).insymchoice));
		result = skipalias_250150(LOC38, n);
		{
			while (1) {
				Tsym191843* 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_204154((&(*o).it), (*(*o).scope).symbols, (*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S4.sym).name, (&(*o).insymchoice));
				result = skipalias_250150(LOC45, n);
			} LA40: ;
		} LA39: ;
	}
	break;
	}
	{
		NIM_BOOL LOC48;
		LOC48 = 0;
		LOC48 = !((result == NIM_NIL));
		if (!(LOC48)) goto LA49;
		LOC48 = ((*result).kind == ((NU8) 23));
		LA49: ;
		if (!LOC48) goto LA50;
		loadstub_236638(result);
	}
	LA50: ;
	return result;
}

N_NIMCALL(void, addprelimdecl_250619)(Tcontext245023* c, Tsym191843* sym) {
	NIM_BOOL LOC1;
	LOC1 = 0;
	LOC1 = adduniquesym_250079((*c).currentscope, sym);
}

N_NIMCALL(void, addinterfacedeclaux_250641)(Tcontext245023* c, Tsym191843* sym) {
	{
		if (!(((*sym).flags &(1<<((((NU8) 1))&31)))!=0)) goto LA3;
		{
			if (!!(((*c).module == NIM_NIL))) goto LA7;
			strtableadd_199103((&(*(*c).module).kindU.S3.tab), sym);
		}
		goto LA5;
		LA7: ;
		{
			internalerror_166199((*sym).info, ((NimStringDesc*) &TMP3036));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(void, addinterfacedecl_250736)(Tcontext245023* c, Tsym191843* sym) {
	adddecl_250607(c, sym);
	addinterfacedeclaux_250641(c, sym);
}

N_NIMCALL(NI, lastoverloadscope_251259)(Toverloaditer250431* 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(Tsym191843*, searchinscopes_250323)(Tcontext245023* c, Tident168021* s, NU32 filter) {
	Tsym191843* result;
{	result = 0;
	{
		Tscope191837* scope_250329;
		Tscope191837* HEX3Atmp_250353;
		Tscope191837* current_250356;
		scope_250329 = 0;
		HEX3Atmp_250353 = 0;
		HEX3Atmp_250353 = (*c).currentscope;
		current_250356 = HEX3Atmp_250353;
		{
			while (1) {
				if (!!((current_250356 == NIM_NIL))) goto LA3;
				scope_250329 = current_250356;
				result = strtableget_199111((*scope_250329).symbols, s);
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = !((result == NIM_NIL));
					if (!(LOC6)) goto LA7;
					LOC6 = ((filter &(1<<(((*result).kind)&31)))!=0);
					LA7: ;
					if (!LOC6) goto LA8;
					goto BeforeRet;
				}
				LA8: ;
				current_250356 = (*current_250356).parent;
			} LA3: ;
		}
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, addoverloadablesymat_250688)(Tscope191837* scope, Tsym191843* fn) {
	Tsym191843* check;
{	{
		if (!!(((520256 &(1<<(((*fn).kind)&31)))!=0))) goto LA3;
		internalerror_166199((*fn).info, ((NimStringDesc*) &TMP3112));
		goto BeforeRet;
	}
	LA3: ;
	check = strtableget_199111((*scope).symbols, (*fn).name);
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = !((check == NIM_NIL));
		if (!(LOC7)) goto LA8;
		LOC7 = !(((520256 &(1<<(((*check).kind)&31)))!=0));
		LA8: ;
		if (!LOC7) goto LA9;
		wrongredefinition_250588((*fn).info, (*(*fn).name).s);
	}
	goto LA5;
	LA9: ;
	{
		strtableadd_199103((&(*scope).symbols), fn);
	}
	LA5: ;
	}BeforeRet: ;
}

N_NIMCALL(void, addinterfaceoverloadablesymat_250746)(Tcontext245023* c, Tscope191837* scope, Tsym191843* sym) {
	addoverloadablesymat_250688(scope, sym);
	addinterfacedeclaux_250641(c, sym);
}

N_NIMCALL(void, adddeclat_250629)(Tscope191837* scope, Tsym191843* sym) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = adduniquesym_250079(scope, sym);
		if (!!(LOC3)) goto LA4;
		wrongredefinition_250588((*sym).info, (*(*sym).name).s);
	}
	LA4: ;
}

N_NIMCALL(void, addinterfacedeclat_250677)(Tcontext245023* c, Tscope191837* scope, Tsym191843* sym) {
	adddeclat_250629(scope, sym);
	addinterfacedeclaux_250641(c, sym);
}

N_NIMCALL(Tsym191843*, localsearchinscope_250194)(Tcontext245023* c, Tident168021* s) {
	Tsym191843* result;
	result = 0;
	result = strtableget_199111((*(*c).currentscope).symbols, s);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, nimsrc_lookupsInit)(void) {
}

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

