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

#include <string.h>

#include <setjmp.h>
typedef struct ttype225852 ttype225852;
typedef struct tidobj200015 tidobj200015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq225848 ttypeseq225848;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode225816 tnode225816;
typedef struct tsym225846 tsym225846;
typedef struct tloc225830 tloc225830;
typedef struct trope177009 trope177009;
typedef struct tcell44935 tcell44935;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct tident200021 tident200021;
typedef struct NimStringDesc NimStringDesc;
typedef struct tscope225840 tscope225840;
typedef struct TY225947 TY225947;
typedef struct tinstantiation225836 tinstantiation225836;
typedef struct tstrtable225820 tstrtable225820;
typedef struct tsymseq225818 tsymseq225818;
typedef struct tlineinfo195539 tlineinfo195539;
typedef struct tlib225834 tlib225834;
typedef struct tpasscontext286005 tpasscontext286005;
typedef struct tcontext290021 tcontext290021;
typedef struct tproccon290011 tproccon290011;
typedef struct intset222056 intset222056;
typedef struct ttrunk222052 ttrunk222052;
typedef struct ttrunkseq222054 ttrunkseq222054;
typedef struct tlinkedlist127028 tlinkedlist127028;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tidtable225864 tidtable225864;
typedef struct tidpairseq225862 tidpairseq225862;
typedef struct tidpair225860 tidpair225860;
typedef struct tctx289048 tctx289048;
typedef struct TY290133 TY290133;
typedef struct tinstantiationpair290013 tinstantiationpair290013;
typedef struct tnodeseq225810 tnodeseq225810;
typedef struct toverloaditer295491 toverloaditer295491;
typedef struct tidentiter235141 tidentiter235141;
typedef struct TY84745 TY84745;
typedef struct tcandidate405209 tcandidate405209;
typedef struct trepltypevars317786 trepltypevars317786;
typedef struct TY225936 TY225936;
typedef struct toptionentry290005 toptionentry290005;
typedef struct TY501454 TY501454;
typedef struct templctx504840 templctx504840;
typedef struct slice84173 slice84173;
typedef struct ttabiter235119 ttabiter235119;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct TY516908 TY516908;
typedef struct tfieldinstctx520871 tfieldinstctx520871;
typedef struct tfieldsctx521169 tfieldsctx521169;
typedef struct trodreader276030 trodreader276030;
typedef struct tindex276028 tindex276028;
typedef struct tiitable235274 tiitable235274;
typedef struct tiipairseq235272 tiipairseq235272;
typedef struct tiipair235270 tiipair235270;
typedef struct memfile274208 memfile274208;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
typedef struct TY289250 TY289250;
typedef struct TY196414 TY196414;
typedef struct pprocHEX3Aobjecttype289230 pprocHEX3Aobjecttype289230;
typedef struct TY289269 TY289269;
typedef struct TY289270 TY289270;
typedef struct vmargs289042 vmargs289042;
typedef struct TY289231 TY289231;
typedef struct tblock289030 tblock289030;
typedef struct TY289211 TY289211;
typedef struct TY289237 TY289237;
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tidobj200015  {
  TNimObject Sup;
NI Id;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tloc225830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype225852* T;
trope177009* R;
trope177009* Heaproot;
};
struct  ttype225852  {
  tidobj200015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq225848* Sons;
tnode225816* N;
tsym225846* Owner;
tsym225846* Sym;
tsym225846* Destructor;
tsym225846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc225830 Loc;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tstrtable225820  {
NI Counter;
tsymseq225818* Data;
};
struct  tlineinfo195539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tsym225846  {
  tidobj200015 Sup;
NU8 Kind;
union {
struct {ttypeseq225848* Typeinstcache;
tscope225840* Typscope;
} S1;
struct {TY225947* Procinstcache;
tscope225840* Scope;
} S2;
struct {TY225947* Usedgenerics;
tstrtable225820 Tab;
} S3;
struct {tsym225846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype225852* Typ;
tident200021* Name;
tlineinfo195539 Info;
tsym225846* Owner;
NU32 Flags;
tnode225816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc225830 Loc;
tlib225834* Annex;
tnode225816* Constraint;
};
struct  tpasscontext286005  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  intset222056  {
NI Counter;
NI Max;
ttrunk222052* Head;
ttrunkseq222054* Data;
};
struct  tlinkedlist127028  {
tlistentry127022* Head;
tlistentry127022* Tail;
NI Counter;
};
struct  tidpair225860  {
tidobj200015* Key;
TNimObject* Val;
};
struct  tidtable225864  {
NI Counter;
tidpairseq225862* Data;
};
typedef N_NIMCALL_PTR(tnode225816*, TY290064) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290069) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290077) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290085) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290090) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290098) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290103) (tcontext290021* c, tnode225816* n, tnode225816* norig, NU32 filter);
typedef N_NIMCALL_PTR(ttype225852*, TY290110) (tcontext290021* c, tnode225816* n, ttype225852* prev);
typedef struct {
N_NIMCALL_PTR(tnode225816*, ClPrc) (tcontext290021* c, tidtable225864 pt, tnode225816* n, void* ClEnv);
void* ClEnv;
} TY290116;
typedef struct {
N_NIMCALL_PTR(tsym225846*, ClPrc) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info, void* ClEnv);
void* ClEnv;
} TY290122;
struct  tinstantiationpair290013  {
tsym225846* Genericsym;
tinstantiation225836* Inst;
};
typedef N_NIMCALL_PTR(tsym225846*, TY290138) (tcontext290021* c, tsym225846* dc, ttype225852* t, tlineinfo195539 info);
struct  tcontext290021  {
  tpasscontext286005 Sup;
tsym225846* Module;
tscope225840* Currentscope;
tscope225840* Importtable;
tscope225840* Toplevelscope;
tproccon290011* P;
tsymseq225818* Friendmodules;
NI Instcounter;
intset222056 Ambiguoussymbols;
NI Intypeclass;
NI Ingenericcontext;
NI Inunrolledcontext;
NI Incompilescontext;
NI Ingenericinst;
tsymseq225818* Converters;
tsymseq225818* Patterns;
tlinkedlist127028 Optionstack;
tidtable225864 Symmapping;
tlinkedlist127028 Libs;
TY290064 Semconstexpr;
TY290069 Semexpr;
TY290077 Semtryexpr;
TY290085 Semtryconstexpr;
TY290090 Semoperand;
TY290098 Semconstboolexpr;
TY290103 Semoverloadedcall;
TY290110 Semtypenode;
TY290116 Seminferredlambda;
TY290122 Semgenerateinstance;
intset222056 Includedfiles;
tstrtable225820 Userpragmas;
tctx289048* Evalcontext;
intset222056 Unknownidents;
TY290133* Generics;
NI Lastgenericidx;
NI Hloloopdetector;
NI Inparallelstmt;
TY290138 Instdeepcopy;
};
struct  tnode225816  {
ttype225852* Typ;
tlineinfo195539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym225846* Sym;
} S4;
struct {tident200021* Ident;
} S5;
struct {tnodeseq225810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tproccon290011  {
tsym225846* Owner;
tsym225846* Resultsym;
NI Nestedloopcounter;
NI Nestedblockcounter;
NI Intrystmt;
tproccon290011* Next;
};
struct  tident200021  {
  tidobj200015 Sup;
NimStringDesc* S;
tident200021* Next;
NI H;
};
typedef NU8 TY517462[20];
typedef tnode225816* TY496019[2];
typedef ttype225852* TY496024[2];
struct  tidentiter235141  {
NI H;
tident200021* Name;
};
struct  toverloaditer295491  {
tidentiter235141 It;
tsym225846* M;
NU8 Mode;
NI Symchoiceindex;
tscope225840* Scope;
intset222056 Insymchoice;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
typedef NimStringDesc* TY169969[2];
struct  tcandidate405209  {
tcontext290021* C;
NI Exactmatches;
NI Genericmatches;
NI Subtypematches;
NI Intconvmatches;
NI Convmatches;
NU8 State;
ttype225852* Callee;
tsym225846* Calleesym;
NI Calleescope;
tnode225816* Call;
tidtable225864 Bindings;
NIM_BOOL Basetypematch;
NIM_BOOL Proxymatch;
NIM_BOOL Genericconverter;
NIM_BOOL Coercedistincts;
NIM_BOOL Typedescmatched;
NI Inheritancepenalty;
tsymseq225818* Errors;
};
struct  trepltypevars317786  {
tcontext290021* C;
tidtable225864 Typemap;
tidtable225864 Symmap;
tidtable225864 Localcache;
tlineinfo195539 Info;
NIM_BOOL Allowmetatypes;
};
struct  tinstantiation225836  {
tsym225846* Sym;
ttypeseq225848* Concretetypes;
TY225936* Usedby;
};
typedef NU8 tspecialwords204012[32];
typedef ttype225852* TY290919[2];
typedef tnode225816* TY537311[3];
struct  tscope225840  {
NI Depthlevel;
tstrtable225820 Symbols;
tnodeseq225810* Usingsyms;
tscope225840* Parent;
};
typedef ttype225852* TY411748[1];
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  toptionentry290005  {
  tlistentry127022 Sup;
NU32 Options;
NU8 Defaultcc;
tlib225834* Dynlib;
NU64 Notes;
tnode225816* Otherpragmas;
};
struct  TY501454  {
NI HEX3Astate;
NimStringDesc* Paramname500297;
tnode225816* Genericparams500295;
tlineinfo195539 Info500298;
tcontext290021* C500293;
};
typedef struct {
N_NIMCALL_PTR(ttype225852*, ClPrc) (ttype225852* typeclass, tident200021* typid, void* ClEnv);
void* ClEnv;
} TY500319;
typedef N_CLOSURE_PTR(ttype225852*, TMP3027) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3028) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3029) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3030) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3031) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3032) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3033) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3034) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3036) (ttype225852* typeclass, tident200021* typid);
typedef N_CLOSURE_PTR(ttype225852*, TMP3037) (ttype225852* typeclass, tident200021* typid);
struct  templctx504840  {
tcontext290021* C;
intset222056 Tobind;
intset222056 Tomixin;
intset222056 Toinject;
tsym225846* Owner;
};
typedef tsym225846* TY516716[2];
typedef tnode225816* TY291287[2];
struct  slice84173  {
NI A;
NI B;
};
typedef tnode225816* TY228474[7];
typedef tnode225816* TY246892[1];
typedef NU8 TY532622[33];
typedef NimStringDesc* TY530545[2];
struct  ttabiter235119  {
NI H;
};
typedef NimStringDesc* TY208063[3];
typedef NimStringDesc* TY197301[1];
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (Exception* e, void* ClEnv);
void* ClEnv;
} TY14809;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY14809 raiseAction;
};
typedef N_CLOSURE_PTR(tsym225846*, TMP3280) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info);
struct TY516908 {
tnode225816* Field0;
tnode225816* Field1;
};
struct  tfieldinstctx520871  {
ttype225852* Tupletype;
NI Tupleindex;
tsym225846* Field;
NIM_BOOL Replacebyfieldname;
};
struct  tfieldsctx521169  {
tcontext290021* C;
NU16 M;
};
typedef N_NIMCALL_PTR(tnode225816*, TY286069) (tsym225846* m, NI32 fileidx);
typedef N_CLOSURE_PTR(tnode225816*, TMP3341) (tcontext290021* c, tidtable225864 pt, tnode225816* n, void* ClEnv);
typedef N_CLOSURE_PTR(tsym225846*, TMP3342) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info, void* ClEnv);
struct  tiipair235270  {
NI Key;
NI Val;
};
struct  tiitable235274  {
NI Counter;
tiipairseq235272* Data;
};
struct  tindex276028  {
NI Lastidxkey;
NI Lastidxval;
tiitable235274 Tab;
NimStringDesc* R;
NI Offset;
};
struct  memfile274208  {
void* Mem;
NI Size;
int Handle;
};
struct  trodreader276030  {
  TNimObject Sup;
NI Pos;
NCSTRING S;
NU32 Options;
NU8 Reason;
TY225936* Moddeps;
TY225936* Files;
NI Dataidx;
NI Convertersidx;
NI Initidx;
NI Interfidx;
NI Compilerprocsidx;
NI Methodsidx;
NimStringDesc* Filename;
tindex276028 Index;
tindex276028 Imports;
NI Readerindex;
NI Line;
NI Moduleid;
tidtable225864 Syms;
memfile274208 Memfile;
tsymseq225818* Methods;
NimStringDesc* Origfile;
NIM_BOOL Inviewmode;
};
struct  trope177009  {
  TNimObject Sup;
trope177009* Left;
trope177009* Right;
NI Length;
NimStringDesc* Data;
};
typedef NI TY26420[16];
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tlib225834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope177009* Name;
tnode225816* Path;
};
struct  ttrunk222052  {
ttrunk222052* Next;
NI Key;
TY26420 Bits;
};
struct  vmargs289042  {
NI Ra;
NI Rb;
NI Rc;
void* Slots;
tnode225816* Currentexception;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (vmargs289042* args, void* ClEnv);
void* ClEnv;
} vmcallback289044;
struct TY289270 {
NimStringDesc* Field0;
vmcallback289044 Field1;
};
struct  tctx289048  {
  tpasscontext286005 Sup;
TY289250* Code;
TY196414* Debug;
tnode225816* Globals;
tnode225816* Constants;
ttypeseq225848* Types;
tnode225816* Currentexceptiona;
tnode225816* Currentexceptionb;
NI Exceptioninstr;
pprocHEX3Aobjecttype289230* Prc;
tsym225846* Module;
tnode225816* Callsite;
NU8 Mode;
NU8 Features;
NIM_BOOL Traceactive;
NI Loopiterations;
tlineinfo195539 Comesfromheuristic;
TY289269* Callbacks;
NimStringDesc* Errorflag;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct  tblock289030  {
tsym225846* Label;
TY289211* Fixups;
};
struct TY289237 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY289237 TY289234[256];
struct  pprocHEX3Aobjecttype289230  {
TY289231* Blocks;
tsym225846* Sym;
TY289234 Slots;
NI Maxslots;
};
struct ttypeseq225848 {
  TGenericSeq Sup;
  ttype225852* data[SEQ_DECL_SIZE];
};
struct TY225947 {
  TGenericSeq Sup;
  tinstantiation225836* data[SEQ_DECL_SIZE];
};
struct tsymseq225818 {
  TGenericSeq Sup;
  tsym225846* data[SEQ_DECL_SIZE];
};
struct ttrunkseq222054 {
  TGenericSeq Sup;
  ttrunk222052* data[SEQ_DECL_SIZE];
};
struct tidpairseq225862 {
  TGenericSeq Sup;
  tidpair225860 data[SEQ_DECL_SIZE];
};
struct TY290133 {
  TGenericSeq Sup;
  tinstantiationpair290013 data[SEQ_DECL_SIZE];
};
struct tnodeseq225810 {
  TGenericSeq Sup;
  tnode225816* data[SEQ_DECL_SIZE];
};
struct TY225936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct tiipairseq235272 {
  TGenericSeq Sup;
  tiipair235270 data[SEQ_DECL_SIZE];
};
struct TY289250 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY196414 {
  TGenericSeq Sup;
  tlineinfo195539 data[SEQ_DECL_SIZE];
};
struct TY289269 {
  TGenericSeq Sup;
  TY289270 data[SEQ_DECL_SIZE];
};
struct TY289211 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY289231 {
  TGenericSeq Sup;
  tblock289030 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(tident200021*, getident_200472)(NimStringDesc* identifier);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size);
N_NIMCALL(tnode225816*, newidentnode_226125)(tident200021* ident, tlineinfo195539 info);
N_NIMCALL(tlineinfo195539, unknownlineinfo_196405)(void);
N_NIMCALL(tcontext290021*, newcontext_290170)(tsym225846* module);
N_NIMCALL(void, internalerror_197987)(tlineinfo195539 info, NimStringDesc* errmsg);
N_NIMCALL(tnode225816*, semconstexpr_488503)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semexprwithtype_487211)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semexpr_487201)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(void, suggestexpr_421008)(tcontext290021* c, tnode225816* node);
N_NIMCALL(tsym225846*, lookup_296004)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, semcapturesym_429685)(tsym225846* s, tsym225846* owner);
N_NIMCALL(tnode225816*, semsym_528849)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags);
N_NIMCALL(void, markused_405251)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(ttype225852*, skiptypes_230245)(ttype225852* t, NU64 kinds);
static N_INLINE(tnode225816*, inlineconst_528841)(tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, copytree_226329)(tnode225816* src);
N_NIMCALL(tnode225816*, newsymnode_227755)(tsym225846* sym, tlineinfo195539 info);
static N_INLINE(NI, len_226364)(tnode225816* n);
N_NIMCALL(tnode225816*, semmacroexpr_488066)(tcontext290021* c, tnode225816* n, tnode225816* norig, tsym225846* sym, NU16 flags);
N_NIMCALL(void, pushinfocontext_196930)(tlineinfo195539 info);
N_NIMCALL(void, globalerror_197934)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(tnode225816*, evalmacrocall_477329)(tsym225846* module, tnode225816* n, tnode225816* norig, tsym225846* sym);
N_NIMCALL(tnode225816*, semaftermacrocall_494770)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags);
N_NIMCALL(tsym225846*, getmodule_235243)(tsym225846* s);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(tnode225816*, semstmt_487277)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semexprnotype_487221)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, discardcheck_517617)(tcontext290021* c, tnode225816* result);
N_NIMCALL(void, message_197976)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NIM_BOOL, implicitlydiscardable_517457)(tnode225816* n_517459);
static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n);
static N_INLINE(NI, sonslen_226249)(tnode225816* n);
N_NIMCALL(NIM_BOOL, iscallexpr_226335)(tnode225816* n);
N_NIMCALL(void, fixniltype_517549)(tnode225816* n);
static N_INLINE(NIM_BOOL, isatom_232962)(tnode225816* n);
N_NIMCALL(void, localerror_197955)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, typetostring_263031)(ttype225852* typ, NU8 prefer);
N_NIMCALL(ttype225852*, semtypenode_487269)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(void, checksonslen_291416)(tnode225816* n, NI length);
N_NIMCALL(ttype225852*, neworprevtype_495130)(NU8 kind, ttype225852* prev, tcontext290021* c);
N_NIMCALL(ttype225852*, newtypes_290214)(NU8 kind, tcontext290021* c);
static N_INLINE(NIM_BOOL, isrange_262216)(tnode225816* n);
static N_INLINE(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i);
N_NIMCALL(ttype225852*, semrangeaux_495954)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(tnode225816*, newnodei_226138)(NU8 kind, tlineinfo195539 info);
static N_INLINE(ttype225852*, skipintlit_282531)(ttype225852* t);
N_NIMCALL(ttype225852*, getsystype_282030)(NU8 kind);
N_NIMCALL(NIM_BOOL, sametype_268351)(ttype225852* a, ttype225852* b, NU8 flags);
N_NIMCALL(NIM_BOOL, isordinaltype_263092)(ttype225852* t);
N_NIMCALL(NIM_BOOL, enumhasholes_263098)(ttype225852* t);
N_NIMCALL(NIM_BOOL, hasgenericarguments_318243)(tnode225816* n);
N_NIMCALL(void, addson_226287)(tnode225816* father, tnode225816* son);
N_NIMCALL(tnode225816*, makestaticexpr_290836)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NU8, weaklevalue_235624)(tnode225816* a, tnode225816* b);
N_NIMCALL(void, addsonskipintlit_282572)(ttype225852* father, ttype225852* son);
N_NIMCALL(ttype225852*, semtypeexpr_502786)(tcontext290021* c, tnode225816* n_502789);
N_NIMCALL(ttype225852*, base_263038)(ttype225852* t);
N_NIMCALL(NimStringDesc*, rendertree_250058)(tnode225816* n, NU8 renderflags);
N_NIMCALL(tident200021*, considerquotedident_295010)(tnode225816* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(ttype225852*, makeandtype_290897)(tcontext290021* c, ttype225852* t1, ttype225852* t2);
N_NIMCALL(ttype225852*, makeortype_291016)(tcontext290021* c, ttype225852* t1, ttype225852* t2);
static N_INLINE(ttype225852*, freshtype_502805)(ttype225852* res, ttype225852* prev);
N_NIMCALL(ttype225852*, copytype_226195)(ttype225852* t, tsym225846* owner, NIM_BOOL keepid);
N_NIMCALL(ttype225852*, makenottype_291135)(tcontext290021* c, ttype225852* t1);
N_NIMCALL(ttype225852*, semanyref_495786)(tcontext290021* c, tnode225816* n_495789, NU8 kind, ttype225852* prev);
N_NIMCALL(ttype225852*, newconstraint_495165)(tcontext290021* c, NU8 k);
N_NIMCALL(void, checkminsonslen_291426)(tnode225816* n, NI length);
N_NIMCALL(tnode225816*, semwhen_488040)(tcontext290021* c, tnode225816* n, NIM_BOOL semcheck);
N_NIMCALL(void, illformedast_291406)(tnode225816* n);
N_NIMCALL(void, idsynchronizationpoint_224458)(NI idrange);
N_NIMCALL(tsym225846*, semtypeident_496731)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, qualifiedlookup_296122)(tcontext290021* c, tnode225816* n, NU8 flags);
N_NIMCALL(tsym225846*, errorsym_295412)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, copysym_226203)(tsym225846* s, NIM_BOOL keepid);
N_NIMCALL(NI, len_230005)(ttype225852* n);
N_NIMCALL(tsym225846*, initoverloaditer_296665)(toverloaditer295491* o, tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, nextoverloaditer_297032)(toverloaditer295491* o, tcontext290021* c, tnode225816* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(ttype225852*, semarray_496411)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, makerangewithstaticexpr_291247)(tcontext290021* c, tnode225816* n);
N_NIMCALL(ttype225852*, makerangetype_291351)(tcontext290021* c, NI64 first, NI64 last, tlineinfo195539 info, ttype225852* inttype);
N_NIMCALL(void, internalerror_198006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_198126)(TY84745 x_198130);
static N_INLINE(ttype225852*, lastson_226267)(ttype225852* n);
static N_INLINE(NI, sonslen_226255)(ttype225852* n);
N_NIMCALL(ttype225852*, semcontainer_495708)(tcontext290021* c, tnode225816* n, NU8 kind, NimStringDesc* kindstr, ttype225852* prev);
N_NIMCALL(ttype225852*, errortype_291319)(tcontext290021* c);
N_NIMCALL(ttype225852*, semrange_496094)(tcontext290021* c, tnode225816* n_496097, ttype225852* prev);
N_NIMCALL(ttype225852*, semset_495665)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(NI64, lengthord_263016)(ttype225852* t);
N_NIMCALL(ttype225852*, semordinal_496684)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, semvarargs_495734)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, maketypedesc_290763)(tcontext290021* c, ttype225852* typ);
N_NIMCALL(tsym225846*, getcurrowner_290256)(void);
N_NIMCALL(void, rawaddson_230562)(ttype225852* father, ttype225852* son);
N_NIMCALL(ttype225852*, semgeneric_502548)(tcontext290021* c, tnode225816* n, tsym225846* s, ttype225852* prev);
N_NIMCALL(void, localerror_197966)(tlineinfo195539 info, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, nsuToLowerStr)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI first);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_80907, TNimType* typ);
N_NIMCALL(ttype225852*, semgenericparamininvokation_502540)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, newcandidate_405637)(tcontext290021* ctx, ttype225852* callee, tcandidate405209* Result);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, matches_414382)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, describeargs_406200)(tcontext290021* c, tnode225816* n, NI startidx, NU8 prefer);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NIM_BOOL, containsgenerictype_272929)(ttype225852* t);
N_NIMCALL(ttype225852*, instgenericcontainer_490657)(tcontext290021* c, tlineinfo195539 info, ttype225852* header, NIM_BOOL allowmetatypes);
N_NIMCALL(void, initidtable_226167)(tidtable225864* x);
N_NIMCALL(ttype225852*, replacetypevarst_317834)(trepltypevars317786* cl, ttype225852* t);
N_NIMCALL(NIM_BOOL, ismetatype_226752)(ttype225852* t);
N_NIMCALL(void, initintset_222950)(intset222056* Result);
N_NIMCALL(tnode225816*, semgenericstmt_495120)(tcontext290021* c, tnode225816* n, NU8 flags_495124, intset222056* ctx);
N_NIMCALL(void, suggeststmt_421299)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, lookup_511404)(tcontext290021* c, tnode225816* n, NU8 flags, intset222056* ctx);
N_NIMCALL(tsym225846*, skipalias_295255)(tsym225846* s, tnode225816* n);
N_NIMCALL(tsym225846*, searchinscopes_295312)(tcontext290021* c, tident200021* s);
N_NIMCALL(NIM_BOOL, contains_222837)(intset222056 s, NI key);
N_NIMCALL(tnode225816*, symchoice_504476)(tcontext290021* c, tnode225816* n, tsym225846* s, NU8 r);
N_NIMCALL(tnode225816*, newnodeit_226145)(NU8 kind, tlineinfo195539 info, ttype225852* typ);
N_NIMCALL(tnode225816*, semgenericstmtsymbol_510258)(tcontext290021* c, tnode225816* n, tsym225846* s, intset222056* ctx);
N_NIMCALL(tnode225816*, semtemplateexpr_488055)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags);
N_NIMCALL(tnode225816*, evaltemplate_455334)(tnode225816* n, tsym225846* tmpl, tsym225846* gensymowner);
N_NIMCALL(void, popinfocontext_196957)(void);
N_NIMCALL(tnode225816*, newsymnodetypedesc_307153)(tsym225846* s, tlineinfo195539 info);
N_NIMCALL(tnode225816*, fuzzylookup_511482)(tcontext290021* c, tnode225816* n_511485, NU8 flags, intset222056* ctx, NIM_BOOL* ismacro);
N_NIMCALL(tnode225816*, newdot_511460)(tnode225816* n, tnode225816* b);
N_NIMCALL(void, add_226498)(tnode225816* father, tnode225816* son);
N_NIMCALL(tnode225816*, semmixinstmt_504740)(tcontext290021* c, tnode225816* n, intset222056* tomixin);
N_NIMCALL(void, incl_222869)(intset222056* s, NI key);
N_NIMCALL(tnode225816*, semgenericstmtscope_510240)(tcontext290021* c, tnode225816* n, NU8 flags, intset222056* ctx);
N_NIMCALL(tscope225840*, openscope_295191)(tcontext290021* c);
N_NIMCALL(void, closescope_295211)(tcontext290021* c);
N_NIMCALL(void, addtempdecl_511737)(tcontext290021* c, tnode225816* n, NU8 kind);
N_NIMCALL(tsym225846*, newsyms_487918)(NU8 kind, tnode225816* n, tcontext290021* c);
N_NIMCALL(tsym225846*, newsym_226074)(NU8 symkind, tident200021* name, tsym225846* owner, tlineinfo195539 info);
N_NIMCALL(tnode225816*, getidentnode_510205)(tnode225816* n);
N_NIMCALL(void, addprelimdecl_295704)(tcontext290021* c, tsym225846* sym);
N_NIMCALL(void, adddecl_295694)(tcontext290021* c, tsym225846* sym);
N_NIMCALL(tnode225816*, getbody_279270)(tsym225846* s);
N_NIMCALL(ttype225852*, maketypefromexpr_290812)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, assigntype_226210)(ttype225852* dest, ttype225852* src);
N_NIMCALL(ttype225852*, semobjectnode_499888)(tcontext290021* c, tnode225816* n, ttype225852* prev);
static N_INLINE(ttype225852*, skipgenericinvokation_499863)(ttype225852* t);
N_NIMCALL(void, addinheritedfields_499834)(tcontext290021* c, intset222056* check, NI* pos, ttype225852* obj);
N_NIMCALL(void, addinheritedfieldsaux_499662)(tcontext290021* c, intset222056* check, NI* pos, tnode225816* n);
N_NIMCALL(void, semrecordnodeaux_498537)(tcontext290021* c, tnode225816* n, intset222056* check, NI* pos, tnode225816* father, ttype225852* rectype);
N_NIMCALL(tnode225816*, semconstboolexpr_495064)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, fitnode_487245)(tcontext290021* c, ttype225852* formal, tnode225816* arg);
N_NIMCALL(tnode225816*, copynode_226323)(tnode225816* src);
N_NIMCALL(tnode225816*, indextypesmatch_487348)(tcontext290021* c, ttype225852* f, ttype225852* a, tnode225816* arg);
N_NIMCALL(void, initcandidate_405270)(tcontext290021* ctx, tcandidate405209* c, ttype225852* callee);
N_NIMCALL(tnode225816*, paramtypesmatch_412263)(tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg, tnode225816* argorig);
N_NIMCALL(void, instgenericconvertersarg_493289)(tcontext290021* c, tnode225816* a, tcandidate405209* x);
N_NIMCALL(NIM_BOOL, isgenericroutine_232649)(tsym225846* s);
N_NIMCALL(tsym225846*, generateinstance_490802)(tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info);
N_NIMCALL(void, pushowner_290261)(tsym225846* owner);
N_NIMCALL(tnode225816*, newsymnode_226132)(tsym225846* sym);
N_NIMCALL(tinstantiation225836*, new_490941)(void);
N_NIMCALL(void, instantiategenericparamlist_489543)(tcontext290021* c, tnode225816* n, tidtable225864 pt, tinstantiation225836* entry);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(TNimObject*, idtableget_235182)(tidtable225864 t, tidobj200015* key);
N_NIMCALL(ttype225852*, generatetypeinstance_320503)(tcontext290021* p, tidtable225864 pt, tlineinfo195539 info, ttype225852* t);
static N_INLINE(void, pushproccon_290381)(tcontext290021* c, tsym225846* owner);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_51025)(tcell44935* c);
static N_INLINE(NIM_BOOL, canbecycleroot_48667)(tcell44935* c);
static N_INLINE(void, rtladdcycleroot_49429)(tcell44935* c);
N_NOINLINE(void, incl_45671)(tcellset44947* s, tcell44935* cell);
static N_INLINE(void, decref_50604)(tcell44935* c);
N_NIMCALL(void, instantiateproctype_490682)(tcontext290021* c, tidtable225864 pt, tsym225846* prc, tlineinfo195539 info);
N_NIMCALL(void, inittypevars_320474)(tcontext290021* p, tidtable225864 pt, tlineinfo195539 info, trepltypevars317786* Result);
N_NIMCALL(ttype225852*, instcopytype_319238)(trepltypevars317786* cl, ttype225852* t);
N_NIMCALL(tnode225816*, shallowcopy_231347)(tnode225816* src);
N_NIMCALL(void, propagatetoowner_230318)(ttype225852* owner, ttype225852* elem);
N_NIMCALL(tnode225816*, replacetypevarsn_317812)(trepltypevars317786* cl, tnode225816* n_317816);
N_NIMCALL(void, erasevoidparams_319784)(ttype225852* t);
N_NIMCALL(void, skipintliteralparams_319999)(ttype225852* t);
N_NIMCALL(void, maybeaddresult_487301)(tcontext290021* c, tsym225846* s, tnode225816* n);
N_NIMCALL(void, addresult_524075)(tcontext290021* c, ttype225852* t, tlineinfo195539 info, NU8 owner);
N_NIMCALL(void, addparamorresult_490371)(tcontext290021* c, tsym225846* param, NU8 kind);
N_NIMCALL(ttype225852*, findenforcedstatictype_500109)(ttype225852* t_500111);
N_NIMCALL(tsym225846*, getsyssym_282054)(NimStringDesc* name);
N_NIMCALL(void, addresultnode_524118)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, genericcacheget_489785)(tsym225846* genericsym, tinstantiation225836 entry);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_229338)(TY225947* x_229344, TY225947* y_229349);
N_NIMCALL(NIM_BOOL, sameinstantiation_489728)(tinstantiation225836 a, tinstantiation225836 b);
N_NIMCALL(NIM_BOOL, comparetypes_270571)(ttype225852* x, ttype225852* y, NU8 cmp, NU8 flags);
N_NIMCALL(void, safeadd_491032)(TY225947** x_491040, tinstantiation225836* y_491044);
N_NIMCALL(void, makeinstpair_290148)(tsym225846* s, tinstantiation225836* inst, tinstantiationpair290013* Result);
N_NIMCALL(void, pragma_310079)(tcontext290021* c, tsym225846* sym, tnode225816* n, tspecialwords204012 validpragmas);
N_NIMCALL(void, instantiatebody_490449)(tcontext290021* c, tnode225816* n, tsym225846* result);
N_NIMCALL(void, freshgensyms_490201)(tnode225816* n, tsym225846* owner, tidtable225864* symmap);
N_NIMCALL(void, idtableput_235196)(tidtable225864* t, tidobj200015* key, TNimObject* val);
static N_INLINE(NI, safelen_226424)(tnode225816* n);
N_NIMCALL(tnode225816*, semprocbody_487238)(tcontext290021* c, tnode225816* n);
static N_INLINE(NIM_BOOL, isemptytype_232990)(ttype225852* t);
N_NIMCALL(tnode225816*, newnodei_228007)(NU8 kind, tlineinfo195539 info, NI children);
N_NIMCALL(tnode225816*, semasgn_537534)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, builtinfieldaccess_535726)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(NIM_BOOL, istypeexpr_535186)(tnode225816* n);
N_NIMCALL(tsym225846*, getsymfromlist_235228)(tnode225816* list, tident200021* ident, NI start);
N_NIMCALL(tnode225816*, readtypeparameter_535640)(tcontext290021* c, ttype225852* typ, tident200021* paramname, tlineinfo195539 info);
N_NIMCALL(ttype225852*, skipgenericalias_269619)(ttype225852* t);
N_NIMCALL(tsym225846*, linkto_226825)(tsym225846* s, ttype225852* t);
N_NIMCALL(ttype225852*, newtypewithsons_290823)(tcontext290021* c, NU8 kind, ttypeseq225848* sons);
N_NIMCALL(tsym225846*, lookupinrecordandbuildcheck_535216)(tcontext290021* c, tnode225816* n, tnode225816* r, tident200021* field, tnode225816** check);
static N_INLINE(NIM_BOOL, fieldvisible_414842)(tcontext290021* c, tsym225846* f);
N_NIMCALL(tnode225816*, makederef_535594)(tnode225816* n);
N_NIMCALL(tnode225816*, propertywriteaccess_537285)(tcontext290021* c, tnode225816* n, tnode225816* norig, tnode225816* a);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(tnode225816*, newnode_228207)(NU8 kind, tlineinfo195539 info, tnodeseq225810* sons, ttype225852* typ);
N_NIMCALL(tnode225816*, semoverloadedcallanalyseeffects_534248)(tcontext290021* c, tnode225816* n, tnode225816* norig, NU16 flags);
N_NIMCALL(tnode225816*, semoverloadedcall_494100)(tcontext290021* c, tnode225816* n, tnode225816* norig, NU32 filter);
N_NIMCALL(void, resolveoverloads_492017)(tcontext290021* c, tnode225816* n, tnode225816* orig, NU32 filter, tcandidate405209* Result);
N_NIMCALL(void, gatherusedsyms_491875)(tcontext290021* c, tnodeseq225810** usedsyms);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_315667)(tnodeseq225810* x_315673, tnodeseq225810* y_315678);
N_NIMCALL(void, safeadd_491915)(tnodeseq225810** x_491923, tnode225816* y_491927);
N_NIMCALL(void, insert_492119)(tnodeseq225810** x_492127, tnode225816* item_492131, NI i_492133);
N_NIMCALL(void, pickbestcandidate_491331)(tcontext290021* c, tnode225816* headsymbol, tnode225816* n, tnode225816* orig, tnode225816* initialbinding, NU32 filter, tcandidate405209* best, tcandidate405209* alt, tsymseq225818** errors);
N_NIMCALL(NI, lastoverloadscope_297011)(toverloaditer295491* o);
N_NIMCALL(void, initcandidate_405295)(tcontext290021* ctx, tcandidate405209* c, tsym225846* callee, tnode225816* binding, NI calleescope);
N_NIMCALL(void, determinetype_491327)(tcontext290021* c, tsym225846* s);
N_NIMCALL(tnode225816*, semprocaux_525170)(tcontext290021* c, tnode225816* n, NU8 kind, tspecialwords204012 validpragmas, NU8 phase);
N_NIMCALL(tnode225816*, semprocannotation_524247)(tcontext290021* c, tnode225816* prc);
N_NIMCALL(tsym225846*, lookupmacro_524201)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, searchinscopes_295355)(tcontext290021* c, tident200021* s, NU32 filter);
N_NIMCALL(tnode225816*, copyexcept_524142)(tnode225816* n, NI i);
N_NIMCALL(tsym225846*, semidentdef_519665)(tcontext290021* c, tnode225816* n, NU8 kind);
static N_INLINE(NIM_BOOL, istoplevel_291437)(tcontext290021* c);
N_NIMCALL(tsym225846*, semidentwithpragma_487999)(tcontext290021* c, NU8 kind, tnode225816* n, NU32 allowed);
N_NIMCALL(tsym225846*, semidentvis_487990)(tcontext290021* c, NU8 kind, tnode225816* n, NU32 allowed);
N_NIMCALL(tsym225846*, newsymg_487930)(NU8 kind, tnode225816* n, tcontext290021* c);
static N_INLINE(void, suggestsym_420882)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, findusages_418417)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, finddefinition_418457)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, addtosourcemap_418598)(tsym225846* sym, tlineinfo195539 info);
N_NIMCALL(void, addinterfaceoverloadablesymat_295855)(tcontext290021* c, tscope225840* scope, tsym225846* sym);
N_NIMCALL(tnode225816*, semgenericparamlist_504001)(tcontext290021* c, tnode225816* n, ttype225852* father);
N_NIMCALL(ttype225852*, semgenericconstraints_503975)(tcontext290021* c, ttype225852* x);
N_NIMCALL(void, semparamlist_487284)(tcontext290021* c, tnode225816* n, tnode225816* genericparams, tsym225846* s);
N_NIMCALL(ttype225852*, semproctypenode_501546)(tcontext290021* c, tnode225816* n, tnode225816* genericparams, ttype225852* prev, NU8 kind, NIM_BOOL istype);
N_NIMCALL(toptionentry290005*, lastoptionentry_290176)(tcontext290021* c);
N_NIMCALL(ttype225852*, semparamtype_501513)(tcontext290021* c, tnode225816* n, tnode225816** constraint);
N_NIMCALL(tnode225816*, semnodekindconstraints_321527)(tnode225816* p);
N_NIMCALL(ttype225852*, liftparamtype_500291)(tcontext290021* c, NU8 prockind, tnode225816* genericparams, ttype225852* paramtype, NimStringDesc* paramname, tlineinfo195539 info, NIM_BOOL anon);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP3025)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_CLOSURE(ttype225852*, addimplicitgenericimpl_500318)(ttype225852* typeclass, tident200021* typid, void* ClEnv);
N_NIMCALL(NIM_BOOL, containsorincl_222916)(intset222056* s, NI key);
N_NIMCALL(NIM_BOOL, isinlineiterator_411610)(ttype225852* t);
N_NIMCALL(tnode225816*, sempattern_506110)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, flattenstmts_262416)(tnode225816* n);
N_NIMCALL(tnode225816*, sempatternbody_508926)(templctx504840* c, tnode225816* n);
N_NIMCALL(tnode225816*, handlesym_509201)(templctx504840* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, newparam_508940)(templctx504840* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, sembindstmt_504600)(tcontext290021* c, tnode225816* n, intset222056* tobind);
N_NIMCALL(tnode225816*, expectparam_509273)(templctx504840* c, tnode225816* n);
N_NIMCALL(tsym225846*, searchforproc_309414)(tcontext290021* c, tscope225840* scope, tsym225846* fn);
N_NIMCALL(void, addinterfacedeclat_295779)(tcontext290021* c, tscope225840* scope, tsym225846* sym);
N_NIMCALL(void, implicitpragmas_315398)(tcontext290021* c, tsym225846* sym, tnode225816* n, tspecialwords204012 validpragmas);
N_NIMCALL(void, wrongredefinition_295675)(tlineinfo195539 info, NimStringDesc* s);
N_NIMCALL(void, addgenericparamlisttoscope_522747)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, addparams_487293)(tcontext290021* c, tnode225816* n, NU8 kind);
static N_INLINE(NIM_BOOL, importantcomments_169156)(void);
N_NIMCALL(void, popowner_290267)(void);
N_NIMCALL(void, semoverride_525035)(tcontext290021* c, tsym225846* s, tnode225816* n);
N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s);
N_NIMCALL(void, dodestructorstuff_515769)(tcontext290021* c, tsym225846* s, tnode225816* n);
N_NIMCALL(ttype225852*, instantiatedestructor_515765)(tcontext290021* c, ttype225852* typ);
static N_INLINE(NIM_BOOL, contains_516605)(tsym225846** a_516611, NI a_516611Len0, tsym225846* item_516614);
static N_INLINE(NI, find_516617)(tsym225846** a_516622, NI a_516622Len0, tsym225846* item_516624);
N_NIMCALL(tnode225816*, generatedestructor_516485)(tcontext290021* c, ttype225852* t);
N_NIMCALL(tnode225816*, destroyfieldorfields_515988)(tcontext290021* c, tnode225816* field, tnode225816* holder);
N_NIMCALL(tnode225816*, destroycase_516056)(tcontext290021* c, tnode225816* n, tnode225816* holder);
N_NIMCALL(tnodeseq225810*, HEX5BHEX5D_516155)(tnodeseq225810* s_516161, slice84173 x_516166);
static N_INLINE(slice84173, HEX2EHEX2E_92298)(NI a_92302, NI b_92304);
N_NIMCALL(tnode225816*, newnode_226090)(NU8 kind);
N_NIMCALL(tnode225816*, destroysym_515993)(tcontext290021* c, tsym225846* field, tnode225816* holder);
N_NIMCALL(tnode225816*, usesym_421001)(tsym225846* sym);
N_NIMCALL(tnode225816*, symnodefromtype_488122)(tcontext290021* c, ttype225852* t, tlineinfo195539 info);
N_NIMCALL(tsym225846*, symfromtype_488078)(ttype225852* t, tlineinfo195539 info);
N_NIMCALL(ttype225852*, makevartype_290207)(tcontext290021* c, ttype225852* basetype);
N_NIMCALL(tnode225816*, semproc_515723)(tcontext290021* c, tnode225816* n);
static N_INLINE(NIM_BOOL, experimentalmode_291447)(tcontext290021* c);
static N_INLINE(void, paramstypecheck_488015)(tcontext290021* c, ttype225852* typ);
N_NIMCALL(NIM_BOOL, typeallowed_263231)(ttype225852* t, NU8 kind);
N_NIMCALL(tnode225816*, hlobody_489479)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, hlo_488575)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, applypatterns_488746)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, applyrule_481563)(tcontext290021* c, tsym225846* s, tnode225816* n);
N_NIMCALL(tnode225816*, evalpattern_488579)(tcontext290021* c, tnode225816* n, tnode225816* orig);
N_NIMCALL(tnode225816*, semdirectop_488032)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, aftercallactions_535062)(tcontext290021* c, tnode225816* n, tnode225816* orig, NU16 flags);
N_NIMCALL(void, semfinishoperands_414292)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, activate_487327)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, fixabstracttype_531831)(tcontext290021* c, tnode225816* n);
N_NIMCALL(ttype225852*, arrayconstrtype_531546)(tcontext290021* c, tnode225816* n);
N_NIMCALL(ttype225852*, elemtype_263656)(ttype225852* t);
N_NIMCALL(void, changetype_487253)(tnode225816* n, ttype225852* newtype, NIM_BOOL check);
N_NIMCALL(NI64, firstord_263004)(ttype225852* t);
N_NIMCALL(NI64, lastord_263010)(ttype225852* t);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
N_NIMCALL(tnode225816*, semarrayconstr_531588)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(NI64, getordvalue_263187)(tnode225816* n);
N_NIMCALL(ttype225852*, commontype_487492)(ttype225852* x, ttype225852* y);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_273497)(ttypeseq225848* x_273503, ttypeseq225848* y_273508);
N_NIMCALL(ttype225852*, newtype_226083)(NU8 kind, tsym225846* owner);
N_NIMCALL(NIM_BOOL, isemptycontainer_487464)(ttype225852* t);
N_NIMCALL(ttype225852*, commonsuperclass_271084)(ttype225852* a, ttype225852* b);
N_NIMCALL(void, analyseifaddresstakenincall_532577)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NU8, isassignable_532184)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NU8, isassignable_322003)(tsym225846* owner, tnode225816* n);
N_NIMCALL(void, semprocvarcheck_515664)(tcontext290021* c, tnode225816* n_515667);
N_NIMCALL(tnode225816*, skipconv_273732)(tnode225816* n);
N_NIMCALL(void, performprocvarcheck_515600)(tcontext290021* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, analyseifaddresstaken_532237)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, newhiddenaddrtaken_532192)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, magicsafteroverloadresolution_533553)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semispartof_532962)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(NU8, ispartof_478430)(tnode225816* a, tnode225816* b);
N_NIMCALL(tnode225816*, newintnodet_304028)(NI64 intval, tnode225816* n);
N_NIMCALL(tnode225816*, semtypetraits_533104)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, evaltypetrait_533072)(tnode225816* trait, ttype225852* operand, tsym225846* context);
N_NIMCALL(tnode225816*, newstrnode_226118)(NU8 kind, NimStringDesc* strval);
N_NIMCALL(tnode225816*, newintnode_226096)(NU8 kind, NI64 intval);
N_NIMCALL(tnode225816*, newstrnodet_304042)(NimStringDesc* strval, tnode225816* n);
N_NIMCALL(tnode225816*, seminstantiationinfo_533003)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NI, expectintlit_532980)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tlineinfo195539, getinfocontext_196992)(NI index);
N_NIMCALL(NimStringDesc*, tofullpath_197037)(NI32 fileidx);
N_NIMCALL(NimStringDesc*, tofilename_197025)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_197073)(tlineinfo195539 info);
N_NIMCALL(tnode225816*, semord_533187)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semlowhigh_530538)(tcontext290021* c, tnode225816* n, NU16 m);
N_NIMCALL(tnode225816*, semshallowcopy_533548)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, sembindsym_533223)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, errornode_291329)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semlocals_533437)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, inittabiter_235124)(ttabiter235119* ti, tstrtable225820 tab);
static N_INLINE(tnode225816*, newderef_517404)(tnode225816* n);
N_NIMCALL(tsym225846*, nextiter_235132)(ttabiter235119* ti, tstrtable225820 tab);
N_NIMCALL(tnode225816*, evalatcompiletime_533591)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, getconstexpr_304004)(tsym225846* m, tnode225816* n);
N_NIMCALL(ttype225852*, getintervaltype_304464)(NU16 m, tnode225816* n);
N_NIMCALL(tnode225816*, evalstaticexpr_477237)(tsym225846* module, tnode225816* e, tsym225846* prc);
N_NIMCALL(tnode225816*, fixuptypeaftereval_488201)(tcontext290021* c, tnode225816* evaluated, tnode225816* eorig);
N_NIMCALL(void, annotatetype_482223)(tnode225816* n, ttype225852* t);
N_NIMCALL(tnode225816*, evalconstexpr_477226)(tsym225846* module, tnode225816* e);
N_NIMCALL(tnode225816*, commonoptimizations_440642)(tsym225846* c, tnode225816* n);
N_NIMCALL(tnode225816*, transformbody_441373)(tsym225846* module, tnode225816* n, tsym225846* prc);
static N_INLINE(void, popproccon_290426)(tcontext290021* c);
N_NIMCALL(void, fixupinstantiatedsymbols_490553)(tcontext290021* c, tsym225846* s);
N_NIMCALL(void, semborrow_524035)(tcontext290021* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tsym225846*, searchforborrowproc_494620)(tcontext290021* c, tscope225840* startscope, tsym225846* fn);
N_NIMCALL(ttype225852*, baseofdistinct_272939)(ttype225852* t);
N_NIMCALL(void, sideeffectscheck_490615)(tcontext290021* c, tsym225846* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_491401)(tsymseq225818* x_491407, tsymseq225818* y_491412);
N_NIMCALL(void, safeadd_491544)(tsymseq225818** x_491552, tsym225846* y_491556);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NI, cmpcandidates_406039)(tcandidate405209* a, tcandidate405209* b);
N_NIMCALL(void, delete_492248)(tnodeseq225810** x_492256, NI i_492260);
N_NIMCALL(tnode225816*, withinfo_227695)(tnode225816* n, tlineinfo195539 info);
N_NIMCALL(void, HEX5BHEX5DHEX3D_492447)(tnodeseq225810** s_492455, slice84173 x_492461, tnode225816** b_492466, NI b_492466Len0);
static N_INLINE(NimStringDesc*, HEX5BHEX5D_84166)(NimStringDesc* s, slice84173 x);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_74828, NI last);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(void, notfounderror_491727)(tcontext290021* c, tnode225816* n_491730, tsymseq225818* errors);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, msgkindtostring_197378)(NU16 kind);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, getprocheader_263519)(tsym225846* sym, NU8 prefer);
N_NIMCALL(NIM_BOOL, samemethoddispatcher_491237)(tsym225846* a, tsym225846* b);
N_NIMCALL(tnode225816*, semresolvedcall_493735)(tcontext290021* c, tnode225816* n, tcandidate405209* x);
N_NIMCALL(void, instgenericconverterssons_493428)(tcontext290021* c, tnode225816* n, tcandidate405209* x);
N_NIMCALL(tnode225816*, dottransformation_536736)(tcontext290021* c, tnode225816* n);
static N_INLINE(NIM_BOOL, issymchoice_530121)(tnode225816* n);
N_NIMCALL(tnode225816*, semsubscript_536915)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semderef_536863)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, buildoverloadedsubscripts_536829)(tnode225816* n, tident200021* ident);
N_NIMCALL(NU8, cmptypes_411293)(tcontext290021* c, ttype225852* f, ttype225852* a);
N_NIMCALL(void, typemismatch_487357)(tnode225816* n, ttype225852* formal, ttype225852* actual);
static N_INLINE(void, asgntoresultvar_537428)(tcontext290021* c, tnode225816* n, tnode225816* le, tnode225816* ri);
N_NIMCALL(tnode225816*, takeimplicitaddr_537372)(tcontext290021* c, tnode225816* n);
N_NIMCALL(ttype225852*, makeptrtype_290200)(tcontext290021* c, ttype225852* basetype);
static N_INLINE(tsym225846*, pop_437736)(tsymseq225818** s_437744);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, finishmethod_487341)(tcontext290021* c, tsym225846* s);
N_NIMCALL(NIM_BOOL, hasobjparam_526844)(tsym225846* s);
N_NIMCALL(void, methoddef_422824)(tsym225846* s, NIM_BOOL fromcache);
N_NIMCALL(tnode225816*, forcebool_495036)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, assign_222975)(intset222056* dest, intset222056 src);
N_NIMCALL(void, semrecordcase_498547)(tcontext290021* c, tnode225816* n, intset222056* check, NI* pos, tnode225816* father, ttype225852* rectype);
N_NIMCALL(void, semcasebranch_498296)(tcontext290021* c, tnode225816* t, tnode225816* branch, NI branchindex, NI64* covered);
N_NIMCALL(tnode225816*, semcasebranchrange_498155)(tcontext290021* c, tnode225816* t, tnode225816* b, NI64* covered);
N_NIMCALL(tnode225816*, sembranchrange_498111)(tcontext290021* c, tnode225816* t, tnode225816* a, tnode225816* b, NI64* covered);
N_NIMCALL(tnode225816*, skipconvtaketype_273816)(tnode225816* n);
N_NIMCALL(NIM_BOOL, emptyrange_284034)(tnode225816* a, tnode225816* b);
N_NIMCALL(tnode225816*, semcasebranchsetelem_498194)(tcontext290021* c, tnode225816* t, tnode225816* b, NI64* covered);
N_NIMCALL(void, checkforoverlap_498004)(tcontext290021* c, tnode225816* t, NI currentex, NI branchindex);
N_NIMCALL(NIM_BOOL, overlap_284012)(tnode225816* a, tnode225816* b);
N_NIMCALL(void, delson_226294)(tnode225816* father, NI idx);
N_NIMCALL(trope177009*, torope_177076)(NimStringDesc* s);
N_NIMCALL(ttype225852*, semtuple_497228)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, semtypeclass_502824)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(void, safeadd_317709)(ttypeseq225848** x_317717, ttype225852* y_317721);
N_NIMCALL(ttype225852*, semvartype_495897)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, semdistinct_495930)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, semproctypewithscope_502905)(tcontext290021* c, tnode225816* n, ttype225852* prev, NU8 kind);
N_NIMCALL(void, seteffectsforproctype_383811)(ttype225852* t, tnode225816* n);
N_NIMCALL(NIM_BOOL, haspragma_315628)(tnode225816* n, NU8 pragma);
N_NIMCALL(ttype225852*, semenum_495173)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(void, strtableadd_235103)(tstrtable225820* t, tsym225846* n);
N_NIMCALL(ttype225852*, semstmtlisttype_502342)(tcontext290021* c, tnode225816* n, ttype225852* prev);
N_NIMCALL(ttype225852*, semblocktype_502437)(tcontext290021* c, tnode225816* n, ttype225852* prev);
static N_INLINE(void, markindirect_291366)(tcontext290021* c, tsym225846* s);
N_NIMCALL(void, setintlittype_282632)(tnode225816* result);
N_NIMCALL(ttype225852*, getfloatlittype_282521)(tnode225816* literal);
N_NIMCALL(tnode225816*, semfieldaccess_528617)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semconv_530168)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, maybelifttype_530141)(ttype225852** t, tcontext290021* c, tlineinfo195539 info);
N_NIMCALL(tnode225816*, inferwithmetatype_487450)(tcontext290021* c, ttype225852* formal, tnode225816* arg, NIM_BOOL coercedistincts);
N_NIMCALL(NU8, checkconvertible_529823)(tcontext290021* c, ttype225852* castdest, ttype225852* src);
N_NIMCALL(NU8, checkconversionbetweenobjects_529809)(ttype225852* castdest, ttype225852* src);
N_NIMCALL(NI, inheritancediff_270588)(ttype225852* a, ttype225852* b);
N_NIMCALL(tnode225816*, semobjconstr_534462)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(void, checkinitialized_541997)(tnode225816* n, intset222056 ids, tlineinfo195539 info);
N_NIMCALL(tnode225816*, semmagic_540264)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags);
N_NIMCALL(tnode225816*, semdefined_538896)(tcontext290021* c, tnode225816* n, NIM_BOOL onlycurrentscope);
N_NIMCALL(NIM_BOOL, isdefined_201046)(tident200021* symbol);
N_NIMCALL(NIM_BOOL, isdeclared_201056)(tident200021* symbol);
N_NIMCALL(tsym225846*, lookupfordefined_538759)(tcontext290021* c, tnode225816* n, NIM_BOOL onlycurrentscope);
N_NIMCALL(tsym225846*, lookupfordefined_538750)(tcontext290021* c, tident200021* i, NIM_BOOL onlycurrentscope);
N_NIMCALL(tsym225846*, localsearchinscope_295301)(tcontext290021* c, tident200021* s);
N_NIMCALL(tsym225846*, strtableget_235111)(tstrtable225820 t, tident200021* name);
N_NIMCALL(tnode225816*, setms_540228)(tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, semcompiles_540100)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, tryexpr_487317)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(NI, getinfocontextlen_196885)(void);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
static N_INLINE(Exception*, getCurrentException)(void);
static N_INLINE(void, popCurrentException)(void);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt);
N_NIMCALL(void, setinfocontextlen_196905)(NI l);
N_NIMCALL(tnode225816*, semsizeof_530646)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semis_531075)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, maketypesymnode_290798)(tcontext290021* c, ttype225852* typ, tlineinfo195539 info);
N_NIMCALL(tnode225816*, isopimpl_488048)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NU8, typerel_406436)(tcandidate405209* c, ttype225852* f, ttype225852* aorig, NIM_BOOL dobind);
N_NIMCALL(tnode225816*, semof_530683)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semexpandtoast_539529)(tcontext290021* c, tnode225816* n, tsym225846* magicsym, NU16 flags);
N_NIMCALL(tnode225816*, semexpandtoast_539286)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, expectmacroortemplatecall_488025)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semquoteast_487334)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NimStringDesc*, expectstring_539098)(tcontext290021* c, tnode225816* n_539101);
N_NIMCALL(tnodeseq225810*, newseq_539811)(NI len_539815);
N_NIMCALL(void, processquotations_539555)(tnode225816** n, NimStringDesc* op, tnodeseq225810** quotes, tnodeseq225810** ids);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s, NimStringDesc* prefix);
N_NIMCALL(tsym225846*, newanonsym_539148)(NU8 kind, tlineinfo195539 info, tsym225846* owner);
N_NIMCALL(tnode225816*, semtemplatedef_508258)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semtemplbodydirty_508030)(templctx504840* c, tnode225816* n);
N_NIMCALL(tnode225816*, semtemplbody_504998)(templctx504840* c, tnode225816* n);
N_NIMCALL(tnode225816*, semtemplsymbol_505411)(tcontext290021* c, tnode225816* n, tsym225846* s);
N_NIMCALL(void, openscope_505003)(templctx504840* c);
N_NIMCALL(void, closescope_505010)(templctx504840* c);
N_NIMCALL(tnode225816*, semtemplbodyscope_505017)(templctx504840* c, tnode225816* n);
N_NIMCALL(void, addlocaldecl_505311)(templctx504840* c, tnode225816** n, NU8 k);
N_NIMCALL(NU8, symbinding_504374)(tnode225816* n);
N_NIMCALL(NU8, whichkeyword_204382)(tident200021* id);
N_NIMCALL(tnode225816*, onlyreplaceparams_505026)(templctx504840* c, tnode225816* n);
N_NIMCALL(tnode225816*, getidentnode_504846)(templctx504840* c, tnode225816* n);
static N_INLINE(NIM_BOOL, istemplparam_504928)(templctx504840* c, tnode225816* n);
N_NIMCALL(void, replaceidentbysym_504801)(tnode225816** n, tnode225816* s);
N_NIMCALL(tsym225846*, newgensym_505269)(NU8 kind, tnode225816* n, templctx504840* c);
N_NIMCALL(void, semtemplsomedecl_505927)(templctx504840* c, tnode225816* n, NU8 symkind);
N_NIMCALL(tnode225816*, semroutineintemplbody_505660)(templctx504840* c, tnode225816* n, NU8 k);
N_NIMCALL(tnode225816*, semroutineintemplname_505462)(templctx504840* c, tnode225816* n);
N_NIMCALL(tnode225816*, transformtoexpr_508193)(tnode225816* n);
N_NIMCALL(void, symtabreplace_240615)(tstrtable225820* t, tsym225846* prevsym, tsym225846* newsym);
N_NIMCALL(tsym225846*, getmagicsym_539134)(NU16 magic);
N_NIMCALL(NU8, spawnresult_425994)(ttype225852* t, NIM_BOOL inparallel);
N_NIMCALL(ttype225852*, createflowvar_540143)(tcontext290021* c, ttype225852* t, tlineinfo195539 info);
N_NIMCALL(tsym225846*, getcompilerproc_282036)(NimStringDesc* name);
N_NIMCALL(tsym225846*, instantiatecreateflowvarcall_540152)(tcontext290021* c, ttype225852* t, tlineinfo195539 info);
N_NIMCALL(tnode225816*, semindirectop_534467)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(void, semopaux_531160)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, overloadedcallopr_531320)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, setgenericparams_543435)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semsymgenericinstantiation_528832)(tcontext290021* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, explicitgenericinstantiation_494205)(tcontext290021* c, tnode225816* n, tsym225846* s_494209);
N_NIMCALL(tnode225816*, explicitgenericsym_494127)(tcontext290021* c, tnode225816* n, tsym225846* s);
N_NIMCALL(tnode225816*, explicitgenericinsterror_494120)(tnode225816* n);
N_NIMCALL(tnode225816*, semarrayaccess_537259)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(NU8, checkpar_541305)(tnode225816* n);
N_NIMCALL(tnode225816*, semtuplepositionsconstr_541899)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semtuplefieldsconstr_541512)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semsetconstr_540633)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semlambda_487261)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semcast_530461)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NIM_BOOL, iscastable_530025)(ttype225852* dst, ttype225852* src);
N_NIMCALL(NI64, computesize_263193)(ttype225852* typ);
N_NIMCALL(tnode225816*, semif_517734)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semexprbranch_517411)(tcontext290021* c, tnode225816* n);
static N_INLINE(void, semdestructorcheck_517185)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semexprbranchscope_517447)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semtableconstr_541196)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semstaticexpr_534214)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semblock_542699)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semstmtlist_527505)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semtry_518853)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NIM_BOOL, usesresult_527404)(tnode225816* n);
N_NIMCALL(void, insertdestructors_516904)(tcontext290021* c, tnode225816* varsection, TY516908* Result);
N_NIMCALL(tnode225816*, semraise_522655)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semvarorlet_519897)(tcontext290021* c, tnode225816* n, NU8 symkind);
N_NIMCALL(void, newsons_226273)(tnode225816* father, NI length);
N_NIMCALL(void, addinterfacedecl_295845)(tcontext290021* c, tsym225846* sym);
N_NIMCALL(tsym225846*, findshadowedvar_519524)(tcontext290021* c, tsym225846* v);
N_NIMCALL(NIM_BOOL, identwithin_519594)(tnode225816* n, tident200021* s);
N_NIMCALL(void, checknilable_519804)(tsym225846* v);
N_NIMCALL(void, setupcompiletimevar_477260)(tsym225846* module, tnode225816* n);
N_NIMCALL(tnode225816*, semconst_520603)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, fitremovehiddenconv_519473)(tcontext290021* c, ttype225852* typ, tnode225816* n);
N_NIMCALL(tnode225816*, semtypesection_523891)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, typesectionleftsidepass_522829)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, typesectionrightsidepass_523003)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, processmagictype_503936)(tcontext290021* c, tsym225846* m);
N_NIMCALL(void, setmagictype_503928)(tsym225846* m, NU8 kind, NI size);
N_NIMCALL(ttype225852*, systypefromname_282261)(NimStringDesc* name);
N_NIMCALL(void, typesectionfinalpass_523544)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, checkconstructedtype_317152)(tlineinfo195539 info, ttype225852* typ);
N_NIMCALL(void, checkformetafields_523355)(tnode225816* n);
N_NIMCALL(tnode225816*, semdiscard_515111)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semwhile_515429)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, sembreakorcontinue_515184)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semfor_522290)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semexprnoderef_487228)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, semforvars_522004)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tsym225846*, symforvar_521803)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, addforvardecl_521765)(tcontext290021* c, tsym225846* v);
N_NIMCALL(tnode225816*, semforfields_521395)(tcontext290021* c, tnode225816* n, NU16 m);
N_NIMCALL(tnode225816*, instfieldloopbody_520876)(tfieldinstctx520871 c, tnode225816* n, tnode225816* forloop);
N_NIMCALL(void, semforobjectfields_521172)(tfieldsctx521169 c, tnode225816* typ, tnode225816* forloop, tnode225816* father);
N_NIMCALL(NIM_BOOL, hassonwith_226301)(tnode225816* n, NU8 kind);
N_NIMCALL(tnode225816*, implicititerator_522254)(tcontext290021* c, NimStringDesc* it, tnode225816* arg);
N_NIMCALL(tnode225816*, semcase_518201)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NI64, tocover_515547)(ttype225852* t);
N_NIMCALL(tnode225816*, semreturn_537903)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semusing_539158)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, adddeclat_295714)(tscope225840* scope, tsym225846* sym);
N_NIMCALL(tnode225816*, semasm_515406)(tcontext290021* con, tnode225816* n);
N_NIMCALL(NIM_CHAR, pragmaasm_310098)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semasmoremit_312632)(tcontext290021* con, tnode225816* n, NIM_CHAR marker);
N_NIMCALL(tnode225816*, semyield_538513)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, semyieldvarresult_538212)(tcontext290021* c, tnode225816* n, ttype225852* restype);
N_NIMCALL(tnode225816*, semiterator_526541)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semmethod_526896)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semconverterdef_526956)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, addconverter_290635)(tcontext290021* c, tsym225846* conv);
N_NIMCALL(tnode225816*, semmacrodef_527011)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, evalimport_298004)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, evalimportexcept_299211)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, evalfrom_298011)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, evalinclude_527089)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NI32, checkmodulename_298237)(tnode225816* n);
N_NIMCALL(void, excl_222884)(intset222056* s, NI key);
N_NIMCALL(tnode225816*, semexport_543058)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, sempragmablock_527200)(tcontext290021* c, tnode225816* n);
N_NIMCALL(NU8, whichpragma_262304)(tnode225816* n);
N_NIMCALL(void, setline_527142)(tnode225816* n, tlineinfo195539 info);
N_NIMCALL(tnode225816*, semstaticstmt_527330)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, evalstaticstmt_477249)(tsym225846* module, tnode225816* e, tsym225846* prc);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_197579)(tlineinfo195539 a, tlineinfo195539 b);
N_NIMCALL(tnode225816*, tryconstexpr_488423)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, semoperand_528624)(tcontext290021* c, tnode225816* n, NU16 flags);
N_NIMCALL(tnode225816*, seminferredlambda_524857)(tcontext290021* c, tidtable225864 pt, tnode225816* n_524861);
N_NIMCALL(tnode225816*, replacetypesinbody_320489)(tcontext290021* p, tidtable225864 pt, tnode225816* n);
N_NIMCALL(tsym225846*, instdeepcopy_414518)(tcontext290021* c, tsym225846* dc, ttype225852* t, tlineinfo195539 info);
N_NIMCALL(void, importallsymbols_298679)(tcontext290021* c, tsym225846* frommod);
N_NIMCALL(tpasscontext286005*, myopen_544456)(tsym225846* module);
N_NIMCALL(tnode225816*, semstmtandgenerategenerics_544539)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, addcodeforgenerics_544323)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, hlostmt_489511)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, buildechostmt_535137)(tcontext290021* c, tnode225816* n);
N_NIMCALL(tnode225816*, transformstmt_441607)(tsym225846* module, tnode225816* n);
N_NIMCALL(void, recovercontext_544582)(tcontext290021* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isobjslowpath_21825)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NIMCALL(void, rawclosescope_295202)(tcontext290021* c);
STRING_LITERAL(TMP953, "typedesc", 8);
STRING_LITERAL(TMP954, "destroy_", 8);
STRING_LITERAL(TMP955, "this_", 5);
STRING_LITERAL(TMP956, "destructor", 10);
STRING_LITERAL(TMP1979, "sem.myOpen", 10);
STRING_LITERAL(TMP2888, "", 0);
static NIM_CONST TY517462 TMP2889 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
0x00, 0x00, 0xE0, 0x11, 0x02, 0x0C, 0x01, 0xC0,
0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2890, "|", 1);
STRING_LITERAL(TMP2891, "invalid type", 12);
STRING_LITERAL(TMP2892, "region needs to be an object type", 33);
STRING_LITERAL(TMP2895, "compiler/semtypes.nim", 21);
NIM_CONST TY84745 TMP2894 = {((NimStringDesc*) &TMP2895),
231}
;
STRING_LITERAL(TMP2896, "openarray", 9);
STRING_LITERAL(TMP2897, "range", 5);
STRING_LITERAL(TMP2898, "set", 3);
STRING_LITERAL(TMP2899, "ordinal", 7);
STRING_LITERAL(TMP2900, "seq", 3);
STRING_LITERAL(TMP2901, "varargs", 7);
STRING_LITERAL(TMP2902, "cannot instantiate the \'$1\' $2", 30);
NIM_CONST TY84745 TMP2903 = {((NimStringDesc*) &TMP2895),
1006}
;
STRING_LITERAL(TMP2904, "cannot instantiate ", 19);
STRING_LITERAL(TMP2905, "\012got: (", 7);
STRING_LITERAL(TMP2909, ")\012but expected: (", 17);
STRING_LITERAL(TMP2910, ")", 1);
STRING_LITERAL(TMP2911, "result", 6);
NIM_CONST TY84745 TMP2912 = {((NimStringDesc*) &TMP2895),
1187}
;
STRING_LITERAL(TMP2913, "addInheritedFieldsAux", 21);
STRING_LITERAL(TMP2914, "addInheritedFieldsAux(record case branch)", 41);
STRING_LITERAL(TMP2915, "addInheritedFieldsAux()", 23);
STRING_LITERAL(TMP2916, "semObjectNode", 13);
STRING_LITERAL(TMP2917, "nesting too deep", 16);
STRING_LITERAL(TMP2919, "compiler/seminst.nim", 20);
NIM_CONST TY84745 TMP2918 = {((NimStringDesc*) &TMP2919),
214}
;
STRING_LITERAL(TMP2920, "instantiateGenericParamList; no generic params", 46);
STRING_LITERAL(TMP2921, "instantiateGenericParamList; no symbol", 38);
STRING_LITERAL(TMP2922, "owner is nil", 12);
STRING_LITERAL(TMP2923, "result", 6);
STRING_LITERAL(TMP2924, "PNimrodNode", 11);
static NIM_CONST tspecialwords204012 TMP2993 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0xF0, 0x8F, 0x7E, 0x17, 0x00, 0x8C,
0xFF, 0x01, 0x00, 0x21, 0xCC, 0x00, 0x18, 0x92,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2995, "compiler/semexprs.nim", 21);
NIM_CONST TY84745 TMP2994 = {((NimStringDesc*) &TMP2995),
929}
;
STRING_LITERAL(TMP2996, "in", 2);
STRING_LITERAL(TMP2997, "not", 3);
STRING_LITERAL(TMP2998, "()", 2);
STRING_LITERAL(TMP3000, "compiler/sem.nim", 16);
NIM_CONST TY84745 TMP2999 = {((NimStringDesc*) &TMP3000),
163}
;
static NIM_CONST tspecialwords204012 TMP3001 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x0D, 0x00, 0x10, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
static NIM_CONST tspecialwords204012 TMP3002 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x80, 0x8D, 0x04, 0x13, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x98, 0x58,
0x00, 0x08, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00}
;
static NIM_CONST tspecialwords204012 TMP3003 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x80, 0x8D, 0x04, 0x10, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3023, "\':\' expected", 12);
STRING_LITERAL(TMP3026, ":type", 5);
NIM_CONST TY84745 TMP3035 = {((NimStringDesc*) &TMP2895),
685}
;
STRING_LITERAL(TMP3038, "invalid return type: \'stmt\'", 27);
STRING_LITERAL(TMP3039, "*", 1);
STRING_LITERAL(TMP3040, "**", 2);
STRING_LITERAL(TMP3041, "~", 1);
STRING_LITERAL(TMP3046, "semProcAux", 10);
STRING_LITERAL(TMP3048, "destroy", 7);
STRING_LITERAL(TMP3049, "deepcopy", 8);
STRING_LITERAL(TMP3050, "=", 1);
STRING_LITERAL(TMP3051, "nimDestroyRange", 15);
STRING_LITERAL(TMP3053, "compiler/semdestruct.nim", 24);
NIM_CONST TY84745 TMP3052 = {((NimStringDesc*) &TMP3053),
114}
;
NIM_CONST TY84745 TMP3054 = {((NimStringDesc*) &TMP3053),
105}
;
NIM_CONST TY84745 TMP3055 = {((NimStringDesc*) &TMP3053),
153}
;
STRING_LITERAL(TMP3056, "AnonType", 8);
static NIM_CONST tspecialwords204012 TMP3057 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0xF0, 0x8F, 0x7E, 0x17, 0x00, 0x8C,
0xFF, 0x01, 0x00, 0x21, 0xCC, 0x00, 0x18, 0x92,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3058, "use the {.experimental.} pragma to enable destructors", 53);
STRING_LITERAL(TMP3059, "cannot bind another \'deepCopy\' to: ", 35);
STRING_LITERAL(TMP3060, "cannot bind \'deepCopy\' to: ", 27);
STRING_LITERAL(TMP3061, "signature for \'deepCopy\' must be proc[T: ptr|ref](x: T): T", 58);
STRING_LITERAL(TMP3062, "\'destroy\' or \'deepCopy\' expected for \'override\'", 47);
STRING_LITERAL(TMP3076, "compiler/hlo.nim", 16);
NIM_CONST TY84745 TMP3075 = {((NimStringDesc*) &TMP3076),
15}
;
STRING_LITERAL(TMP3077, "changeType: no tuple type for constructor", 41);
STRING_LITERAL(TMP3078, "cannot convert ", 15);
STRING_LITERAL(TMP3079, " to ", 4);
static NIM_CONST TY532622 TMP3080 = {
0x00, 0x08, 0x60, 0x87, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x38, 0x8C, 0x80, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00}
;
STRING_LITERAL(TMP3081, "analyseIfAddressTaken", 21);
STRING_LITERAL(TMP3083, "compiler/semmagic.nim", 21);
NIM_CONST TY84745 TMP3082 = {((NimStringDesc*) &TMP3083),
52}
;
STRING_LITERAL(TMP3084, "name", 4);
STRING_LITERAL(TMP3085, "arity", 5);
NIM_CONST TY84745 TMP3086 = {((NimStringDesc*) &TMP3083),
47}
;
STRING_LITERAL(TMP3087, "low", 3);
STRING_LITERAL(TMP3088, "high", 4);
NIM_CONST TY530545 optostr_530544 = {((NimStringDesc*) &TMP3087),
((NimStringDesc*) &TMP3088)}
;
static NIM_CONST TY532622 TMP3089 = {
0x01, 0x00, 0xFC, 0xF8, 0xE7, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x7F, 0xF8, 0x01, 0x0C, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00}
;
STRING_LITERAL(TMP3171, " --> \'", 6);
STRING_LITERAL(TMP3172, "\'", 1);
static NIM_CONST tspecialwords204012 TMP3227 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3229, "compiler/semcall.nim", 20);
NIM_CONST TY84745 TMP3228 = {((NimStringDesc*) &TMP3229),
164}
;
STRING_LITERAL(TMP3230, ".()", 3);
STRING_LITERAL(TMP3231, ".", 1);
NIM_CONST TY84745 TMP3232 = {((NimStringDesc*) &TMP3229),
185}
;
STRING_LITERAL(TMP3233, ".=", 2);
STRING_LITERAL(TMP3234, ", ", 2);
STRING_LITERAL(TMP3235, "\012", 1);
NIM_CONST TY84745 TMP3236 = {((NimStringDesc*) &TMP3229),
213}
;
STRING_LITERAL(TMP3237, "ambiguous call", 14);
STRING_LITERAL(TMP3238, "(", 1);
STRING_LITERAL(TMP3239, "calleeSym.ast is nil", 20);
STRING_LITERAL(TMP3240, "semOverloadedCallAnalyseEffects", 31);
STRING_LITERAL(TMP3241, "[]=", 3);
STRING_LITERAL(TMP3242, "{}=", 3);
NIM_CONST TY84745 TMP3243 = {((NimStringDesc*) &TMP2995),
1227}
;
STRING_LITERAL(TMP3244, ") ", 2);
STRING_LITERAL(TMP3246, "semRecordNodeAux", 16);
STRING_LITERAL(TMP3247, "semRecordCase: discriminant is no symbol", 40);
STRING_LITERAL(TMP3248, "dummy", 5);
static NIM_CONST tspecialwords204012 TMP3249 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xA0, 0x80, 0xBD, 0x15, 0x12, 0x00, 0x04,
0x00, 0x00, 0x00, 0x08, 0x40, 0x18, 0x58, 0x20,
0x00, 0x08, 0x00, 0x00, 0x80, 0x01, 0x00, 0x30}
;
static NIM_CONST tspecialwords204012 TMP3250 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00, 0x88,
0xFF, 0x01, 0x00, 0x21, 0x00, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3254, "bind", 4);
STRING_LITERAL(TMP3255, ":anon", 5);
STRING_LITERAL(TMP3256, "object constructor needs an object type", 39);
STRING_LITERAL(TMP3257, "checkInitialized", 16);
STRING_LITERAL(TMP3258, "field not initialized: ", 23);
STRING_LITERAL(TMP3259, "defined", 7);
STRING_LITERAL(TMP3260, "obsolete usage of \'defined\', use \'declared\' instead", 51);
STRING_LITERAL(TMP3261, "undeclared conditional symbol; use --symbol to declare it: ", 59);
STRING_LITERAL(TMP3263, "sizeof", 6);
STRING_LITERAL(TMP3264, "is", 2);
NIM_CONST TY84745 TMP3265 = {((NimStringDesc*) &TMP2995),
357}
;
STRING_LITERAL(TMP3266, "closure", 7);
STRING_LITERAL(TMP3267, "of", 2);
NIM_CONST TY84745 TMP3268 = {((NimStringDesc*) &TMP2995),
1455}
;
STRING_LITERAL(TMP3269, "PNimrodNode", 11);
NIM_CONST TY84745 TMP3270 = {((NimStringDesc*) &TMP2995),
1491}
;
STRING_LITERAL(TMP3271, "``", 2);
STRING_LITERAL(TMP3272, "block", 5);
STRING_LITERAL(TMP3273, "stmt", 4);
STRING_LITERAL(TMP3274, "expr", 4);
static NIM_CONST tspecialwords204012 TMP3275 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x10, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3278, "FlowVar", 7);
STRING_LITERAL(TMP3279, "nimCreateFlowVar", 16);
STRING_LITERAL(TMP3281, ")\012", 2);
STRING_LITERAL(TMP3282, "cannot instantiate: ", 20);
STRING_LITERAL(TMP3283, "; got ", 6);
STRING_LITERAL(TMP3284, " type(s) but expected ", 22);
STRING_LITERAL(TMP3285, "[]", 2);
STRING_LITERAL(TMP3286, "{}", 2);
STRING_LITERAL(TMP3287, "semExpr() to implement", 22);
static NIM_CONST tspecialwords204012 TMP3288 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x80, 0x8D, 0x3E, 0x01, 0x00, 0x84,
0xFF, 0x01, 0x00, 0x21, 0x00, 0x00, 0x00, 0x82,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3289, "usage of a type with a destructor in a non destructible context", 63);
STRING_LITERAL(TMP3290, "use \'defer\'; standalone \'finally\'", 33);
STRING_LITERAL(TMP3291, "use an explicit \'try\'; standalone \'except\'", 42);
STRING_LITERAL(TMP3292, "type class predicate failed", 27);
STRING_LITERAL(TMP3293, "tuple", 5);
STRING_LITERAL(TMP3294, "shared", 6);
STRING_LITERAL(TMP3296, "compiler/semstmts.nim", 21);
NIM_CONST TY84745 TMP3295 = {((NimStringDesc*) &TMP3296),
673}
;
NIM_CONST TY84745 TMP3297 = {((NimStringDesc*) &TMP3296),
699}
;
NIM_CONST TY84745 TMP3298 = {((NimStringDesc*) &TMP3296),
700}
;
STRING_LITERAL(TMP3299, ":ObjectType", 11);
STRING_LITERAL(TMP3300, "\'continue\' cannot have a label", 30);
STRING_LITERAL(TMP3301, "true", 4);
STRING_LITERAL(TMP3302, "true", 4);
STRING_LITERAL(TMP3303, "no object or tuple type", 23);
STRING_LITERAL(TMP3304, "Field", 5);
STRING_LITERAL(TMP3305, "\'continue\' not supported in a \'fields\' loop", 43);
STRING_LITERAL(TMP3306, "parallel \'fields\' iterator does not work for \'case\' objects", 59);
STRING_LITERAL(TMP3307, "items", 5);
STRING_LITERAL(TMP3308, "pairs", 5);
STRING_LITERAL(TMP3309, "use \'else: discard\'; non-ordinal case without \'else\'", 52);
STRING_LITERAL(TMP3310, "\'return\'", 8);
STRING_LITERAL(TMP3311, "use the {.experimental.} pragma to enable \'using\'", 49);
STRING_LITERAL(TMP3312, "semYield", 8);
STRING_LITERAL(TMP3313, "tuple constructor", 17);
STRING_LITERAL(TMP3314, "yield statement must yield a value", 34);
static NIM_CONST tspecialwords204012 TMP3315 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x01, 0x78, 0xFF, 0x27,
0x00, 0xF8, 0xFF, 0x50, 0x33, 0xE3, 0x03, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
static NIM_CONST tspecialwords204012 TMP3316 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x80, 0x8D, 0x1A, 0x10, 0x00, 0x84,
0xFF, 0x01, 0x00, 0x21, 0xC0, 0x00, 0x18, 0x80,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3317, "iterator", 8);
STRING_LITERAL(TMP3318, "method", 6);
STRING_LITERAL(TMP3319, "converter", 9);
static NIM_CONST tspecialwords204012 TMP3320 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0xA8, 0x8D, 0x08, 0x12, 0x00, 0x84,
0xFF, 0x01, 0x00, 0x00, 0x80, 0x00, 0x18, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3321, "macro", 5);
STRING_LITERAL(TMP3322, "import", 6);
STRING_LITERAL(TMP3333, "from", 4);
STRING_LITERAL(TMP3336, "include", 7);
STRING_LITERAL(TMP3337, "export", 6);
STRING_LITERAL(TMP3338, "cannot export: ", 15);
static NIM_CONST tspecialwords204012 TMP3339 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP3345, "no code for ", 12);
STRING_LITERAL(TMP3346, "echo", 4);
STRING_LITERAL(TMP3347, "echo", 4);
STRING_LITERAL(TMP3349, "n is not nil", 12);
ttype225852* commontypebegin_487459;
extern TNimType NTI225812; /* PType */
extern TNimType NTI225852; /* TType */
extern tgcheap47016 gch_47044;
tident200021* typedescid_500285;
ttype225852* enforcevoidcontext_515110;
tsym225846* analyzingdestructor_515727;
tsym225846* destructoristrivial_515728;
extern TNimType NTI225814; /* PSym */
extern TNimType NTI225846; /* TSym */
tident200021* destructorname_515761;
tident200021* destructorparam_515762;
tnode225816* destructorpragma_515763;
tsym225846* rangedestructorproc_515764;
extern NU8 gcmd_169120;
extern NI evaltemplatecounter_455330;
extern TNimType NTI225816; /* TNode */
extern TNimType NTI225445; /* TSymKind */
extern TNimType NTI225848; /* TTypeSeq */
extern TNimType NTI290009; /* PProcCon */
extern tnode225816* emptynode_226738;
extern TNimType NTI225810; /* TNodeSeq */
extern tident200021* iddelegator_200559;
extern tident200021* idanon_200504;
extern NU32 gglobaloptions_169118;
extern NIM_BOOL isserving_169133;
TNimType NTI501454; /* object */
extern TNimType NTI357033; /* range -1..0(int) */
extern TNimType NTI149; /* string */
extern TNimType NTI225808; /* PNode */
extern TNimType NTI195539; /* TLineInfo */
extern TNimType NTI290019; /* PContext */
TNimType NTI501512; /* ref object */
extern NU32 goptions_169116;
extern NIM_BOOL gexperimentalmode_169137;
extern NU64 gnotes_196305;
extern TNimType NTI405209; /* TCandidate */
extern TNimType NTI225818; /* TSymSeq */
extern NI gerrorcounter_196306;
extern NI gerrormax_196309;
extern tsymseq225818* gowners_290293;
extern NU8 erroroutputs_196440;
extern TNimType NTI290133; /* seq[TInstantiationPair] */
extern TSafePoint* exchandler_16243;
extern TNimType NTI195545; /* ERecoverableError */
extern Exception* currexception_16245;
extern TNimType NTI225532; /* TMagic */
extern tsym225846* systemmodule_282019;
extern tlineinfo195539 gcodegenlineinfo_196239;
extern NI ptrsize_174612;
extern TNimType NTI225258; /* TTypeKind */
extern NI intsize_174610;
extern NI floatsize_174611;
extern TY286069 gincludefile_286073;
extern TNimType NTI195547; /* ESuggestDone */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI516908; /* tuple[outer: PNode, inner: PNode] */

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

static N_INLINE(void, rtladdzct_50204)(tcell44935* c) {
	addzct_48617((&gch_47044.Zct), c);
}

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

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

static N_INLINE(tnode225816*, inlineconst_528841)(tnode225816* n, tsym225846* s) {
	tnode225816* result;
	result = 0;
	result = copytree_226329((*s).Ast);
	asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
	(*result).Info = (*n).Info;
	return result;
}

static N_INLINE(NI, len_226364)(tnode225816* n) {
	NI result;
	result = 0;
	{
		if (!(*n).kindU.S6.Sons == 0) goto LA3;
		result = 0;
	}
	goto LA1;
	LA3: ;
	{
		result = (*n).kindU.S6.Sons->Sup.len;
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, sonslen_226249)(tnode225816* n) {
	NI result;
	result = 0;
	{
		if (!(*n).kindU.S6.Sons == 0) goto LA3;
		result = 0;
	}
	goto LA1;
	LA3: ;
	{
		result = (*n).kindU.S6.Sons->Sup.len;
	}
	LA1: ;
	return result;
}

static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n) {
	tnode225816* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_226249(n);
	result = (*n).kindU.S6.Sons->data[(NI32)(LOC1 - 1)];
	return result;
}

N_NIMCALL(NIM_BOOL, implicitlydiscardable_517457)(tnode225816* n_517459) {
	NIM_BOOL result;
	tnode225816* n;
	NIM_BOOL LOC3;
	NIM_BOOL LOC4;
	result = 0;
	n = n_517459;
	{
		while (1) {
			if (!((TMP2889[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA2;
			n = lastson_226261(n);
		} LA2: ;
	}
	LOC3 = 0;
	LOC4 = 0;
	LOC4 = iscallexpr_226335(n);
	if (!(LOC4)) goto LA5;
	LOC4 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
	LA5: ;
	LOC3 = LOC4;
	if (!(LOC3)) goto LA6;
	LOC3 = (((*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Flags &(1<<((((NU8) 29))&31)))!=0);
	LA6: ;
	result = LOC3;
	return result;
}

static N_INLINE(NIM_BOOL, isatom_232962)(tnode225816* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (((NU8) 0) <= (*n).Kind);
	if (!(LOC1)) goto LA2;
	LOC1 = ((*n).Kind <= ((NU8) 23));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, fixniltype_517549)(tnode225816* n) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isatom_232962(n);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			NimStringDesc* LOC12;
			LOC8 = 0;
			LOC8 = !(((*n).Kind == ((NU8) 23)));
			if (!(LOC8)) goto LA9;
			LOC8 = !(((*n).Typ == NIM_NIL));
			LA9: ;
			if (!LOC8) goto LA10;
			LOC12 = 0;
			LOC12 = typetostring_263031((*n).Typ, ((NU8) 0));
			localerror_197955((*n).Info, ((NU16) 140), LOC12);
		}
		LA10: ;
	}
	goto LA1;
	LA4: ;
	{
		if (!((*n).Kind == ((NU8) 115) || (*n).Kind == ((NU8) 126))) goto LA14;
		(*n).Kind = ((NU8) 115);
		{
			tnode225816* it_517592;
			it_517592 = 0;
			{
				NI i_517597;
				NI HEX3Atmp_517599;
				NI LOC18;
				NI res_517601;
				i_517597 = 0;
				HEX3Atmp_517599 = 0;
				LOC18 = 0;
				LOC18 = len_226364(n);
				HEX3Atmp_517599 = (LOC18 - 1);
				res_517601 = 0;
				{
					while (1) {
						if (!(res_517601 <= HEX3Atmp_517599)) goto LA20;
						i_517597 = res_517601;
						it_517592 = (*n).kindU.S6.Sons->data[i_517597];
						fixniltype_517549(it_517592);
						res_517601 += 1;
					} LA20: ;
				}
			}
		}
	}
	goto LA1;
	LA14: ;
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), NIM_NIL);
}

N_NIMCALL(void, discardcheck_517617)(tcontext290021* c, tnode225816* result) {
	{
		if (!(0 < (*c).Intypeclass)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = !(((*result).Typ == NIM_NIL));
		if (!(LOC7)) goto LA8;
		LOC7 = !(((*(*result).Typ).Kind == ((NU8) 7) || (*(*result).Typ).Kind == ((NU8) 3)));
		LA8: ;
		if (!LOC7) goto LA9;
		{
			if (!((*result).Kind == ((NU8) 23))) goto LA13;
			asgnRefNoCycle((void**) (&(*result).Typ), NIM_NIL);
			message_197976((*result).Info, ((NU16) 243), ((NimStringDesc*) &TMP2888));
		}
		goto LA11;
		LA13: ;
		{
			NIM_BOOL LOC16;
			tnode225816* n;
			LOC16 = 0;
			LOC16 = implicitlydiscardable_517457(result);
			if (!LOC16) goto LA17;
			n = result;
			asgnRefNoCycle((void**) (&(*result).Typ), NIM_NIL);
			{
				while (1) {
					if (!((TMP2889[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA20;
					n = lastson_226261(n);
					asgnRefNoCycle((void**) (&(*n).Typ), NIM_NIL);
				} LA20: ;
			}
		}
		goto LA11;
		LA17: ;
		{
			NIM_BOOL LOC22;
			LOC22 = 0;
			LOC22 = !(((*(*result).Typ).Kind == ((NU8) 50)));
			if (!(LOC22)) goto LA23;
			LOC22 = !((gcmd_169120 == ((NU8) 18)));
			LA23: ;
			if (!LOC22) goto LA24;
			{
				if (!((*(*result).Typ).Kind == ((NU8) 5))) goto LA28;
				fixniltype_517549(result);
				message_197976((*result).Info, ((NU16) 243), ((NimStringDesc*) &TMP2888));
			}
			goto LA26;
			LA28: ;
			{
				tnode225816* n;
				NimStringDesc* LOC33;
				n = result;
				{
					while (1) {
						if (!((TMP2889[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA32;
						n = lastson_226261(n);
					} LA32: ;
				}
				LOC33 = 0;
				LOC33 = typetostring_263031((*result).Typ, ((NU8) 0));
				localerror_197955((*n).Info, ((NU16) 140), LOC33);
			}
			LA26: ;
		}
		goto LA11;
		LA24: ;
		LA11: ;
	}
	LA9: ;
	BeforeRet: ;
}

N_NIMCALL(tnode225816*, semexprnotype_487221)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = semexpr_487201(c, n, 8);
	discardcheck_517617(c, result);
	return result;
}

N_NIMCALL(tnode225816*, semstmt_487277)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = semexprnotype_487221(c, n);
	return result;
}

N_NIMCALL(ttype225852*, neworprevtype_495130)(NU8 kind, ttype225852* prev, tcontext290021* c) {
	ttype225852* result;
	result = 0;
	{
		if (!(prev == NIM_NIL)) goto LA3;
		result = newtypes_290214(kind, c);
	}
	goto LA1;
	LA3: ;
	{
		result = prev;
		{
			if (!((*result).Kind == ((NU8) 30))) goto LA8;
			(*result).Kind = kind;
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i) {
	tnode225816* result;
	result = 0;
	result = (*n).kindU.S6.Sons->data[i];
	return result;
}

static N_INLINE(NIM_BOOL, isrange_262216)(tnode225816* n) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 29))) goto LA3;
		{
			NIM_BOOL LOC7;
			NIM_BOOL LOC8;
			tnode225816* LOC9;
			tnode225816* LOC11;
			NIM_BOOL LOC13;
			tnode225816* LOC14;
			tnode225816* LOC16;
			tnode225816* LOC17;
			LOC7 = 0;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_226698(n, 0);
			LOC8 = ((*LOC9).Kind == ((NU8) 2));
			if (!(LOC8)) goto LA10;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_226698(n, 0);
			LOC8 = ((*(*LOC11).kindU.S5.Ident).Sup.Id == 74);
			LA10: ;
			LOC7 = LOC8;
			if (LOC7) goto LA12;
			LOC13 = 0;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_226698(n, 0);
			LOC13 = ((*LOC14).Kind == ((NU8) 56) || (*LOC14).Kind == ((NU8) 57));
			if (!(LOC13)) goto LA15;
			LOC16 = 0;
			LOC16 = HEX5BHEX5D_226698(n, 0);
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_226698(LOC16, 1);
			LOC13 = ((*(*(*LOC17).kindU.S4.Sym).Name).Sup.Id == 74);
			LA15: ;
			LOC7 = LOC13;
			LA12: ;
			if (!LOC7) goto LA18;
			result = NIM_TRUE;
		}
		LA18: ;
	}
	LA3: ;
	return result;
}

static N_INLINE(ttype225852*, skipintlit_282531)(ttype225852* t) {
	ttype225852* result;
	result = 0;
	{
		if (!!(((*t).N == NIM_NIL))) goto LA3;
		{
			if (!((*t).Kind == ((NU8) 31) || (*t).Kind == ((NU8) 36))) goto LA7;
			result = getsystype_282030((*t).Kind);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = t;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semrangeaux_495954)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	TY496019 range;
	tnode225816* LOC9;
	tnode225816* LOC10;
	TY496024 ranget;
	result = 0;
	checksonslen_291416(n, 3);
	result = neworprevtype_495130(((NU8) 20), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 44), (*n).Info));
	{
		NIM_BOOL LOC3;
		tnode225816* LOC4;
		tnode225816* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_226698(n, 1);
		LOC3 = ((*LOC4).Kind == ((NU8) 1));
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_226698(n, 2);
		LOC3 = ((*LOC6).Kind == ((NU8) 1));
		LA5: ;
		if (!LOC3) goto LA7;
		localerror_197955((*n).Info, ((NU16) 106), ((NimStringDesc*) &TMP2888));
	}
	LA7: ;
	memset((void*)range, 0, sizeof(range));
	LOC9 = 0;
	LOC9 = HEX5BHEX5D_226698(n, 1);
	range[(0)- 0] = semexprwithtype_487211(c, LOC9, 16);
	LOC10 = 0;
	LOC10 = HEX5BHEX5D_226698(n, 2);
	range[(1)- 0] = semexprwithtype_487211(c, LOC10, 16);
	memset((void*)ranget, 0, sizeof(ranget));
	{
		NI i_496037;
		NI res_496066;
		i_496037 = 0;
		res_496066 = 0;
		{
			while (1) {
				ttype225852* LOC14;
				if (!(res_496066 <= 1)) goto LA13;
				i_496037 = res_496066;
				LOC14 = 0;
				LOC14 = skiptypes_230245((*range[(i_496037)- 0]).Typ, IL64(576460752303423488));
				ranget[(i_496037)- 0] = skipintlit_282531(LOC14);
				res_496066 += 1;
			} LA13: ;
		}
	}
	{
		ttype225852* LOC17;
		ttype225852* LOC18;
		NIM_BOOL LOC19;
		LOC17 = 0;
		LOC17 = skiptypes_230245(ranget[(0)- 0], 1048576);
		LOC18 = 0;
		LOC18 = skiptypes_230245(ranget[(1)- 0], 1048576);
		LOC19 = 0;
		LOC19 = sametype_268351(LOC17, LOC18, 0);
		if (!!(LOC19)) goto LA20;
		localerror_197955((*n).Info, ((NU16) 128), ((NimStringDesc*) &TMP2888));
	}
	goto LA15;
	LA20: ;
	{
		NIM_BOOL LOC23;
		LOC23 = 0;
		LOC23 = isordinaltype_263092(ranget[(0)- 0]);
		if (!!(LOC23)) goto LA24;
		localerror_197955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
	}
	goto LA15;
	LA24: ;
	{
		NIM_BOOL LOC27;
		LOC27 = 0;
		LOC27 = enumhasholes_263098(ranget[(0)- 0]);
		if (!LOC27) goto LA28;
		localerror_197955((*n).Info, ((NU16) 146), (*(*(*ranget[(0)- 0]).Sym).Name).S);
	}
	goto LA15;
	LA28: ;
	LA15: ;
	{
		NI i_496051;
		NI res_496071;
		i_496051 = 0;
		res_496071 = 0;
		{
			while (1) {
				if (!(res_496071 <= 1)) goto LA32;
				i_496051 = res_496071;
				{
					NIM_BOOL LOC35;
					tnode225816* LOC38;
					LOC35 = 0;
					LOC35 = hasgenericarguments_318243(range[(i_496051)- 0]);
					if (!LOC35) goto LA36;
					LOC38 = 0;
					LOC38 = makestaticexpr_290836(c, range[(i_496051)- 0]);
					addson_226287((*result).N, LOC38);
				}
				goto LA33;
				LA36: ;
				{
					tnode225816* LOC40;
					LOC40 = 0;
					LOC40 = semconstexpr_488503(c, range[(i_496051)- 0]);
					addson_226287((*result).N, LOC40);
				}
				LA33: ;
				res_496071 += 1;
			} LA32: ;
		}
	}
	{
		tnode225816* LOC43;
		tnode225816* LOC44;
		NU8 LOC45;
		LOC43 = 0;
		LOC43 = HEX5BHEX5D_226698((*result).N, 0);
		LOC44 = 0;
		LOC44 = HEX5BHEX5D_226698((*result).N, 1);
		LOC45 = 0;
		LOC45 = weaklevalue_235624(LOC43, LOC44);
		if (!(LOC45 == ((NU8) 1))) goto LA46;
		localerror_197955((*n).Info, ((NU16) 106), ((NimStringDesc*) &TMP2888));
	}
	LA46: ;
	addsonskipintlit_282572(result, ranget[(0)- 0]);
	return result;
}

N_NIMCALL(ttype225852*, semtypeexpr_502786)(tcontext290021* c, tnode225816* n_502789) {
	ttype225852* result;
	tnode225816* n;
	result = 0;
	n = semexprwithtype_487211(c, n_502789, 16);
	{
		if (!((*(*n).Typ).Kind == ((NU8) 8))) goto LA3;
		result = base_263038((*n).Typ);
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC6;
		LOC6 = 0;
		LOC6 = rendertree_250058(n, 0);
		localerror_197955((*n).Info, ((NU16) 63), LOC6);
	}
	LA1: ;
	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;
}

static N_INLINE(ttype225852*, freshtype_502805)(ttype225852* res, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	{
		if (!prev == 0) goto LA3;
		result = copytype_226195(res, (*res).Owner, NIM_FALSE);
	}
	goto LA1;
	LA3: ;
	{
		result = res;
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, newconstraint_495165)(tcontext290021* c, NU8 k) {
	ttype225852* result;
	ttype225852* LOC1;
	result = 0;
	result = newtypes_290214(((NU8) 51), c);
	LOC1 = 0;
	LOC1 = newtypes_290214(k, c);
	addsonskipintlit_282572(result, LOC1);
	return result;
}

N_NIMCALL(ttype225852*, semanyref_495786)(tcontext290021* c, tnode225816* n_495789, NU8 kind, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_226364(n_495789);
		if (!(LOC3 < 1)) goto LA4;
		result = newconstraint_495165(c, kind);
	}
	goto LA1;
	LA4: ;
	{
		NI iscall;
		tnode225816* n;
		ttype225852* base;
		tnode225816* LOC24;
		iscall = ((*n_495789).Kind == ((NU8) 27) || (*n_495789).Kind == ((NU8) 29) || (*n_495789).Kind == ((NU8) 30) || (*n_495789).Kind == ((NU8) 31) || (*n_495789).Kind == ((NU8) 26) || (*n_495789).Kind == ((NU8) 28) || (*n_495789).Kind == ((NU8) 32));
		{
			tnode225816* LOC9;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_226698(n_495789, 0);
			if (!((*LOC9).Kind == ((NU8) 41))) goto LA10;
			n = HEX5BHEX5D_226698(n_495789, 0);
		}
		goto LA7;
		LA10: ;
		{
			n = n_495789;
		}
		LA7: ;
		checkminsonslen_291426(n, 1);
		result = neworprevtype_495130(kind, prev, c);
		{
			NI i_495861;
			NI HEX3Atmp_495880;
			NI LOC14;
			NI res_495883;
			i_495861 = 0;
			HEX3Atmp_495880 = 0;
			LOC14 = 0;
			LOC14 = len_226364(n);
			HEX3Atmp_495880 = (NI32)(LOC14 - 2);
			res_495883 = ((NI) (iscall));
			{
				while (1) {
					ttype225852* region;
					tnode225816* LOC17;
					if (!(res_495883 <= HEX3Atmp_495880)) goto LA16;
					i_495861 = res_495883;
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_226698(n, i_495861);
					region = semtypenode_487269(c, LOC17, NIM_NIL);
					{
						ttype225852* LOC20;
						tnode225816* LOC23;
						LOC20 = 0;
						LOC20 = skiptypes_230245(region, 2048);
						if (!!(((*LOC20).Kind == ((NU8) 50) || (*LOC20).Kind == ((NU8) 17)))) goto LA21;
						LOC23 = 0;
						LOC23 = HEX5BHEX5D_226698(n, i_495861);
						message_197976((*LOC23).Info, ((NU16) 4), ((NimStringDesc*) &TMP2892));
					}
					LA21: ;
					addsonskipintlit_282572(result, region);
					res_495883 += 1;
				} LA16: ;
			}
		}
		LOC24 = 0;
		LOC24 = lastson_226261(n);
		base = semtypenode_487269(c, LOC24, NIM_NIL);
		addsonskipintlit_282572(result, base);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semwhen_488040)(tcontext290021* c, tnode225816* n, NIM_BOOL semcheck) {
	tnode225816* result;
	result = 0;
	result = NIM_NIL;
	{
		NI i_540425;
		NI HEX3Atmp_540616;
		NI LOC2;
		NI res_540619;
		i_540425 = 0;
		HEX3Atmp_540616 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_540616 = (NI32)(LOC2 - 1);
		res_540619 = 0;
		{
			while (1) {
				tnode225816* it;
				if (!(res_540619 <= HEX3Atmp_540616)) goto LA4;
				i_540425 = res_540619;
				it = (*n).kindU.S6.Sons->data[i_540425];
				switch ((*it).Kind) {
				case ((NU8) 86):
				case ((NU8) 49):
				{
					tnode225816* e;
					checksonslen_291416(it, 2);
					e = semconstexpr_488503(c, (*it).kindU.S6.Sons->data[0]);
					{
						if (!!(((*e).Kind == ((NU8) 6)))) goto LA8;
					}
					goto LA6;
					LA8: ;
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = !(((*e).kindU.S1.Intval == IL64(0)));
						if (!(LOC11)) goto LA12;
						LOC11 = (result == NIM_NIL);
						LA12: ;
						if (!LOC11) goto LA13;
						{
							if (!semcheck) goto LA17;
							result = semstmt_487277(c, (*it).kindU.S6.Sons->data[1]);
						}
						goto LA15;
						LA17: ;
						{
							result = (*it).kindU.S6.Sons->data[1];
						}
						LA15: ;
					}
					goto LA6;
					LA13: ;
					LA6: ;
				}
				break;
				case ((NU8) 88):
				case ((NU8) 50):
				{
					checksonslen_291416(it, 1);
					{
						if (!(result == NIM_NIL)) goto LA23;
						{
							if (!semcheck) goto LA27;
							result = semstmt_487277(c, (*it).kindU.S6.Sons->data[0]);
						}
						goto LA25;
						LA27: ;
						{
							result = (*it).kindU.S6.Sons->data[0];
						}
						LA25: ;
					}
					LA23: ;
				}
				break;
				default:
				{
					illformedast_291406(n);
				}
				break;
				}
				res_540619 += 1;
			} LA4: ;
		}
	}
	{
		if (!(result == NIM_NIL)) goto LA33;
		result = newnodei_226138(((NU8) 1), (*n).Info);
	}
	LA33: ;
	idsynchronizationpoint_224458(200);
	return result;
}

N_NIMCALL(tsym225846*, semtypeident_496731)(tcontext290021* c, tnode225816* n) {
	tsym225846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 3))) goto LA3;
		result = (*n).kindU.S4.Sym;
	}
	goto LA1;
	LA3: ;
	{
		result = qualifiedlookup_296122(c, n, 3);
		{
			if (!!((result == NIM_NIL))) goto LA8;
			markused_405251((*n).Info, result);
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = ((*result).Kind == ((NU8) 3));
				if (!(LOC12)) goto LA13;
				LOC12 = ((*(*result).Typ).Kind == ((NU8) 8));
				LA13: ;
				if (!LOC12) goto LA14;
				{
					tsym225846* bound;
					if (!(0 < (*c).Ingenericinst)) goto LA18;
					bound = (*(*(*result).Typ).Sons->data[0]).Sym;
					{
						if (!!((bound == NIM_NIL))) goto LA22;
						result = bound;
						goto BeforeRet;
					}
					LA22: ;
					goto BeforeRet;
				}
				LA18: ;
				{
					if (!((*(*result).Typ).Sym == NIM_NIL)) goto LA26;
					localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					result = errorsym_295412(c, n);
					goto BeforeRet;
				}
				LA26: ;
				result = copysym_226203((*(*result).Typ).Sym, NIM_FALSE);
				asgnRefNoCycle((void**) (&(*result).Typ), copytype_226195((*result).Typ, (*(*result).Typ).Owner, NIM_TRUE));
				(*(*result).Typ).Flags |= ((NI32)1)<<((((NU8) 9))%(sizeof(NI32)*8));
			}
			LA14: ;
			{
				if (!((*result).Kind == ((NU8) 4))) goto LA30;
				{
					NIM_BOOL LOC34;
					NIM_BOOL LOC35;
					NI LOC37;
					LOC34 = 0;
					LOC35 = 0;
					LOC35 = ((*(*result).Typ).Kind == ((NU8) 12));
					if (!(LOC35)) goto LA36;
					LOC37 = 0;
					LOC37 = len_230005((*result).Typ);
					LOC35 = (LOC37 == 0);
					LA36: ;
					LOC34 = LOC35;
					if (!(LOC34)) goto LA38;
					LOC34 = (((*(*result).Typ).Flags &(1<<((((NU8) 25))&31)))!=0);
					LA38: ;
					if (!LOC34) goto LA39;
					(*result).Kind = ((NU8) 7);
					(*(*result).Typ).Flags &= ~(((NI32)1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
					goto BeforeRet;
				}
				goto LA32;
				LA39: ;
				{
					localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					result = errorsym_295412(c, n);
					goto BeforeRet;
				}
				LA32: ;
			}
			LA30: ;
			{
				toverloaditer295491 ov;
				tsym225846* amb;
				if (!!(((*result).Kind == ((NU8) 7)))) goto LA44;
				memset((void*)(&ov), 0, sizeof(ov));
				amb = initoverloaditer_296665((&ov), c, n);
				{
					while (1) {
						NIM_BOOL LOC48;
						LOC48 = 0;
						LOC48 = !((amb == NIM_NIL));
						if (!(LOC48)) goto LA49;
						LOC48 = !(((*amb).Kind == ((NU8) 7)));
						LA49: ;
						if (!LOC48) goto LA47;
						amb = nextoverloaditer_297032((&ov), c, n);
					} LA47: ;
				}
				{
					if (!!((amb == NIM_NIL))) goto LA52;
					result = amb;
				}
				goto LA50;
				LA52: ;
				{
					{
						if (!!(((*result).Kind == ((NU8) 0)))) goto LA57;
						localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					}
					LA57: ;
					result = errorsym_295412(c, n);
					goto BeforeRet;
				}
				LA50: ;
			}
			LA44: ;
			{
				tlineinfo195539 oldinfo;
				if (!!(((*(*result).Typ).Kind == ((NU8) 12)))) goto LA61;
				oldinfo = (*n).Info;
				genericReset((void*)(&(*n)), (&NTI225816));
				(*n).Kind = ((NU8) 3);
				asgnRefNoCycle((void**) (&(*n).kindU.S4.Sym), result);
				(*n).Info = oldinfo;
			}
			LA61: ;
		}
		goto LA6;
		LA8: ;
		{
			localerror_197955((*n).Info, ((NU16) 19), ((NimStringDesc*) &TMP2888));
			result = errorsym_295412(c, n);
		}
		LA6: ;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, sonslen_226255)(ttype225852* n) {
	NI result;
	result = 0;
	{
		if (!(*n).Sons == 0) goto LA3;
		result = 0;
	}
	goto LA1;
	LA3: ;
	{
		result = (*n).Sons->Sup.len;
	}
	LA1: ;
	return result;
}

static N_INLINE(ttype225852*, lastson_226267)(ttype225852* n) {
	ttype225852* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_226255(n);
	result = (*n).Sons->data[(NI32)(LOC1 - 1)];
	return result;
}

N_NIMCALL(ttype225852*, semarray_496411)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	ttype225852* indx;
	ttype225852* base;
	result = 0;
	indx = 0;
	base = 0;
	result = neworprevtype_495130(((NU8) 16), prev, c);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 3)) goto LA4;
		{
			tnode225816* LOC8;
			NIM_BOOL LOC9;
			tnode225816* LOC12;
			LOC8 = 0;
			LOC8 = HEX5BHEX5D_226698(n, 1);
			LOC9 = 0;
			LOC9 = isrange_262216(LOC8);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_226698(n, 1);
			indx = semrangeaux_495954(c, LOC12, NIM_NIL);
		}
		goto LA6;
		LA10: ;
		{
			tnode225816* e;
			e = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 16);
			{
				if (!((*(*e).Typ).Kind == ((NU8) 60))) goto LA16;
				indx = makerangewithstaticexpr_291247(c, (*(*e).Typ).N);
			}
			goto LA14;
			LA16: ;
			{
				if (!((*e).Kind >= ((NU8) 6) && (*e).Kind <= ((NU8) 15))) goto LA19;
				indx = makerangetype_291351(c, IL64(0), (NI64)((*e).kindU.S1.Intval - IL64(1)), (*n).Info, (*e).Typ);
			}
			goto LA14;
			LA19: ;
			{
				NIM_BOOL LOC22;
				LOC22 = 0;
				LOC22 = ((*e).Kind == ((NU8) 3));
				if (!(LOC22)) goto LA23;
				LOC22 = ((*(*e).Typ).Kind == ((NU8) 59));
				LA23: ;
				if (!LOC22) goto LA24;
				{
					if (!!(((*(*e).kindU.S4.Sym).Ast == NIM_NIL))) goto LA28;
					result = semarray_496411(c, (*(*e).kindU.S4.Sym).Ast, NIM_NIL);
					goto BeforeRet;
				}
				LA28: ;
				{
					NimStringDesc* LOC34;
					if (!!((0 < (*c).Ingenericcontext))) goto LA32;
					LOC34 = 0;
					LOC34 = HEX24_198126(TMP2894);
					internalerror_198006(LOC34);
				}
				LA32: ;
				{
					ttype225852* LOC37;
					NIM_BOOL LOC38;
					tnode225816* LOC41;
					LOC37 = 0;
					LOC37 = lastson_226267((*e).Typ);
					LOC38 = 0;
					LOC38 = isordinaltype_263092(LOC37);
					if (!!(LOC38)) goto LA39;
					LOC41 = 0;
					LOC41 = HEX5BHEX5D_226698(n, 1);
					localerror_197955((*LOC41).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
				}
				LA39: ;
				indx = makerangewithstaticexpr_291247(c, e);
				(*indx).Flags |= ((NI32)1)<<((((NU8) 9))%(sizeof(NI32)*8));
			}
			goto LA14;
			LA24: ;
			{
				NIM_BOOL LOC43;
				LOC43 = 0;
				LOC43 = ((*e).Kind == ((NU8) 27) || (*e).Kind == ((NU8) 29) || (*e).Kind == ((NU8) 30) || (*e).Kind == ((NU8) 31) || (*e).Kind == ((NU8) 26) || (*e).Kind == ((NU8) 28) || (*e).Kind == ((NU8) 32));
				if (!(LOC43)) goto LA44;
				LOC43 = hasgenericarguments_318243(e);
				LA44: ;
				if (!LOC43) goto LA45;
				{
					NIM_BOOL LOC49;
					tnode225816* LOC52;
					LOC49 = 0;
					LOC49 = isordinaltype_263092((*e).Typ);
					if (!!(LOC49)) goto LA50;
					LOC52 = 0;
					LOC52 = HEX5BHEX5D_226698(n, 1);
					localerror_197955((*LOC52).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
				}
				LA50: ;
				indx = makerangewithstaticexpr_291247(c, e);
			}
			goto LA14;
			LA45: ;
			{
				if (!((*e).Kind == ((NU8) 2))) goto LA54;
				indx = skiptypes_230245((*e).Typ, 256);
			}
			goto LA14;
			LA54: ;
			{
				tnode225816* x;
				x = semconstexpr_488503(c, e);
				{
					ttype225852* LOC61;
					if (!((*x).Kind >= ((NU8) 6) && (*x).Kind <= ((NU8) 15))) goto LA59;
					LOC61 = 0;
					LOC61 = skiptypes_230245((*x).Typ, 256);
					indx = makerangetype_291351(c, IL64(0), (NI64)((*x).kindU.S1.Intval - IL64(1)), (*n).Info, LOC61);
				}
				goto LA57;
				LA59: ;
				{
					indx = skiptypes_230245((*x).Typ, 256);
				}
				LA57: ;
			}
			LA14: ;
		}
		LA6: ;
		addsonskipintlit_282572(result, indx);
		{
			if (!((*indx).Kind == ((NU8) 11))) goto LA65;
			indx = lastson_226267(indx);
		}
		LA65: ;
		{
			if (!!(((*indx).Kind == ((NU8) 12) || (*indx).Kind == ((NU8) 59) || (*indx).Kind == ((NU8) 60)))) goto LA69;
			{
				NIM_BOOL LOC73;
				LOC73 = 0;
				LOC73 = isordinaltype_263092(indx);
				if (!!(LOC73)) goto LA74;
				localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
			}
			goto LA71;
			LA74: ;
			{
				NIM_BOOL LOC77;
				LOC77 = 0;
				LOC77 = enumhasholes_263098(indx);
				if (!LOC77) goto LA78;
				localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 146), (*(*(*indx).Sym).Name).S);
			}
			goto LA71;
			LA78: ;
			LA71: ;
		}
		LA69: ;
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[2], NIM_NIL);
		addsonskipintlit_282572(result, base);
	}
	goto LA1;
	LA4: ;
	{
		localerror_197955((*n).Info, ((NU16) 173), ((NimStringDesc*) &TMP2888));
		result = neworprevtype_495130(((NU8) 50), prev, c);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semcontainer_495708)(tcontext290021* c, tnode225816* n, NU8 kind, NimStringDesc* kindstr, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = neworprevtype_495130(kind, prev, c);
	{
		NI LOC3;
		ttype225852* base;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_282572(result, base);
	}
	goto LA1;
	LA4: ;
	{
		ttype225852* LOC7;
		localerror_197955((*n).Info, ((NU16) 172), kindstr);
		LOC7 = 0;
		LOC7 = errortype_291319(c);
		addsonskipintlit_282572(result, LOC7);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semrange_496094)(tcontext290021* c, tnode225816* n_496097, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n_496097);
		if (!(LOC3 == 2)) goto LA4;
		{
			tnode225816* LOC8;
			NIM_BOOL LOC9;
			tnode225816* LOC12;
			tnode225816* n;
			LOC8 = 0;
			LOC8 = HEX5BHEX5D_226698(n_496097, 1);
			LOC9 = 0;
			LOC9 = isrange_262216(LOC8);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_226698(n_496097, 1);
			result = semrangeaux_495954(c, LOC12, prev);
			n = (*result).N;
			{
				NIM_BOOL LOC15;
				LOC15 = 0;
				LOC15 = ((*(*n).kindU.S6.Sons->data[0]).Kind >= ((NU8) 5) && (*(*n).kindU.S6.Sons->data[0]).Kind <= ((NU8) 15));
				if (!(LOC15)) goto LA16;
				LOC15 = (IL64(0) < (*(*n).kindU.S6.Sons->data[0]).kindU.S1.Intval);
				LA16: ;
				if (!LOC15) goto LA17;
				(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
			}
			goto LA13;
			LA17: ;
			{
				NIM_BOOL LOC20;
				LOC20 = 0;
				LOC20 = ((*(*n).kindU.S6.Sons->data[1]).Kind >= ((NU8) 5) && (*(*n).kindU.S6.Sons->data[1]).Kind <= ((NU8) 15));
				if (!(LOC20)) goto LA21;
				LOC20 = ((*(*n).kindU.S6.Sons->data[1]).kindU.S1.Intval < IL64(0));
				LA21: ;
				if (!LOC20) goto LA22;
				(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
			}
			goto LA13;
			LA22: ;
			{
				NIM_BOOL LOC25;
				LOC25 = 0;
				LOC25 = ((*(*n).kindU.S6.Sons->data[0]).Kind >= ((NU8) 16) && (*(*n).kindU.S6.Sons->data[0]).Kind <= ((NU8) 18));
				if (!(LOC25)) goto LA26;
				LOC25 = (0.0 < (*(*n).kindU.S6.Sons->data[0]).kindU.S2.Floatval);
				LA26: ;
				if (!LOC25) goto LA27;
				(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
			}
			goto LA13;
			LA27: ;
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = ((*(*n).kindU.S6.Sons->data[1]).Kind >= ((NU8) 16) && (*(*n).kindU.S6.Sons->data[1]).Kind <= ((NU8) 18));
				if (!(LOC30)) goto LA31;
				LOC30 = ((*(*n).kindU.S6.Sons->data[1]).kindU.S2.Floatval < 0.0);
				LA31: ;
				if (!LOC30) goto LA32;
				(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
			}
			goto LA13;
			LA32: ;
			LA13: ;
		}
		goto LA6;
		LA10: ;
		{
			localerror_197955((*(*n_496097).kindU.S6.Sons->data[0]).Info, ((NU16) 96), ((NimStringDesc*) &TMP2888));
			result = neworprevtype_495130(((NU8) 50), prev, c);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		localerror_197955((*n_496097).Info, ((NU16) 172), ((NimStringDesc*) &TMP2897));
		result = neworprevtype_495130(((NU8) 50), prev, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semset_495665)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = neworprevtype_495130(((NU8) 19), prev, c);
	{
		NI LOC3;
		ttype225852* base;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_282572(result, base);
		{
			if (!((*base).Kind == ((NU8) 11))) goto LA8;
			base = lastson_226267(base);
		}
		LA8: ;
		{
			if (!!(((*base).Kind == ((NU8) 12)))) goto LA12;
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = isordinaltype_263092(base);
				if (!!(LOC16)) goto LA17;
				localerror_197955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
			}
			goto LA14;
			LA17: ;
			{
				NI64 LOC20;
				LOC20 = 0;
				LOC20 = lengthord_263016(base);
				if (!(IL64(65536) < LOC20)) goto LA21;
				localerror_197955((*n).Info, ((NU16) 119), ((NimStringDesc*) &TMP2888));
			}
			goto LA14;
			LA21: ;
			LA14: ;
		}
		LA12: ;
	}
	goto LA1;
	LA4: ;
	{
		ttype225852* LOC24;
		localerror_197955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2898));
		LOC24 = 0;
		LOC24 = errortype_291319(c);
		addsonskipintlit_282572(result, LOC24);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semordinal_496684)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = neworprevtype_495130(((NU8) 15), prev, c);
	{
		NI LOC3;
		ttype225852* base;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		{
			if (!!(((*base).Kind == ((NU8) 12)))) goto LA8;
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = isordinaltype_263092(base);
				if (!!(LOC12)) goto LA13;
				localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
			}
			LA13: ;
		}
		LA8: ;
		addsonskipintlit_282572(result, base);
	}
	goto LA1;
	LA4: ;
	{
		localerror_197955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2899));
		result = neworprevtype_495130(((NU8) 50), prev, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semvarargs_495734)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = neworprevtype_495130(((NU8) 48), prev, c);
	{
		NIM_BOOL LOC3;
		NI LOC4;
		NI LOC6;
		ttype225852* base;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = sonslen_226249(n);
		LOC3 = (LOC4 == 2);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = sonslen_226249(n);
		LOC3 = (LOC6 == 3);
		LA5: ;
		if (!LOC3) goto LA7;
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_282572(result, base);
		{
			NI LOC11;
			tident200021* LOC14;
			LOC11 = 0;
			LOC11 = sonslen_226249(n);
			if (!(LOC11 == 3)) goto LA12;
			LOC14 = 0;
			LOC14 = considerquotedident_295010((*n).kindU.S6.Sons->data[2]);
			asgnRefNoCycle((void**) (&(*result).N), newidentnode_226125(LOC14, (*(*n).kindU.S6.Sons->data[2]).Info));
		}
		LA12: ;
	}
	goto LA1;
	LA7: ;
	{
		ttype225852* LOC16;
		localerror_197955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2901));
		LOC16 = 0;
		LOC16 = errortype_291319(c);
		addsonskipintlit_282572(result, LOC16);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semgenericparamininvokation_502540)(tcontext290021* c, tnode225816* n) {
	ttype225852* result;
	result = 0;
	result = semtypenode_487269(c, n, NIM_NIL);
	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(ttype225852*, instgenericcontainer_490657)(tcontext290021* c, tlineinfo195539 info, ttype225852* header, NIM_BOOL allowmetatypes) {
	ttype225852* result;
	trepltypevars317786 cl;
	result = 0;
	memset((void*)(&cl), 0, sizeof(cl));
	initidtable_226167((&cl.Symmap));
	initidtable_226167((&cl.Typemap));
	initidtable_226167((&cl.Localcache));
	cl.Info = info;
	cl.C = c;
	cl.Allowmetatypes = allowmetatypes;
	result = replacetypevarst_317834((&cl), header);
	return result;
}

N_NIMCALL(ttype225852*, semgeneric_502548)(tcontext290021* c, tnode225816* n, tsym225846* s, ttype225852* prev) {
	ttype225852* result;
	ttype225852* t;
	result = 0;
	{
		TY169969 LOC5;
		NimStringDesc* LOC6;
		NimStringDesc* LOC7;
		if (!((*s).Typ == NIM_NIL)) goto LA3;
		memset((void*)LOC5, 0, sizeof(LOC5));
		LOC5[0] = copyString((*(*s).Name).S);
		LOC6 = 0;
		LOC6 = copyStr(reprEnum((*s).Kind, (&NTI225445)), 2);
		LOC5[1] = nsuToLowerStr(LOC6);
		LOC7 = 0;
		LOC7 = nsuFormatOpenArray(((NimStringDesc*) &TMP2902), LOC5, 2);
		localerror_197966((*n).Info, LOC7);
		result = neworprevtype_495130(((NU8) 50), prev, c);
		goto BeforeRet;
	}
	LA3: ;
	t = (*s).Typ;
	{
		NIM_BOOL LOC10;
		ttype225852* LOC12;
		LOC10 = 0;
		LOC10 = ((*t).Kind == ((NU8) 54));
		if (!(LOC10)) goto LA11;
		LOC12 = 0;
		LOC12 = base_263038(t);
		LOC10 = ((*LOC12).Kind == ((NU8) 10));
		LA11: ;
		if (!LOC10) goto LA13;
		t = base_263038(t);
	}
	LA13: ;
	result = neworprevtype_495130(((NU8) 9), prev, c);
	addsonskipintlit_282572(result, t);
	{
		if (!((*t).Kind == ((NU8) 30))) goto LA17;
		{
			NI i_502629;
			NI HEX3Atmp_502754;
			NI LOC20;
			NI res_502757;
			i_502629 = 0;
			HEX3Atmp_502754 = 0;
			LOC20 = 0;
			LOC20 = sonslen_226249(n);
			HEX3Atmp_502754 = (NI32)(LOC20 - 1);
			res_502757 = 1;
			{
				while (1) {
					ttype225852* elem;
					if (!(res_502757 <= HEX3Atmp_502754)) goto LA22;
					i_502629 = res_502757;
					elem = semgenericparamininvokation_502540(c, (*n).kindU.S6.Sons->data[i_502629]);
					{
						if (!elem == 0) goto LA25;
						{
							NimStringDesc* LOC31;
							if (!NIM_TRUE) goto LA29;
							LOC31 = 0;
							LOC31 = HEX24_198126(TMP2903);
							internalerror_198006(LOC31);
						}
						LA29: ;
						rawaddson_230562(result, elem);
					}
					goto LA23;
					LA25: ;
					{
						addsonskipintlit_282572(result, elem);
					}
					LA23: ;
					res_502757 += 1;
				} LA22: ;
			}
		}
		goto BeforeRet;
	}
	goto LA15;
	LA17: ;
	{
		if (!!(((*t).Kind == ((NU8) 10)))) goto LA34;
		localerror_197955((*n).Info, ((NU16) 156), (*(*s).Name).S);
		result = neworprevtype_495130(((NU8) 50), prev, c);
		goto BeforeRet;
	}
	goto LA15;
	LA34: ;
	{
		tcandidate405209 m;
		tnode225816* LOC37;
		NIM_BOOL isconcrete;
		memset((void*)(&m), 0, sizeof(m));
		chckNil((void*)(&m));
		memset((void*)(&m), 0, sizeof(m));
		newcandidate_405637(c, t, (&m));
		LOC37 = 0;
		LOC37 = copytree_226329(n);
		matches_414382(c, n, LOC37, (&m));
		{
			NimStringDesc* err;
			NimStringDesc* LOC42;
			NimStringDesc* LOC43;
			NimStringDesc* LOC44;
			NimStringDesc* LOC45;
			if (!!((m.State == ((NU8) 1)))) goto LA40;
			LOC42 = 0;
			LOC43 = 0;
			LOC43 = typetostring_263031(t, ((NU8) 0));
			LOC44 = 0;
			LOC44 = describeargs_406200(c, n, 1, ((NU8) 0));
			LOC45 = 0;
			LOC45 = describeargs_406200(c, (*t).N, 0, ((NU8) 0));
			LOC42 = rawNewString(LOC43->Sup.len + LOC44->Sup.len + LOC45->Sup.len + 44);
appendString(LOC42, ((NimStringDesc*) &TMP2904));
appendString(LOC42, LOC43);
appendString(LOC42, ((NimStringDesc*) &TMP2905));
appendString(LOC42, LOC44);
appendString(LOC42, ((NimStringDesc*) &TMP2909));
appendString(LOC42, LOC45);
appendString(LOC42, ((NimStringDesc*) &TMP2910));
			err = LOC42;
			localerror_197955((*n).Info, ((NU16) 4), err);
			result = neworprevtype_495130(((NU8) 50), prev, c);
			goto BeforeRet;
		}
		LA40: ;
		isconcrete = NIM_TRUE;
		{
			NI i_502706;
			NI HEX3Atmp_502760;
			NI LOC47;
			NI res_502763;
			i_502706 = 0;
			HEX3Atmp_502760 = 0;
			LOC47 = 0;
			LOC47 = len_226364(m.Call);
			HEX3Atmp_502760 = (LOC47 - 1);
			res_502763 = 1;
			{
				while (1) {
					ttype225852* typ;
					tnode225816* LOC50;
					if (!(res_502763 <= HEX3Atmp_502760)) goto LA49;
					i_502706 = res_502763;
					LOC50 = 0;
					LOC50 = HEX5BHEX5D_226698(m.Call, i_502706);
					typ = skiptypes_230245((*LOC50).Typ, 256);
					{
						NIM_BOOL LOC53;
						LOC53 = 0;
						LOC53 = containsgenerictype_272929(typ);
						if (!LOC53) goto LA54;
						isconcrete = NIM_FALSE;
					}
					LA54: ;
					{
						if (!typ == 0) goto LA58;
						{
							NimStringDesc* LOC64;
							if (!NIM_TRUE) goto LA62;
							LOC64 = 0;
							LOC64 = HEX24_198126(TMP2903);
							internalerror_198006(LOC64);
						}
						LA62: ;
						rawaddson_230562(result, typ);
					}
					goto LA56;
					LA58: ;
					{
						addsonskipintlit_282572(result, typ);
					}
					LA56: ;
					res_502763 += 1;
				} LA49: ;
			}
		}
		{
			if (!isconcrete) goto LA68;
			{
				NIM_BOOL LOC72;
				LOC72 = 0;
				LOC72 = ((*s).Ast == NIM_NIL);
				if (!(LOC72)) goto LA73;
				LOC72 = !(((*(*s).Typ).Kind == ((NU8) 54)));
				LA73: ;
				if (!LOC72) goto LA74;
				localerror_197955((*n).Info, ((NU16) 124), (*(*s).Name).S);
				result = neworprevtype_495130(((NU8) 50), prev, c);
			}
			goto LA70;
			LA74: ;
			{
				result = instgenericcontainer_490657(c, (*n).Info, result, NIM_FALSE);
			}
			LA70: ;
		}
		LA68: ;
	}
	LA15: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, symchoice_504476)(tcontext290021* c, tnode225816* n, tsym225846* s, NU8 r) {
	tnode225816* result;
	tsym225846* a;
	toverloaditer295491 o;
	NI i;
	result = 0;
	a = 0;
	memset((void*)(&o), 0, sizeof(o));
	i = 0;
	a = initoverloaditer_296665((&o), c, n);
	{
		while (1) {
			if (!!((a == NIM_NIL))) goto LA2;
			a = nextoverloaditer_297032((&o), c, n);
			i += 1;
			{
				if (!(1 < i)) goto LA5;
				goto LA1;
			}
			LA5: ;
		} LA2: ;
	} LA1: ;
	{
		NIM_BOOL LOC9;
		LOC9 = 0;
		LOC9 = (i <= 1);
		if (!(LOC9)) goto LA10;
		LOC9 = !((r == ((NU8) 2)));
		LA10: ;
		if (!LOC9) goto LA11;
		result = newsymnode_227755(s, (*n).Info);
		markused_405251((*n).Info, s);
	}
	goto LA7;
	LA11: ;
	{
		NU8 kind;
		ttype225852* LOC21;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = (r == ((NU8) 0));
			if (LOC16) goto LA17;
			LOC16 = ((*n).Kind == ((NU8) 45));
			LA17: ;
			if (!LOC16) goto LA18;
			kind = ((NU8) 56);
		}
		goto LA14;
		LA18: ;
		{
			kind = ((NU8) 57);
		}
		LA14: ;
		LOC21 = 0;
		LOC21 = newtypes_290214(((NU8) 0), c);
		result = newnodeit_226145(kind, (*n).Info, LOC21);
		a = initoverloaditer_296665((&o), c, n);
		{
			while (1) {
				tnode225816* LOC24;
				if (!!((a == NIM_NIL))) goto LA23;
				(*a).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				LOC24 = 0;
				LOC24 = newsymnode_227755(a, (*n).Info);
				addson_226287(result, LOC24);
				a = nextoverloaditer_297032((&o), c, n);
			} LA23: ;
		}
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode225816*, semtemplateexpr_488055)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags) {
	tnode225816* result;
	tsym225846* LOC1;
	result = 0;
	markused_405251((*n).Info, s);
	pushinfocontext_196930((*n).Info);
	LOC1 = 0;
	LOC1 = getcurrowner_290256();
	result = evaltemplate_455334(n, s, LOC1);
	{
		if (!!(((flags &(1<<((((NU8) 8))&15)))!=0))) goto LA4;
		result = semaftermacrocall_494770(c, result, s, flags);
	}
	LA4: ;
	popinfocontext_196957();
	return result;
}

N_NIMCALL(tnode225816*, semgenericstmtsymbol_510258)(tcontext290021* c, tnode225816* n, tsym225846* s, intset222056* ctx) {
	tnode225816* result;
	result = 0;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
	switch ((*s).Kind) {
	case ((NU8) 0):
	{
		result = n;
	}
	break;
	case ((NU8) 12):
	case ((NU8) 13):
	case ((NU8) 14):
	case ((NU8) 16):
	case ((NU8) 15):
	{
		result = symchoice_504476(c, n, s, ((NU8) 1));
	}
	break;
	case ((NU8) 18):
	{
		{
			NIM_BOOL LOC6;
			NIM_BOOL LOC8;
			NI LOC9;
			LOC6 = 0;
			LOC6 = ((393216 &(1<<(((*s).Kind)&31)))!=0);
			if (!(LOC6)) goto LA7;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = len_230005((*s).Typ);
			LOC8 = (LOC9 == 1);
			if (LOC8) goto LA10;
			LOC8 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
			LA10: ;
			LOC6 = LOC8;
			LA7: ;
			if (!LOC6) goto LA11;
			result = semtemplateexpr_488055(c, n, s, 256);
			result = semgenericstmt_495120(c, result, 0, ctx);
		}
		goto LA4;
		LA11: ;
		{
			result = symchoice_504476(c, n, s, ((NU8) 1));
		}
		LA4: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			NIM_BOOL LOC17;
			NIM_BOOL LOC19;
			NI LOC20;
			LOC17 = 0;
			LOC17 = ((393216 &(1<<(((*s).Kind)&31)))!=0);
			if (!(LOC17)) goto LA18;
			LOC19 = 0;
			LOC20 = 0;
			LOC20 = len_230005((*s).Typ);
			LOC19 = (LOC20 == 1);
			if (LOC19) goto LA21;
			LOC19 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
			LA21: ;
			LOC17 = LOC19;
			LA18: ;
			if (!LOC17) goto LA22;
			result = semmacroexpr_488066(c, n, n, s, 256);
			result = semgenericstmt_495120(c, result, 0, ctx);
		}
		goto LA15;
		LA22: ;
		{
			result = symchoice_504476(c, n, s, ((NU8) 1));
		}
		LA15: ;
	}
	break;
	case ((NU8) 4):
	{
		result = newsymnodetypedesc_307153(s, (*n).Info);
	}
	break;
	case ((NU8) 3):
	{
		result = n;
	}
	break;
	case ((NU8) 7):
	{
		{
			NIM_BOOL LOC30;
			LOC30 = 0;
			LOC30 = !(((*s).Typ == NIM_NIL));
			if (!(LOC30)) goto LA31;
			LOC30 = !(((*(*s).Typ).Kind == ((NU8) 12)));
			LA31: ;
			if (!LOC30) goto LA32;
			result = newsymnodetypedesc_307153(s, (*n).Info);
		}
		goto LA28;
		LA32: ;
		{
			result = n;
		}
		LA28: ;
	}
	break;
	default:
	{
		result = newsymnode_227755(s, (*n).Info);
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, lookup_511404)(tcontext290021* c, tnode225816* n, NU8 flags, intset222056* ctx) {
	tnode225816* result;
	tident200021* ident;
	tsym225846* s;
	tsym225846* LOC1;
	result = 0;
	result = n;
	ident = considerquotedident_295010(n);
	LOC1 = 0;
	LOC1 = searchinscopes_295312(c, ident);
	s = skipalias_295255(LOC1, n);
	{
		if (!(s == NIM_NIL)) goto LA4;
		{
			NIM_BOOL LOC8;
			NIM_BOOL LOC9;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = contains_222837((*ctx), (*ident).Sup.Id);
			LOC8 = !(LOC9);
			if (!(LOC8)) goto LA10;
			LOC8 = !(((flags &(1<<((((NU8) 2))&7)))!=0));
			LA10: ;
			if (!LOC8) goto LA11;
			localerror_197955((*n).Info, ((NU16) 61), (*ident).S);
		}
		LA11: ;
	}
	goto LA2;
	LA4: ;
	{
		{
			if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA16;
			result = symchoice_504476(c, n, s, ((NU8) 0));
		}
		goto LA14;
		LA16: ;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = contains_222837((*ctx), (*(*s).Name).Sup.Id);
			if (!LOC19) goto LA20;
			result = symchoice_504476(c, n, s, ((NU8) 2));
		}
		goto LA14;
		LA20: ;
		{
			result = semgenericstmtsymbol_510258(c, n, s, ctx);
		}
		LA14: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(tnode225816*, newdot_511460)(tnode225816* n, tnode225816* b) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(((NU8) 45), (*n).Info);
	add_226498(result, (*n).kindU.S6.Sons->data[0]);
	add_226498(result, b);
	return result;
}

N_NIMCALL(tnode225816*, fuzzylookup_511482)(tcontext290021* c, tnode225816* n_511485, NU8 flags, intset222056* ctx, NIM_BOOL* ismacro) {
	tnode225816* result;
	NU8 luf;
	tsym225846* s_511618;
	result = 0;
	{
		if (!!(((flags &(1<<((((NU8) 2))&7)))!=0))) goto LA3;
		luf = 2;
	}
	goto LA1;
	LA3: ;
	{
		luf = 0;
	}
	LA1: ;
	s_511618 = qualifiedlookup_296122(c, n_511485, luf);
	{
		if (!!((s_511618 == NIM_NIL))) goto LA8;
		result = semgenericstmtsymbol_510258(c, n_511485, s_511618, ctx);
	}
	goto LA6;
	LA8: ;
	{
		tnode225816* n;
		tident200021* ident;
		tsym225846* s;
		tsym225846* LOC11;
		asgnRefNoCycle((void**) (&(*n_511485).kindU.S6.Sons->data[0]), semgenericstmt_495120(c, (*n_511485).kindU.S6.Sons->data[0], flags, ctx));
		result = n_511485;
		n = HEX5BHEX5D_226698(n_511485, 1);
		ident = considerquotedident_295010(n);
		LOC11 = 0;
		LOC11 = searchinscopes_295312(c, ident);
		s = skipalias_295255(LOC11, n);
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = !((s == NIM_NIL));
			if (!(LOC14)) goto LA15;
			LOC14 = ((520192 &(1<<(((*s).Kind)&31)))!=0);
			LA15: ;
			if (!LOC14) goto LA16;
			(*ismacro) = ((393216 &(1<<(((*s).Kind)&31)))!=0);
			{
				tnode225816* LOC22;
				if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA20;
				LOC22 = 0;
				LOC22 = symchoice_504476(c, n, s, ((NU8) 0));
				result = newdot_511460(result, LOC22);
			}
			goto LA18;
			LA20: ;
			{
				NIM_BOOL LOC24;
				tnode225816* LOC27;
				LOC24 = 0;
				LOC24 = contains_222837((*ctx), (*(*s).Name).Sup.Id);
				if (!LOC24) goto LA25;
				LOC27 = 0;
				LOC27 = symchoice_504476(c, n, s, ((NU8) 2));
				result = newdot_511460(result, LOC27);
			}
			goto LA18;
			LA25: ;
			{
				tnode225816* sym;
				sym = semgenericstmtsymbol_510258(c, n, s, ctx);
				{
					tnode225816* LOC33;
					if (!((*sym).Kind == ((NU8) 3))) goto LA31;
					LOC33 = 0;
					LOC33 = symchoice_504476(c, n, s, ((NU8) 2));
					result = newdot_511460(result, LOC33);
				}
				goto LA29;
				LA31: ;
				{
					result = newdot_511460(result, sym);
				}
				LA29: ;
			}
			LA18: ;
		}
		LA16: ;
	}
	LA6: ;
	return result;
}

N_NIMCALL(tnode225816*, semmixinstmt_504740)(tcontext290021* c, tnode225816* n, intset222056* tomixin) {
	tnode225816* result;
	result = 0;
	{
		NI i_504768;
		NI HEX3Atmp_504784;
		NI LOC2;
		NI res_504787;
		i_504768 = 0;
		HEX3Atmp_504784 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_504784 = (LOC2 - 1);
		res_504787 = 0;
		{
			while (1) {
				tident200021* LOC5;
				if (!(res_504787 <= HEX3Atmp_504784)) goto LA4;
				i_504768 = res_504787;
				LOC5 = 0;
				LOC5 = considerquotedident_295010((*n).kindU.S6.Sons->data[i_504768]);
				incl_222869(tomixin, (*LOC5).Sup.Id);
				res_504787 += 1;
			} LA4: ;
		}
	}
	result = newnodei_226138(((NU8) 1), (*n).Info);
	return result;
}

N_NIMCALL(tnode225816*, semgenericstmtscope_510240)(tcontext290021* c, tnode225816* n, NU8 flags, intset222056* ctx) {
	tnode225816* result;
	tscope225840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	result = semgenericstmt_495120(c, n, flags, ctx);
	closescope_295211(c);
	return result;
}

N_NIMCALL(tsym225846*, newsyms_487918)(NU8 kind, tnode225816* n, tcontext290021* c) {
	tsym225846* result;
	tident200021* LOC1;
	tsym225846* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = considerquotedident_295010(n);
	LOC2 = 0;
	LOC2 = getcurrowner_290256();
	result = newsym_226074(kind, LOC1, LOC2, (*n).Info);
	return result;
}

N_NIMCALL(tnode225816*, getidentnode_510205)(tnode225816* n) {
	tnode225816* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 31):
	{
		result = getidentnode_510205((*n).kindU.S6.Sons->data[1]);
	}
	break;
	case ((NU8) 43):
	{
		result = getidentnode_510205((*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 2):
	case ((NU8) 53):
	case ((NU8) 3):
	{
		result = n;
	}
	break;
	default:
	{
		illformedast_291406(n);
		result = n;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, addtempdecl_511737)(tcontext290021* c, tnode225816* n, NU8 kind) {
	tsym225846* s;
	tnode225816* LOC1;
	LOC1 = 0;
	LOC1 = getidentnode_510205(n);
	s = newsyms_487918(((NU8) 0), LOC1, c);
	addprelimdecl_295704(c, s);
}

N_NIMCALL(tnode225816*, semgenericstmt_495120)(tcontext290021* c, tnode225816* n, NU8 flags_495124, intset222056* ctx) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		if (!(gcmd_169120 == ((NU8) 14))) goto LA3;
		suggeststmt_421299(c, n);
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		result = lookup_511404(c, n, flags_495124, ctx);
	}
	break;
	case ((NU8) 45):
	{
		NIM_BOOL dummy;
		dummy = 0;
		result = fuzzylookup_511482(c, n, flags_495124, ctx, (&dummy));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 55):
	{
		result = semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[0], (flags_495124 | 1), ctx);
	}
	break;
	case ((NU8) 123):
	{
		result = semmixinstmt_504740(c, n, ctx);
	}
	break;
	case ((NU8) 27):
	case ((NU8) 32):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		tnode225816* fn;
		tsym225846* s;
		NI first;
		NIM_BOOL mixincontext;
		NU8 flags;
		checkminsonslen_291426(n, 1);
		fn = (*n).kindU.S6.Sons->data[0];
		s = qualifiedlookup_296122(c, fn, 0);
		{
			NIM_BOOL LOC13;
			NIM_BOOL LOC14;
			NIM_BOOL LOC15;
			tident200021* LOC19;
			NIM_BOOL LOC20;
			NimStringDesc* LOC23;
			LOC13 = 0;
			LOC14 = 0;
			LOC15 = 0;
			LOC15 = (s == NIM_NIL);
			if (!(LOC15)) goto LA16;
			LOC15 = !(((flags_495124 &(1<<((((NU8) 2))&7)))!=0));
			LA16: ;
			LOC14 = LOC15;
			if (!(LOC14)) goto LA17;
			LOC14 = ((*fn).Kind == ((NU8) 2) || (*fn).Kind == ((NU8) 53));
			LA17: ;
			LOC13 = LOC14;
			if (!(LOC13)) goto LA18;
			LOC19 = 0;
			LOC19 = considerquotedident_295010(fn);
			LOC20 = 0;
			LOC20 = contains_222837((*ctx), (*LOC19).Sup.Id);
			LOC13 = !(LOC20);
			LA18: ;
			if (!LOC13) goto LA21;
			LOC23 = 0;
			LOC23 = rendertree_250058(fn, 0);
			localerror_197955((*n).Info, ((NU16) 61), LOC23);
		}
		LA21: ;
		first = 0;
		mixincontext = NIM_FALSE;
		{
			NU8 scoption;
			if (!!((s == NIM_NIL))) goto LA26;
			(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
			mixincontext = ((*s).Magic == ((NU16) 1) || (*s).Magic == ((NU16) 2) || (*s).Magic == ((NU16) 3));
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = contains_222837((*ctx), (*(*s).Name).Sup.Id);
				if (!LOC30) goto LA31;
				scoption = ((NU8) 2);
			}
			goto LA28;
			LA31: ;
			{
				scoption = ((NU8) 1);
			}
			LA28: ;
			switch ((*s).Kind) {
			case ((NU8) 17):
			{
				{
					NIM_BOOL LOC37;
					NIM_BOOL LOC39;
					NI LOC40;
					LOC37 = 0;
					LOC37 = ((393216 &(1<<(((*s).Kind)&31)))!=0);
					if (!(LOC37)) goto LA38;
					LOC39 = 0;
					LOC40 = 0;
					LOC40 = len_230005((*s).Typ);
					LOC39 = (LOC40 == 1);
					if (LOC39) goto LA41;
					LOC39 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
					LA41: ;
					LOC37 = LOC39;
					LA38: ;
					if (!LOC37) goto LA42;
					result = semmacroexpr_488066(c, n, n, s, 256);
					result = semgenericstmt_495120(c, result, 0, ctx);
				}
				goto LA35;
				LA42: ;
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), symchoice_504476(c, fn, s, scoption));
					result = n;
				}
				LA35: ;
				mixincontext = NIM_TRUE;
			}
			break;
			case ((NU8) 18):
			{
				{
					NIM_BOOL LOC48;
					NIM_BOOL LOC50;
					NI LOC51;
					LOC48 = 0;
					LOC48 = ((393216 &(1<<(((*s).Kind)&31)))!=0);
					if (!(LOC48)) goto LA49;
					LOC50 = 0;
					LOC51 = 0;
					LOC51 = len_230005((*s).Typ);
					LOC50 = (LOC51 == 1);
					if (LOC50) goto LA52;
					LOC50 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
					LA52: ;
					LOC48 = LOC50;
					LA49: ;
					if (!LOC48) goto LA53;
					result = semtemplateexpr_488055(c, n, s, 256);
					result = semgenericstmt_495120(c, result, 0, ctx);
				}
				goto LA46;
				LA53: ;
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), symchoice_504476(c, fn, s, scoption));
					result = n;
				}
				LA46: ;
				mixincontext = NIM_TRUE;
			}
			break;
			case ((NU8) 0):
			case ((NU8) 3):
			{
			}
			break;
			case ((NU8) 12):
			case ((NU8) 13):
			case ((NU8) 14):
			case ((NU8) 16):
			case ((NU8) 15):
			{
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), symchoice_504476(c, fn, s, scoption));
				first = 1;
			}
			break;
			case ((NU8) 4):
			{
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnodetypedesc_307153(s, (*fn).Info));
				first = 1;
			}
			break;
			case ((NU8) 7):
			{
				{
					NIM_BOOL LOC62;
					LOC62 = 0;
					LOC62 = !(((*s).Typ == NIM_NIL));
					if (!(LOC62)) goto LA63;
					LOC62 = !(((*(*s).Typ).Kind == ((NU8) 12)));
					LA63: ;
					if (!LOC62) goto LA64;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnodetypedesc_307153(s, (*fn).Info));
					first = 1;
				}
				LA64: ;
			}
			break;
			default:
			{
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227755(s, (*fn).Info));
				first = 1;
			}
			break;
			}
		}
		goto LA24;
		LA26: ;
		{
			if (!((*fn).Kind == ((NU8) 45))) goto LA68;
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), fuzzylookup_511482(c, fn, flags_495124, ctx, (&mixincontext)));
			first = 1;
		}
		goto LA24;
		LA68: ;
		LA24: ;
		{
			if (!mixincontext) goto LA72;
			flags = (flags_495124 | 4);
		}
		goto LA70;
		LA72: ;
		{
			flags = flags_495124;
		}
		LA70: ;
		{
			NI i_512856;
			NI HEX3Atmp_514790;
			NI LOC76;
			NI res_514793;
			i_512856 = 0;
			HEX3Atmp_514790 = 0;
			LOC76 = 0;
			LOC76 = sonslen_226249(result);
			HEX3Atmp_514790 = (NI32)(LOC76 - 1);
			res_514793 = first;
			{
				while (1) {
					if (!(res_514793 <= HEX3Atmp_514790)) goto LA78;
					i_512856 = res_514793;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_512856]), semgenericstmt_495120(c, (*result).kindU.S6.Sons->data[i_512856], flags, ctx));
					res_514793 += 1;
				} LA78: ;
			}
		}
	}
	break;
	case ((NU8) 92):
	{
		{
			NI i_512897;
			NI HEX3Atmp_514796;
			NI LOC81;
			NI res_514799;
			i_512897 = 0;
			HEX3Atmp_514796 = 0;
			LOC81 = 0;
			LOC81 = sonslen_226249(n);
			HEX3Atmp_514796 = (NI32)(LOC81 - 1);
			res_514799 = 0;
			{
				while (1) {
					if (!(res_514799 <= HEX3Atmp_514796)) goto LA83;
					i_512897 = res_514799;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_512897]), semgenericstmtscope_510240(c, (*n).kindU.S6.Sons->data[i_512897], flags_495124, ctx));
					res_514799 += 1;
				} LA83: ;
			}
		}
	}
	break;
	case ((NU8) 93):
	{
		{
			NI i_512938;
			NI HEX3Atmp_514802;
			NI LOC86;
			NI res_514805;
			i_512938 = 0;
			HEX3Atmp_514802 = 0;
			LOC86 = 0;
			LOC86 = sonslen_226249(n);
			HEX3Atmp_514802 = (NI32)(LOC86 - 1);
			res_514805 = 0;
			{
				while (1) {
					if (!(res_514805 <= HEX3Atmp_514802)) goto LA88;
					i_512938 = res_514805;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_512938]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[i_512938], (flags_495124 | 4), ctx));
					res_514805 += 1;
				} LA88: ;
			}
		}
	}
	break;
	case ((NU8) 96):
	{
		tscope225840* LOC90;
		LOC90 = 0;
		LOC90 = openscope_295191(c);
		{
			NI i_512997;
			NI HEX3Atmp_514808;
			NI LOC92;
			NI res_514811;
			i_512997 = 0;
			HEX3Atmp_514808 = 0;
			LOC92 = 0;
			LOC92 = sonslen_226249(n);
			HEX3Atmp_514808 = (NI32)(LOC92 - 1);
			res_514811 = 0;
			{
				while (1) {
					if (!(res_514811 <= HEX3Atmp_514808)) goto LA94;
					i_512997 = res_514811;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_512997]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[i_512997], flags_495124, ctx));
					res_514811 += 1;
				} LA94: ;
			}
		}
		closescope_295211(c);
	}
	break;
	case ((NU8) 97):
	{
		tscope225840* LOC96;
		LOC96 = 0;
		LOC96 = openscope_295191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[0], flags_495124, ctx));
		{
			NI i_513066;
			NI HEX3Atmp_514820;
			NI LOC98;
			NI res_514823;
			i_513066 = 0;
			HEX3Atmp_514820 = 0;
			LOC98 = 0;
			LOC98 = sonslen_226249(n);
			HEX3Atmp_514820 = (NI32)(LOC98 - 1);
			res_514823 = 1;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_514823 <= HEX3Atmp_514820)) goto LA100;
					i_513066 = res_514823;
					a = (*n).kindU.S6.Sons->data[i_513066];
					checkminsonslen_291426(a, 1);
					l = sonslen_226249(a);
					{
						NI j_513095;
						NI HEX3Atmp_514815;
						NI res_514818;
						j_513095 = 0;
						HEX3Atmp_514815 = 0;
						HEX3Atmp_514815 = (NI32)(l - 2);
						res_514818 = 0;
						{
							while (1) {
								if (!(res_514818 <= HEX3Atmp_514815)) goto LA103;
								j_513095 = res_514818;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_513095]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[j_513095], flags_495124, ctx));
								res_514818 += 1;
							} LA103: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semgenericstmtscope_510240(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)], flags_495124, ctx));
					res_514823 += 1;
				} LA100: ;
			}
		}
		closescope_295211(c);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		NI l;
		tscope225840* LOC105;
		l = sonslen_226249(n);
		LOC105 = 0;
		LOC105 = openscope_295191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(l - 2)]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[(NI32)(l - 2)], flags_495124, ctx));
		{
			NI i_513193;
			NI HEX3Atmp_514826;
			NI res_514829;
			i_513193 = 0;
			HEX3Atmp_514826 = 0;
			HEX3Atmp_514826 = (NI32)(l - 3);
			res_514829 = 0;
			{
				while (1) {
					if (!(res_514829 <= HEX3Atmp_514826)) goto LA108;
					i_513193 = res_514829;
					addtempdecl_511737(c, (*n).kindU.S6.Sons->data[i_513193], ((NU8) 21));
					res_514829 += 1;
				} LA108: ;
			}
		}
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(l - 1)]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[(NI32)(l - 1)], flags_495124, ctx));
		closescope_295211(c);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	case ((NU8) 129):
	{
		tscope225840* LOC110;
		checksonslen_291416(n, 2);
		LOC110 = 0;
		LOC110 = openscope_295191(c);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA113;
			addtempdecl_511737(c, (*n).kindU.S6.Sons->data[0], ((NU8) 22));
		}
		LA113: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[1], flags_495124, ctx));
		closescope_295211(c);
	}
	break;
	case ((NU8) 106):
	{
		checkminsonslen_291426(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmtscope_510240(c, (*n).kindU.S6.Sons->data[0], flags_495124, ctx));
		{
			NI i_513341;
			NI HEX3Atmp_514838;
			NI LOC117;
			NI res_514841;
			i_513341 = 0;
			HEX3Atmp_514838 = 0;
			LOC117 = 0;
			LOC117 = sonslen_226249(n);
			HEX3Atmp_514838 = (NI32)(LOC117 - 1);
			res_514841 = 1;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_514841 <= HEX3Atmp_514838)) goto LA119;
					i_513341 = res_514841;
					a = (*n).kindU.S6.Sons->data[i_513341];
					checkminsonslen_291426(a, 1);
					l = sonslen_226249(a);
					{
						NI j_513370;
						NI HEX3Atmp_514833;
						NI res_514836;
						j_513370 = 0;
						HEX3Atmp_514833 = 0;
						HEX3Atmp_514833 = (NI32)(l - 2);
						res_514836 = 0;
						{
							while (1) {
								if (!(res_514836 <= HEX3Atmp_514833)) goto LA122;
								j_513370 = res_514836;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_513370]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[j_513370], (flags_495124 | 2), ctx));
								res_514836 += 1;
							} LA122: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semgenericstmtscope_510240(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)], flags_495124, ctx));
					res_514841 += 1;
				} LA119: ;
			}
		}
	}
	break;
	case ((NU8) 99):
	case ((NU8) 100):
	{
		{
			NI i_513457;
			NI HEX3Atmp_514851;
			NI LOC125;
			NI res_514854;
			i_513457 = 0;
			HEX3Atmp_514851 = 0;
			LOC125 = 0;
			LOC125 = sonslen_226249(n);
			HEX3Atmp_514851 = (NI32)(LOC125 - 1);
			res_514854 = 0;
			{
				while (1) {
					if (!(res_514854 <= HEX3Atmp_514851)) goto LA127;
					i_513457 = res_514854;
					{
						tnode225816* a;
						NI l;
						a = (*n).kindU.S6.Sons->data[i_513457];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA131;
							goto LA128;
						}
						LA131: ;
						{
							NIM_BOOL LOC135;
							LOC135 = 0;
							LOC135 = !(((*a).Kind == ((NU8) 35)));
							if (!(LOC135)) goto LA136;
							LOC135 = !(((*a).Kind == ((NU8) 36)));
							LA136: ;
							if (!LOC135) goto LA137;
							illformedast_291406(a);
						}
						LA137: ;
						checkminsonslen_291426(a, 3);
						l = sonslen_226249(a);
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 2)]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[(NI32)(l - 2)], (flags_495124 | 2), ctx));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)], flags_495124, ctx));
						{
							NI j_513587;
							NI HEX3Atmp_514846;
							NI res_514849;
							j_513587 = 0;
							HEX3Atmp_514846 = 0;
							HEX3Atmp_514846 = (NI32)(l - 3);
							res_514849 = 0;
							{
								while (1) {
									tnode225816* LOC142;
									if (!(res_514849 <= HEX3Atmp_514846)) goto LA141;
									j_513587 = res_514849;
									LOC142 = 0;
									LOC142 = getidentnode_510205((*a).kindU.S6.Sons->data[j_513587]);
									addtempdecl_511737(c, LOC142, ((NU8) 8));
									res_514849 += 1;
								} LA141: ;
							}
						}
					} LA128: ;
					res_514854 += 1;
				} LA127: ;
			}
		}
	}
	break;
	case ((NU8) 75):
	{
		{
			NI i_513614;
			NI HEX3Atmp_514863;
			NI LOC145;
			NI res_514866;
			i_513614 = 0;
			HEX3Atmp_514863 = 0;
			LOC145 = 0;
			LOC145 = sonslen_226249(n);
			HEX3Atmp_514863 = (NI32)(LOC145 - 1);
			res_514866 = 0;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_514866 <= HEX3Atmp_514863)) goto LA147;
					i_513614 = res_514866;
					a = (*n).kindU.S6.Sons->data[i_513614];
					{
						if (!!(((*a).Kind == ((NU8) 35)))) goto LA150;
						illformedast_291406(a);
					}
					LA150: ;
					checkminsonslen_291426(a, 3);
					l = sonslen_226249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 2)]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[(NI32)(l - 2)], (flags_495124 | 2), ctx));
					{
						NI j_513698;
						NI HEX3Atmp_514858;
						NI res_514861;
						j_513698 = 0;
						HEX3Atmp_514858 = 0;
						HEX3Atmp_514858 = (NI32)(l - 3);
						res_514861 = 0;
						{
							while (1) {
								tnode225816* LOC155;
								if (!(res_514861 <= HEX3Atmp_514858)) goto LA154;
								j_513698 = res_514861;
								LOC155 = 0;
								LOC155 = getidentnode_510205((*a).kindU.S6.Sons->data[j_513698]);
								addtempdecl_511737(c, LOC155, ((NU8) 7));
								res_514861 += 1;
							} LA154: ;
						}
					}
					res_514866 += 1;
				} LA147: ;
			}
		}
	}
	break;
	case ((NU8) 101):
	{
		{
			NI i_513725;
			NI HEX3Atmp_514870;
			NI LOC158;
			NI res_514873;
			i_513725 = 0;
			HEX3Atmp_514870 = 0;
			LOC158 = 0;
			LOC158 = sonslen_226249(n);
			HEX3Atmp_514870 = (NI32)(LOC158 - 1);
			res_514873 = 0;
			{
				while (1) {
					if (!(res_514873 <= HEX3Atmp_514870)) goto LA160;
					i_513725 = res_514873;
					{
						tnode225816* a;
						tnode225816* LOC170;
						a = (*n).kindU.S6.Sons->data[i_513725];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA164;
							goto LA161;
						}
						LA164: ;
						{
							if (!!(((*a).Kind == ((NU8) 102)))) goto LA168;
							illformedast_291406(a);
						}
						LA168: ;
						checksonslen_291416(a, 3);
						LOC170 = 0;
						LOC170 = getidentnode_510205((*a).kindU.S6.Sons->data[0]);
						addtempdecl_511737(c, LOC170, ((NU8) 10));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[1], (flags_495124 | 2), ctx));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[2], flags_495124, ctx));
					} LA161: ;
					res_514873 += 1;
				} LA160: ;
			}
		}
	}
	break;
	case ((NU8) 98):
	{
		{
			NI i_513859;
			NI HEX3Atmp_514877;
			NI LOC173;
			NI res_514880;
			i_513859 = 0;
			HEX3Atmp_514877 = 0;
			LOC173 = 0;
			LOC173 = sonslen_226249(n);
			HEX3Atmp_514877 = (NI32)(LOC173 - 1);
			res_514880 = 0;
			{
				while (1) {
					if (!(res_514880 <= HEX3Atmp_514877)) goto LA175;
					i_513859 = res_514880;
					{
						tnode225816* a;
						tnode225816* LOC185;
						a = (*n).kindU.S6.Sons->data[i_513859];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA179;
							goto LA176;
						}
						LA179: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA183;
							illformedast_291406(a);
						}
						LA183: ;
						checksonslen_291416(a, 3);
						LOC185 = 0;
						LOC185 = getidentnode_510205((*a).kindU.S6.Sons->data[0]);
						addtempdecl_511737(c, LOC185, ((NU8) 7));
					} LA176: ;
					res_514880 += 1;
				} LA175: ;
			}
		}
		{
			NI i_513919;
			NI HEX3Atmp_514884;
			NI LOC187;
			NI res_514887;
			i_513919 = 0;
			HEX3Atmp_514884 = 0;
			LOC187 = 0;
			LOC187 = sonslen_226249(n);
			HEX3Atmp_514884 = (NI32)(LOC187 - 1);
			res_514887 = 0;
			{
				while (1) {
					if (!(res_514887 <= HEX3Atmp_514884)) goto LA189;
					i_513919 = res_514887;
					{
						tnode225816* a;
						a = (*n).kindU.S6.Sons->data[i_513919];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA193;
							goto LA190;
						}
						LA193: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA197;
							illformedast_291406(a);
						}
						LA197: ;
						checksonslen_291416(a, 3);
						{
							tscope225840* LOC203;
							if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA201;
							LOC203 = 0;
							LOC203 = openscope_295191(c);
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[1], flags_495124, ctx));
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[2], (flags_495124 | 2), ctx));
							closescope_295211(c);
						}
						goto LA199;
						LA201: ;
						{
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[2], (flags_495124 | 2), ctx));
						}
						LA199: ;
					} LA190: ;
					res_514887 += 1;
				} LA189: ;
			}
		}
	}
	break;
	case ((NU8) 149):
	{
		{
			NI LOC208;
			LOC208 = 0;
			LOC208 = sonslen_226249(n);
			if (!(0 < LOC208)) goto LA209;
			{
				if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA213;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[0], (flags_495124 | 2), ctx));
			}
			LA213: ;
			{
				NI i_514178;
				NI HEX3Atmp_514891;
				NI LOC216;
				NI res_514894;
				i_514178 = 0;
				HEX3Atmp_514891 = 0;
				LOC216 = 0;
				LOC216 = sonslen_226249(n);
				HEX3Atmp_514891 = (NI32)(LOC216 - 1);
				res_514894 = 1;
				{
					while (1) {
						tnode225816* a;
						tnode225816* LOC222;
						tsym225846* LOC223;
						if (!(res_514894 <= HEX3Atmp_514891)) goto LA218;
						i_514178 = res_514894;
						a = 0;
						switch ((*(*n).kindU.S6.Sons->data[i_514178]).Kind) {
						case ((NU8) 150):
						{
							a = (*(*n).kindU.S6.Sons->data[i_514178]).kindU.S6.Sons->data[0];
						}
						break;
						case ((NU8) 2):
						{
							a = (*n).kindU.S6.Sons->data[i_514178];
						}
						break;
						default:
						{
							illformedast_291406(n);
						}
						break;
						}
						LOC222 = 0;
						LOC222 = getidentnode_510205((*a).kindU.S6.Sons->data[i_514178]);
						LOC223 = 0;
						LOC223 = newsyms_487918(((NU8) 0), LOC222, c);
						adddecl_295694(c, LOC223);
						res_514894 += 1;
					} LA218: ;
				}
			}
		}
		LA209: ;
	}
	break;
	case ((NU8) 133):
	case ((NU8) 134):
	{
	}
	break;
	case ((NU8) 76):
	{
		checkminsonslen_291426(n, 1);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA228;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[0], (flags_495124 | 2), ctx));
		}
		LA228: ;
		{
			NI i_514331;
			NI HEX3Atmp_514903;
			NI LOC231;
			NI res_514906;
			i_514331 = 0;
			HEX3Atmp_514903 = 0;
			LOC231 = 0;
			LOC231 = sonslen_226249(n);
			HEX3Atmp_514903 = (NI32)(LOC231 - 1);
			res_514906 = 1;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_514906 <= HEX3Atmp_514903)) goto LA233;
					i_514331 = res_514906;
					a = (*n).kindU.S6.Sons->data[i_514331];
					{
						if (!!(((*a).Kind == ((NU8) 35)))) goto LA236;
						illformedast_291406(a);
					}
					LA236: ;
					checkminsonslen_291426(a, 3);
					l = sonslen_226249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 2)]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[(NI32)(l - 2)], (flags_495124 | 2), ctx));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semgenericstmt_495120(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)], flags_495124, ctx));
					{
						NI j_514443;
						NI HEX3Atmp_514898;
						NI res_514901;
						j_514443 = 0;
						HEX3Atmp_514898 = 0;
						HEX3Atmp_514898 = (NI32)(l - 3);
						res_514901 = 0;
						{
							while (1) {
								tnode225816* LOC241;
								if (!(res_514901 <= HEX3Atmp_514898)) goto LA240;
								j_514443 = res_514901;
								LOC241 = 0;
								LOC241 = getidentnode_510205((*a).kindU.S6.Sons->data[j_514443]);
								addtempdecl_511737(c, LOC241, ((NU8) 3));
								res_514901 += 1;
							} LA240: ;
						}
					}
					res_514906 += 1;
				} LA233: ;
			}
		}
	}
	break;
	case ((NU8) 79):
	case ((NU8) 80):
	case ((NU8) 81):
	case ((NU8) 82):
	case ((NU8) 83):
	case ((NU8) 84):
	case ((NU8) 51):
	case ((NU8) 52):
	{
		tscope225840* LOC248;
		tnode225816* body;
		checksonslen_291416(n, 7);
		{
			tnode225816* LOC247;
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA245;
			LOC247 = 0;
			LOC247 = getidentnode_510205((*n).kindU.S6.Sons->data[0]);
			addtempdecl_511737(c, LOC247, ((NU8) 12));
		}
		LA245: ;
		LOC248 = 0;
		LOC248 = openscope_295191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[2], flags_495124, ctx));
		{
			if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA251;
			{
				tident200021* LOC257;
				tsym225846* LOC258;
				if (!!(((*(*(*n).kindU.S6.Sons->data[3]).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA255;
				LOC257 = 0;
				LOC257 = getident_200472(((NimStringDesc*) &TMP2911));
				LOC258 = 0;
				LOC258 = newsym_226074(((NU8) 0), LOC257, NIM_NIL, (*n).Info);
				addprelimdecl_295704(c, LOC258);
			}
			LA255: ;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[3]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[3], flags_495124, ctx));
		}
		LA251: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[4]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[4], flags_495124, ctx));
		body = 0;
		{
			if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3))) goto LA261;
			body = getbody_279270((*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym);
		}
		goto LA259;
		LA261: ;
		{
			body = (*n).kindU.S6.Sons->data[6];
		}
		LA259: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semgenericstmtscope_510240(c, body, flags_495124, ctx));
		closescope_295211(c);
	}
	break;
	case ((NU8) 90):
	case ((NU8) 43):
	{
	}
	break;
	case ((NU8) 34):
	case ((NU8) 33):
	{
		checkminsonslen_291426(n, 2);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[1], flags_495124, ctx));
	}
	break;
	default:
	{
		{
			NI i_514759;
			NI HEX3Atmp_514910;
			NI LOC268;
			NI res_514913;
			i_514759 = 0;
			HEX3Atmp_514910 = 0;
			LOC268 = 0;
			LOC268 = sonslen_226249(n);
			HEX3Atmp_514910 = (NI32)(LOC268 - 1);
			res_514913 = 0;
			{
				while (1) {
					if (!(res_514913 <= HEX3Atmp_514910)) goto LA270;
					i_514759 = res_514913;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_514759]), semgenericstmt_495120(c, (*n).kindU.S6.Sons->data[i_514759], flags_495124, ctx));
					res_514913 += 1;
				} LA270: ;
			}
		}
	}
	break;
	}
	return result;
}

static N_INLINE(ttype225852*, skipgenericinvokation_499863)(ttype225852* t) {
	ttype225852* result;
	result = 0;
	result = t;
	{
		if (!((*result).Kind == ((NU8) 9))) goto LA3;
		result = (*result).Sons->data[0];
	}
	LA3: ;
	{
		if (!((*result).Kind == ((NU8) 10))) goto LA7;
		result = lastson_226267(result);
	}
	LA7: ;
	return result;
}

N_NIMCALL(void, addinheritedfieldsaux_499662)(tcontext290021* c, intset222056* check, NI* pos, tnode225816* n) {
	switch ((*n).Kind) {
	case ((NU8) 138):
	{
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA4;
			internalerror_197987((*n).Info, ((NimStringDesc*) &TMP2913));
		}
		LA4: ;
		addinheritedfieldsaux_499662(c, check, pos, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_499719;
			NI HEX3Atmp_499802;
			NI LOC7;
			NI res_499805;
			i_499719 = 0;
			HEX3Atmp_499802 = 0;
			LOC7 = 0;
			LOC7 = sonslen_226249(n);
			HEX3Atmp_499802 = (NI32)(LOC7 - 1);
			res_499805 = 1;
			{
				while (1) {
					if (!(res_499805 <= HEX3Atmp_499802)) goto LA9;
					i_499719 = res_499805;
					switch ((*(*n).kindU.S6.Sons->data[i_499719]).Kind) {
					case ((NU8) 85):
					case ((NU8) 88):
					{
						tnode225816* LOC11;
						LOC11 = 0;
						LOC11 = lastson_226261((*n).kindU.S6.Sons->data[i_499719]);
						addinheritedfieldsaux_499662(c, check, pos, LOC11);
					}
					break;
					default:
					{
						internalerror_197987((*n).Info, ((NimStringDesc*) &TMP2914));
					}
					break;
					}
					res_499805 += 1;
				} LA9: ;
			}
		}
	}
	break;
	case ((NU8) 137):
	{
		{
			NI i_499760;
			NI HEX3Atmp_499808;
			NI LOC15;
			NI res_499811;
			i_499760 = 0;
			HEX3Atmp_499808 = 0;
			LOC15 = 0;
			LOC15 = sonslen_226249(n);
			HEX3Atmp_499808 = (NI32)(LOC15 - 1);
			res_499811 = 0;
			{
				while (1) {
					if (!(res_499811 <= HEX3Atmp_499808)) goto LA17;
					i_499760 = res_499811;
					addinheritedfieldsaux_499662(c, check, pos, (*n).kindU.S6.Sons->data[i_499760]);
					res_499811 += 1;
				} LA17: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		incl_222869(check, (*(*(*n).kindU.S4.Sym).Name).Sup.Id);
		(*pos) += 1;
	}
	break;
	default:
	{
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP2915));
	}
	break;
	}
}

N_NIMCALL(void, addinheritedfields_499834)(tcontext290021* c, intset222056* check, NI* pos, ttype225852* obj) {
	{
		NIM_BOOL LOC3;
		NI LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = sonslen_226255(obj);
		LOC3 = (0 < LOC4);
		if (!(LOC3)) goto LA5;
		LOC3 = !(((*obj).Sons->data[0] == NIM_NIL));
		LA5: ;
		if (!LOC3) goto LA6;
		addinheritedfields_499834(c, check, pos, (*obj).Sons->data[0]);
	}
	LA6: ;
	addinheritedfieldsaux_499662(c, check, pos, (*obj).N);
}

N_NIMCALL(void, instantiategenericparamlist_489543)(tcontext290021* c, tnode225816* n, tidtable225864 pt, tinstantiation225836* entry) {
	NI LOC5;
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP2920));
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = len_226364(n);
	unsureAsgnRef((void**) (&(*entry).Concretetypes), (ttypeseq225848*) newSeq((&NTI225848), LOC5));
	{
		NI i_489575;
		tnode225816* a_489576;
		i_489575 = 0;
		a_489576 = 0;
		{
			NI i_489705;
			NI HEX3Atmp_489707;
			NI LOC8;
			NI res_489709;
			i_489705 = 0;
			HEX3Atmp_489707 = 0;
			LOC8 = 0;
			LOC8 = len_226364(n);
			HEX3Atmp_489707 = (LOC8 - 1);
			res_489709 = 0;
			{
				while (1) {
					if (!(res_489709 <= HEX3Atmp_489707)) goto LA10;
					i_489705 = res_489709;
					i_489575 = i_489705;
					a_489576 = (*n).kindU.S6.Sons->data[i_489705];
					{
						tsym225846* q;
						tsym225846* s;
						tsym225846* LOC20;
						ttype225852* t;
						tidobj200015* LOC21;
						TNimObject* LOC22;
						{
							if (!!(((*a_489576).Kind == ((NU8) 3)))) goto LA14;
							internalerror_197987((*a_489576).Info, ((NimStringDesc*) &TMP2921));
						}
						LA14: ;
						q = (*a_489576).kindU.S4.Sym;
						{
							if (!!(((*(*q).Typ).Kind == ((NU8) 8) || (*(*q).Typ).Kind == ((NU8) 12) || (*(*q).Typ).Kind == ((NU8) 49) || (*(*q).Typ).Kind >= ((NU8) 51) && (*(*q).Typ).Kind <= ((NU8) 59)))) goto LA18;
							goto LA11;
						}
						LA18: ;
						LOC20 = 0;
						LOC20 = getcurrowner_290256();
						s = newsym_226074(((NU8) 7), (*q).Name, LOC20, (*q).Info);
						(*s).Flags = ((*s).Flags | 5);
						LOC21 = 0;
						LOC21 = &(*q).Typ->Sup;
						LOC22 = 0;
						LOC22 = idtableget_235182(pt, LOC21);
						t = ((ttype225852*) (LOC22));
						{
							if (!(t == NIM_NIL)) goto LA25;
							{
								if (!(((*(*q).Typ).Flags &(1<<((((NU8) 10))&31)))!=0)) goto LA29;
								t = (*q).Typ;
							}
							goto LA27;
							LA29: ;
							{
								localerror_197955((*a_489576).Info, ((NU16) 124), (*(*s).Name).S);
								t = errortype_291319(c);
							}
							LA27: ;
						}
						goto LA23;
						LA25: ;
						{
							if (!((*t).Kind == ((NU8) 12))) goto LA33;
							localerror_197955((*a_489576).Info, ((NU16) 124), (*(*q).Name).S);
							t = errortype_291319(c);
						}
						goto LA23;
						LA33: ;
						{
							if (!((*t).Kind == ((NU8) 9))) goto LA36;
							t = generatetypeinstance_320503(c, pt, (*a_489576).Info, t);
						}
						goto LA23;
						LA36: ;
						LA23: ;
						asgnRefNoCycle((void**) (&(*s).Typ), t);
						adddecl_295694(c, s);
						asgnRefNoCycle((void**) (&(*entry).Concretetypes->data[i_489575]), t);
					} LA11: ;
					res_489709 += 1;
				} LA10: ;
			}
		}
	}
}

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

static N_INLINE(void, rtladdcycleroot_49429)(tcell44935* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_45671((&gch_47044.Cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_51025)(tcell44935* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_48667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_49429(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_50604)(tcell44935* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_48667(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_49429(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell44935* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_48646(src);
		incref_51025(LOC5);
	}
	LA3: ;
	{
		tcell44935* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_48646((*dest));
		decref_50604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(void, pushproccon_290381)(tcontext290021* c, tsym225846* owner) {
	tproccon290011* x;
	{
		if (!(owner == NIM_NIL)) goto LA3;
		internalerror_198006(((NimStringDesc*) &TMP2922));
		goto BeforeRet;
	}
	LA3: ;
	x = 0;
	x = (tproccon290011*) newObj((&NTI290009), sizeof(tproccon290011));
	asgnRefNoCycle((void**) (&(*x).Owner), owner);
	asgnRef((void**) (&(*x).Next), (*c).P);
	asgnRef((void**) (&(*c).P), x);
	BeforeRet: ;
}

N_NIMCALL(ttype225852*, findenforcedstatictype_500109)(ttype225852* t_500111) {
	ttype225852* result;
	result = 0;
	{
		if (!((*t_500111).Kind == ((NU8) 59))) goto LA3;
		result = t_500111;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*t_500111).Kind == ((NU8) 55))) goto LA7;
		{
			ttype225852* s_500143;
			ttypeseq225848* HEX3Atmp_500163;
			NI i_500166;
			NI l_500168;
			s_500143 = 0;
			HEX3Atmp_500163 = 0;
			HEX3Atmp_500163 = (*t_500111).Sons;
			i_500166 = 0;
			l_500168 = HEX3Atmp_500163->Sup.len;
			{
				while (1) {
					ttype225852* t;
					if (!(i_500166 < l_500168)) goto LA11;
					s_500143 = HEX3Atmp_500163->data[i_500166];
					t = findenforcedstatictype_500109(s_500143);
					{
						if (!!((t == NIM_NIL))) goto LA14;
						result = t;
						goto BeforeRet;
					}
					LA14: ;
					i_500166 += 1;
				} LA11: ;
			}
		}
	}
	LA7: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addparamorresult_490371)(tcontext290021* c, tsym225846* param, NU8 kind) {
	{
		ttype225852* statictype;
		if (!(kind == ((NU8) 17))) goto LA3;
		statictype = findenforcedstatictype_500109((*param).Typ);
		{
			tsym225846* a;
			if (!!((statictype == NIM_NIL))) goto LA7;
			a = copysym_226203(param, NIM_FALSE);
			asgnRefNoCycle((void**) (&(*a).Typ), base_263038(statictype));
			{
				if (!!((((*a).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA11;
				adddecl_295694(c, a);
			}
			LA11: ;
		}
		goto LA5;
		LA7: ;
		{
			if (!((*(*param).Typ).Kind == ((NU8) 8))) goto LA14;
			{
				if (!!((((*param).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA18;
				adddecl_295694(c, param);
			}
			LA18: ;
		}
		goto LA5;
		LA14: ;
		{
			tsym225846* nn;
			tsym225846* a;
			nn = getsyssym_282054(((NimStringDesc*) &TMP2924));
			a = copysym_226203(param, NIM_FALSE);
			asgnRefNoCycle((void**) (&(*a).Typ), (*nn).Typ);
			{
				if (!!((((*a).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA23;
				adddecl_295694(c, a);
			}
			LA23: ;
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!!((((*param).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA28;
			adddecl_295694(c, param);
		}
		LA28: ;
	}
	LA1: ;
}

N_NIMCALL(void, addresult_524075)(tcontext290021* c, ttype225852* t, tlineinfo195539 info, NU8 owner) {
	{
		tsym225846* s;
		tident200021* LOC5;
		tsym225846* LOC6;
		if (!!((t == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = getident_200472(((NimStringDesc*) &TMP2923));
		LOC6 = 0;
		LOC6 = getcurrowner_290256();
		s = newsym_226074(((NU8) 11), LOC5, LOC6, info);
		asgnRefNoCycle((void**) (&(*s).Typ), t);
		(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
		addparamorresult_490371(c, s, owner);
		asgnRefNoCycle((void**) (&(*(*c).P).Resultsym), s);
	}
	LA3: ;
}

N_NIMCALL(void, addresultnode_524118)(tcontext290021* c, tnode225816* n) {
	{
		tnode225816* LOC5;
		if (!!(((*(*c).P).Resultsym == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = newsymnode_226132((*(*c).P).Resultsym);
		addson_226287(n, LOC5);
	}
	LA3: ;
}

N_NIMCALL(void, maybeaddresult_487301)(tcontext290021* c, tsym225846* s, tnode225816* n) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((*(*s).Typ).Sons->data[0] == NIM_NIL));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*s).Kind == ((NU8) 14)));
		LA4: ;
		if (!LOC3) goto LA5;
		addresult_524075(c, (*(*s).Typ).Sons->data[0], (*n).Info, (*s).Kind);
		addresultnode_524118(c, n);
	}
	LA5: ;
}

N_NIMCALL(void, instantiateproctype_490682)(tcontext290021* c, tidtable225864 pt, tsym225846* prc, tlineinfo195539 info) {
	trepltypevars317786 cl;
	ttype225852* result;
	tnode225816* originalparams;
	tnode225816* LOC10;
	adddecl_295694(c, prc);
	pushinfocontext_196930(info);
	memset((void*)(&cl), 0, sizeof(cl));
	chckNil((void*)(&cl));
	memset((void*)(&cl), 0, sizeof(cl));
	inittypevars_320474(c, pt, info, (&cl));
	result = instcopytype_319238((&cl), (*prc).Typ);
	originalparams = (*result).N;
	asgnRefNoCycle((void**) (&(*result).N), shallowcopy_231347(originalparams));
	{
		NI i_490714;
		NI HEX3Atmp_490785;
		NI LOC2;
		NI res_490788;
		i_490714 = 0;
		HEX3Atmp_490785 = 0;
		LOC2 = 0;
		LOC2 = len_230005(result);
		HEX3Atmp_490785 = (LOC2 - 1);
		res_490788 = 1;
		{
			while (1) {
				tnode225816* param;
				tnode225816* LOC5;
				if (!(res_490788 <= HEX3Atmp_490785)) goto LA4;
				i_490714 = res_490788;
				asgnRefNoCycle((void**) (&(*result).Sons->data[i_490714]), replacetypevarst_317834((&cl), (*result).Sons->data[i_490714]));
				propagatetoowner_230318(result, (*result).Sons->data[i_490714]);
				LOC5 = 0;
				LOC5 = HEX5BHEX5D_226698(originalparams, i_490714);
				param = replacetypevarsn_317812((&cl), LOC5);
				asgnRefNoCycle((void**) (&(*(*result).N).kindU.S6.Sons->data[i_490714]), param);
				{
					if (!((*param).Kind == ((NU8) 3))) goto LA8;
					asgnRefNoCycle((void**) (&(*(*param).kindU.S4.Sym).Owner), prc);
					adddecl_295694(c, (*param).kindU.S4.Sym);
				}
				LA8: ;
				res_490788 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Sons->data[0]), replacetypevarst_317834((&cl), (*result).Sons->data[0]));
	LOC10 = 0;
	LOC10 = HEX5BHEX5D_226698(originalparams, 0);
	asgnRefNoCycle((void**) (&(*(*result).N).kindU.S6.Sons->data[0]), copytree_226329(LOC10));
	erasevoidparams_319784(result);
	skipintliteralparams_319999(result);
	asgnRefNoCycle((void**) (&(*prc).Typ), result);
	maybeaddresult_487301(c, prc, (*prc).Ast);
	popinfocontext_196957();
}

N_NIMCALL(NIM_BOOL, sameinstantiation_489728)(tinstantiation225836 a, tinstantiation225836 b) {
	NIM_BOOL result;
	result = 0;
	{
		if (!(a.Concretetypes->Sup.len == b.Concretetypes->Sup.len)) goto LA3;
		{
			NI i_489765;
			NI HEX3Atmp_489768;
			NI res_489771;
			i_489765 = 0;
			HEX3Atmp_489768 = 0;
			HEX3Atmp_489768 = (a.Concretetypes->Sup.len-1);
			res_489771 = 0;
			{
				while (1) {
					if (!(res_489771 <= HEX3Atmp_489768)) goto LA7;
					i_489765 = res_489771;
					{
						NIM_BOOL LOC10;
						LOC10 = 0;
						LOC10 = comparetypes_270571(a.Concretetypes->data[i_489765], b.Concretetypes->data[i_489765], ((NU8) 0), 4);
						if (!!(LOC10)) goto LA11;
						goto BeforeRet;
					}
					LA11: ;
					res_489771 += 1;
				} LA7: ;
			}
		}
		result = NIM_TRUE;
	}
	LA3: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym225846*, genericcacheget_489785)(tsym225846* genericsym, tinstantiation225836 entry) {
	tsym225846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_229338((*genericsym).kindU.S2.Procinstcache, NIM_NIL);
		if (!!(LOC3)) goto LA4;
		{
			tinstantiation225836* inst_490011;
			TY225947* HEX3Atmp_490013;
			NI i_490016;
			NI l_490018;
			inst_490011 = 0;
			HEX3Atmp_490013 = 0;
			HEX3Atmp_490013 = (*genericsym).kindU.S2.Procinstcache;
			i_490016 = 0;
			l_490018 = HEX3Atmp_490013->Sup.len;
			{
				while (1) {
					if (!(i_490016 < l_490018)) goto LA8;
					inst_490011 = HEX3Atmp_490013->data[i_490016];
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = sameinstantiation_489728(entry, (*inst_490011));
						if (!LOC11) goto LA12;
						result = (*inst_490011).Sym;
						goto BeforeRet;
					}
					LA12: ;
					i_490016 += 1;
				} LA8: ;
			}
		}
	}
	LA4: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, safelen_226424)(tnode225816* n) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*n).Kind >= ((NU8) 0) && (*n).Kind <= ((NU8) 23));
		if (LOC3) goto LA4;
		LOC3 = (*n).kindU.S6.Sons == 0;
		LA4: ;
		if (!LOC3) goto LA5;
		result = 0;
	}
	goto LA1;
	LA5: ;
	{
		result = (*n).kindU.S6.Sons->Sup.len;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, freshgensyms_490201)(tnode225816* n, tsym225846* owner, tidtable225864* symmap) {
	{
		NIM_BOOL LOC3;
		tsym225846* x;
		tidobj200015* LOC7;
		TNimObject* LOC8;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 3));
		if (!(LOC3)) goto LA4;
		LOC3 = (((*(*n).kindU.S4.Sym).Flags &(1<<((((NU8) 31))&31)))!=0);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = &(*n).kindU.S4.Sym->Sup;
		LOC8 = 0;
		LOC8 = idtableget_235182((*symmap), LOC7);
		x = ((tsym225846*) (LOC8));
		{
			tidobj200015* LOC13;
			TNimObject* LOC14;
			if (!(x == NIM_NIL)) goto LA11;
			x = copysym_226203((*n).kindU.S4.Sym, NIM_FALSE);
			asgnRefNoCycle((void**) (&(*x).Owner), owner);
			LOC13 = 0;
			LOC13 = &(*n).kindU.S4.Sym->Sup;
			LOC14 = 0;
			LOC14 = &x->Sup.Sup;
			idtableput_235196(symmap, LOC13, LOC14);
		}
		LA11: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S4.Sym), x);
	}
	goto LA1;
	LA5: ;
	{
		{
			NI i_490338;
			NI HEX3Atmp_490354;
			NI LOC17;
			NI res_490357;
			i_490338 = 0;
			HEX3Atmp_490354 = 0;
			LOC17 = 0;
			LOC17 = safelen_226424(n);
			HEX3Atmp_490354 = (LOC17 - 1);
			res_490357 = 0;
			{
				while (1) {
					if (!(res_490357 <= HEX3Atmp_490354)) goto LA19;
					i_490338 = res_490357;
					freshgensyms_490201((*n).kindU.S6.Sons->data[i_490338], owner, symmap);
					res_490357 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
}

static N_INLINE(NIM_BOOL, isemptytype_232990)(ttype225852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (t == NIM_NIL);
	if (LOC1) goto LA2;
	LOC1 = ((*t).Kind == ((NU8) 3) || (*t).Kind == ((NU8) 7));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, istypeexpr_535186)(tnode225816* n) {
	NIM_BOOL result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 4):
	case ((NU8) 132):
	{
		result = NIM_TRUE;
	}
	break;
	case ((NU8) 3):
	{
		result = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 7));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, readtypeparameter_535640)(tcontext290021* c, ttype225852* typ, tident200021* paramname, tlineinfo195539 info) {
	tnode225816* result;
	ttype225852* ty;
	ttype225852* tbody;
	result = 0;
	{
		if (!((*typ).Kind == ((NU8) 11))) goto LA3;
		ty = skipgenericalias_269619(typ);
	}
	goto LA1;
	LA3: ;
	{
		{
			NimStringDesc* LOC10;
			if (!!(((*typ).Kind == ((NU8) 54)))) goto LA8;
			LOC10 = 0;
			LOC10 = HEX24_198126(TMP2994);
			internalerror_198006(LOC10);
		}
		LA8: ;
		ty = (*typ).Sons->data[1];
	}
	LA1: ;
	tbody = (*ty).Sons->data[0];
	{
		NI s_535695;
		NI HEX3Atmp_535709;
		NI LOC12;
		NI res_535712;
		s_535695 = 0;
		HEX3Atmp_535709 = 0;
		LOC12 = 0;
		LOC12 = len_230005(tbody);
		HEX3Atmp_535709 = (NI32)(LOC12 - 2);
		res_535712 = 0;
		{
			while (1) {
				ttype225852* tparam;
				if (!(res_535712 <= HEX3Atmp_535709)) goto LA14;
				s_535695 = res_535712;
				tparam = (*tbody).Sons->data[s_535695];
				{
					ttype225852* rawtyp;
					if (!((*(*(*tparam).Sym).Name).Sup.Id == (*paramname).Sup.Id)) goto LA17;
					rawtyp = (*ty).Sons->data[(NI32)(s_535695 + 1)];
					{
						if (!((*rawtyp).Kind == ((NU8) 59))) goto LA21;
						result = (*rawtyp).N;
						goto BeforeRet;
					}
					goto LA19;
					LA21: ;
					{
						ttype225852* foundtyp;
						tsym225846* LOC24;
						tsym225846* LOC25;
						foundtyp = maketypedesc_290763(c, rawtyp);
						LOC24 = 0;
						LOC24 = copysym_226203((*tparam).Sym, NIM_FALSE);
						LOC25 = 0;
						LOC25 = linkto_226825(LOC24, foundtyp);
						result = newsymnode_227755(LOC25, info);
						goto BeforeRet;
					}
					LA19: ;
				}
				LA17: ;
				res_535712 += 1;
			} LA14: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym225846*, lookupinrecordandbuildcheck_535216)(tcontext290021* c, tnode225816* n, tnode225816* r, tident200021* field, tnode225816** check) {
	tsym225846* result;
	result = 0;
	result = NIM_NIL;
	switch ((*r).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_535237;
			NI HEX3Atmp_535532;
			NI LOC3;
			NI res_535535;
			i_535237 = 0;
			HEX3Atmp_535532 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226249(r);
			HEX3Atmp_535532 = (NI32)(LOC3 - 1);
			res_535535 = 0;
			{
				while (1) {
					if (!(res_535535 <= HEX3Atmp_535532)) goto LA5;
					i_535237 = res_535535;
					result = lookupinrecordandbuildcheck_535216(c, n, (*r).kindU.S6.Sons->data[i_535237], field, check);
					{
						if (!!((result == NIM_NIL))) goto LA8;
						goto BeforeRet;
					}
					LA8: ;
					res_535535 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		tnode225816* s;
		checkminsonslen_291426(r, 2);
		{
			if (!!(((*(*r).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA13;
			illformedast_291406(r);
		}
		LA13: ;
		result = lookupinrecordandbuildcheck_535216(c, n, (*r).kindU.S6.Sons->data[0], field, check);
		{
			if (!!((result == NIM_NIL))) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
		s = newnodei_226138(((NU8) 39), (*r).Info);
		{
			NI i_535336;
			NI HEX3Atmp_535550;
			NI LOC20;
			NI res_535553;
			i_535336 = 0;
			HEX3Atmp_535550 = 0;
			LOC20 = 0;
			LOC20 = sonslen_226249(r);
			HEX3Atmp_535550 = (NI32)(LOC20 - 1);
			res_535553 = 1;
			{
				while (1) {
					tnode225816* it;
					if (!(res_535553 <= HEX3Atmp_535550)) goto LA22;
					i_535336 = res_535553;
					it = (*r).kindU.S6.Sons->data[i_535336];
					switch ((*it).Kind) {
					case ((NU8) 85):
					{
						tnode225816* LOC24;
						LOC24 = 0;
						LOC24 = lastson_226261(it);
						result = lookupinrecordandbuildcheck_535216(c, n, LOC24, field, check);
						{
							if (!(result == NIM_NIL)) goto LA27;
							{
								NI j_535379;
								NI HEX3Atmp_535539;
								NI LOC30;
								NI res_535542;
								j_535379 = 0;
								HEX3Atmp_535539 = 0;
								LOC30 = 0;
								LOC30 = sonslen_226249(it);
								HEX3Atmp_535539 = (NI32)(LOC30 - 2);
								res_535542 = 0;
								{
									while (1) {
										tnode225816* LOC33;
										if (!(res_535542 <= HEX3Atmp_535539)) goto LA32;
										j_535379 = res_535542;
										LOC33 = 0;
										LOC33 = copytree_226329((*it).kindU.S6.Sons->data[j_535379]);
										addson_226287(s, LOC33);
										res_535542 += 1;
									} LA32: ;
								}
							}
						}
						goto LA25;
						LA27: ;
						{
							tnode225816* inexpr;
							tident200021* LOC44;
							tnode225816* LOC45;
							tnode225816* LOC46;
							tnode225816* LOC47;
							{
								if (!((*check) == NIM_NIL)) goto LA37;
								unsureAsgnRef((void**) (&(*check)), newnodei_226138(((NU8) 46), (*n).Info));
								addson_226287((*check), emptynode_226738);
							}
							LA37: ;
							s = newnodei_226138(((NU8) 39), (*n).Info);
							{
								NI j_535423;
								NI HEX3Atmp_535545;
								NI LOC40;
								NI res_535548;
								j_535423 = 0;
								HEX3Atmp_535545 = 0;
								LOC40 = 0;
								LOC40 = sonslen_226249(it);
								HEX3Atmp_535545 = (NI32)(LOC40 - 2);
								res_535548 = 0;
								{
									while (1) {
										tnode225816* LOC43;
										if (!(res_535548 <= HEX3Atmp_535545)) goto LA42;
										j_535423 = res_535548;
										LOC43 = 0;
										LOC43 = copytree_226329((*it).kindU.S6.Sons->data[j_535423]);
										addson_226287(s, LOC43);
										res_535548 += 1;
									} LA42: ;
								}
							}
							inexpr = newnodei_226138(((NU8) 27), (*n).Info);
							LOC44 = 0;
							LOC44 = getident_200472(((NimStringDesc*) &TMP2996));
							LOC45 = 0;
							LOC45 = newidentnode_226125(LOC44, (*n).Info);
							addson_226287(inexpr, LOC45);
							LOC46 = 0;
							LOC46 = copytree_226329((*r).kindU.S6.Sons->data[0]);
							addson_226287(inexpr, LOC46);
							addson_226287(inexpr, s);
							LOC47 = 0;
							LOC47 = semexpr_487201(c, inexpr, 0);
							addson_226287((*check), LOC47);
							goto BeforeRet;
						}
						LA25: ;
					}
					break;
					case ((NU8) 88):
					{
						tnode225816* LOC49;
						LOC49 = 0;
						LOC49 = lastson_226261(it);
						result = lookupinrecordandbuildcheck_535216(c, n, LOC49, field, check);
						{
							tnode225816* inexpr;
							tident200021* LOC58;
							tnode225816* LOC59;
							tnode225816* LOC60;
							tnode225816* notexpr;
							tident200021* LOC61;
							tnode225816* LOC62;
							tnode225816* LOC63;
							if (!!((result == NIM_NIL))) goto LA52;
							{
								if (!((*check) == NIM_NIL)) goto LA56;
								unsureAsgnRef((void**) (&(*check)), newnodei_226138(((NU8) 46), (*n).Info));
								addson_226287((*check), emptynode_226738);
							}
							LA56: ;
							inexpr = newnodei_226138(((NU8) 27), (*n).Info);
							LOC58 = 0;
							LOC58 = getident_200472(((NimStringDesc*) &TMP2996));
							LOC59 = 0;
							LOC59 = newidentnode_226125(LOC58, (*n).Info);
							addson_226287(inexpr, LOC59);
							LOC60 = 0;
							LOC60 = copytree_226329((*r).kindU.S6.Sons->data[0]);
							addson_226287(inexpr, LOC60);
							addson_226287(inexpr, s);
							notexpr = newnodei_226138(((NU8) 27), (*n).Info);
							LOC61 = 0;
							LOC61 = getident_200472(((NimStringDesc*) &TMP2997));
							LOC62 = 0;
							LOC62 = newidentnode_226125(LOC61, (*n).Info);
							addson_226287(notexpr, LOC62);
							addson_226287(notexpr, inexpr);
							LOC63 = 0;
							LOC63 = semexpr_487201(c, notexpr, 0);
							addson_226287((*check), LOC63);
							goto BeforeRet;
						}
						LA52: ;
					}
					break;
					default:
					{
						illformedast_291406(it);
					}
					break;
					}
					res_535553 += 1;
				} LA22: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		{
			if (!((*(*(*r).kindU.S4.Sym).Name).Sup.Id == (*field).Sup.Id)) goto LA68;
			result = (*r).kindU.S4.Sym;
		}
		LA68: ;
	}
	break;
	default:
	{
		illformedast_291406(n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, fieldvisible_414842)(tcontext290021* c, tsym225846* f) {
	NIM_BOOL result;
	NI fmoduleid;
	tsym225846* LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = getmodule_235243(f);
	fmoduleid = (*LOC1).Sup.Id;
	LOC2 = 0;
	LOC2 = (((*f).Flags &(1<<((((NU8) 1))&31)))!=0);
	if (LOC2) goto LA3;
	LOC2 = (fmoduleid == (*(*c).Module).Sup.Id);
	LA3: ;
	result = LOC2;
	{
		tsym225846* module_415011;
		tsymseq225818* HEX3Atmp_415013;
		NI i_415016;
		NI l_415018;
		module_415011 = 0;
		HEX3Atmp_415013 = 0;
		HEX3Atmp_415013 = (*c).Friendmodules;
		i_415016 = 0;
		l_415018 = HEX3Atmp_415013->Sup.len;
		{
			while (1) {
				if (!(i_415016 < l_415018)) goto LA6;
				module_415011 = HEX3Atmp_415013->data[i_415016];
				{
					if (!(fmoduleid == (*module_415011).Sup.Id)) goto LA9;
					result = NIM_TRUE;
					goto LA4;
				}
				LA9: ;
				i_415016 += 1;
			} LA6: ;
		}
	} LA4: ;
	return result;
}

N_NIMCALL(tnode225816*, makederef_535594)(tnode225816* n) {
	tnode225816* result;
	ttype225852* t;
	result = 0;
	t = skiptypes_230245((*n).Typ, 2048);
	result = n;
	{
		if (!((*t).Kind == ((NU8) 23))) goto LA3;
		result = newnodeit_226145(((NU8) 65), (*n).Info, (*t).Sons->data[0]);
		addson_226287(result, n);
		t = skiptypes_230245((*t).Sons->data[0], 2048);
	}
	LA3: ;
	{
		while (1) {
			tnode225816* a;
			ttype225852* LOC7;
			if (!((*t).Kind == ((NU8) 21) || (*t).Kind == ((NU8) 22))) goto LA6;
			a = result;
			result = newnodeit_226145(((NU8) 65), (*n).Info, (*t).Sons->data[0]);
			addson_226287(result, a);
			LOC7 = 0;
			LOC7 = lastson_226267(t);
			t = skiptypes_230245(LOC7, 2048);
		} LA6: ;
	}
	return result;
}

N_NIMCALL(tnode225816*, builtinfieldaccess_535726)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tsym225846* s;
	tident200021* i;
	ttype225852* ty;
	tsym225846* f;
	tnode225816* check;
	result = 0;
	checksonslen_291416(n, 2);
	s = qualifiedlookup_296122(c, n, 3);
	{
		if (!!((s == NIM_NIL))) goto LA3;
		{
			if (!((520256 &(1<<(((*s).Kind)&31)))!=0)) goto LA7;
			result = symchoice_504476(c, n, s, ((NU8) 0));
			{
				if (!((*result).Kind == ((NU8) 3))) goto LA11;
				result = semsym_528849(c, n, s, flags);
			}
			LA11: ;
		}
		goto LA5;
		LA7: ;
		{
			markused_405251((*(*n).kindU.S6.Sons->data[1]).Info, s);
			result = semsym_528849(c, n, s, flags);
		}
		LA5: ;
		goto BeforeRet;
	}
	LA3: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], (flags | 16)));
	i = considerquotedident_295010((*n).kindU.S6.Sons->data[1]);
	ty = (*(*n).kindU.S6.Sons->data[0]).Typ;
	f = NIM_NIL;
	result = NIM_NIL;
	{
		NIM_BOOL LOC16;
		NIM_BOOL LOC18;
		ttype225852* LOC20;
		LOC16 = 0;
		LOC16 = istypeexpr_535186((*n).kindU.S6.Sons->data[0]);
		if (LOC16) goto LA17;
		LOC18 = 0;
		LOC18 = ((*ty).Kind == ((NU8) 8));
		if (!(LOC18)) goto LA19;
		LOC20 = 0;
		LOC20 = base_263038(ty);
		LOC18 = !(((*LOC20).Kind == ((NU8) 0)));
		LA19: ;
		LOC16 = LOC18;
		LA17: ;
		if (!LOC16) goto LA21;
		{
			if (!((*ty).Kind == ((NU8) 8))) goto LA25;
			ty = base_263038(ty);
		}
		LA25: ;
		ty = skiptypes_230245(ty, 14680064);
		switch ((*ty).Kind) {
		case ((NU8) 14):
		{
			{
				while (1) {
					if (!!((ty == NIM_NIL))) goto LA29;
					f = getsymfromlist_235228((*ty).N, i, 0);
					{
						if (!!((f == NIM_NIL))) goto LA32;
						goto LA28;
					}
					LA32: ;
					ty = (*ty).Sons->data[0];
				} LA29: ;
			} LA28: ;
			{
				if (!!((f == NIM_NIL))) goto LA36;
				result = newsymnode_226132(f);
				(*result).Info = (*n).Info;
				asgnRefNoCycle((void**) (&(*result).Typ), ty);
				markused_405251((*n).Info, f);
				goto BeforeRet;
			}
			LA36: ;
		}
		break;
		case ((NU8) 11):
		case ((NU8) 54):
		{
			result = readtypeparameter_535640(c, ty, i, (*n).Info);
			goto BeforeRet;
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			{
				if (!((*(*ty).N).Kind == ((NU8) 137))) goto LA42;
				{
					tnode225816* field_536210;
					tnode225816* HEX3Atmp_536691;
					field_536210 = 0;
					HEX3Atmp_536691 = 0;
					HEX3Atmp_536691 = (*ty).N;
					{
						NI i_536695;
						NI HEX3Atmp_536697;
						NI LOC46;
						NI res_536699;
						i_536695 = 0;
						HEX3Atmp_536697 = 0;
						LOC46 = 0;
						LOC46 = len_226364(HEX3Atmp_536691);
						HEX3Atmp_536697 = (LOC46 - 1);
						res_536699 = 0;
						{
							while (1) {
								if (!(res_536699 <= HEX3Atmp_536697)) goto LA48;
								i_536695 = res_536699;
								field_536210 = (*HEX3Atmp_536691).kindU.S6.Sons->data[i_536695];
								{
									ttypeseq225848* LOC53;
									TY290919 LOC54;
									if (!((*(*field_536210).kindU.S4.Sym).Name == i)) goto LA51;
									LOC53 = 0;
									LOC53 = (ttypeseq225848*) newSeq((&NTI225848), 2);
									memset((void*)LOC54, 0, sizeof(LOC54));
									LOC54[0] = ty;
									LOC54[1] = (*(*field_536210).kindU.S4.Sym).Typ;
									asgnRefNoCycle((void**) (&LOC53->data[0]), LOC54[0]);
									asgnRefNoCycle((void**) (&LOC53->data[1]), LOC54[1]);
									asgnRefNoCycle((void**) (&(*n).Typ), newtypewithsons_290823(c, ((NU8) 61), LOC53));
									asgnRefNoCycle((void**) (&(*(*n).Typ).N), copytree_226329(n));
									result = n;
									goto BeforeRet;
								}
								LA51: ;
								res_536699 += 1;
							} LA48: ;
						}
					}
				}
			}
			LA42: ;
		}
		break;
		default:
		{
			goto BeforeRet;
		}
		break;
		}
		ty = (*(*n).kindU.S6.Sons->data[0]).Typ;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA21: ;
	ty = skiptypes_230245(ty, 14682112);
	{
		while (1) {
			if (!(((*ty).Flags &(1<<((((NU8) 27))&31)))!=0)) goto LA57;
			ty = skiptypes_230245(ty, 8192);
		} LA57: ;
	}
	check = NIM_NIL;
	{
		if (!((*ty).Kind == ((NU8) 17))) goto LA60;
		{
			while (1) {
				check = NIM_NIL;
				f = lookupinrecordandbuildcheck_535216(c, n, (*ty).N, i, &check);
				{
					if (!!((f == NIM_NIL))) goto LA66;
					goto LA62;
				}
				LA66: ;
				{
					if (!((*ty).Sons->data[0] == NIM_NIL)) goto LA70;
					goto LA62;
				}
				LA70: ;
				ty = skiptypes_230245((*ty).Sons->data[0], 2048);
			}
		} LA62: ;
		{
			if (!!((f == NIM_NIL))) goto LA74;
			{
				NIM_BOOL LOC78;
				LOC78 = 0;
				LOC78 = fieldvisible_414842(c, f);
				if (!LOC78) goto LA79;
				markused_405251((*(*n).kindU.S6.Sons->data[1]).Info, f);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_535594((*n).kindU.S6.Sons->data[0]));
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), newsymnode_226132(f));
				asgnRefNoCycle((void**) (&(*n).Typ), (*f).Typ);
				{
					if (!(check == NIM_NIL)) goto LA83;
					result = n;
				}
				goto LA81;
				LA83: ;
				{
					asgnRefNoCycle((void**) (&(*check).kindU.S6.Sons->data[0]), n);
					asgnRefNoCycle((void**) (&(*check).Typ), (*n).Typ);
					result = check;
				}
				LA81: ;
			}
			LA79: ;
		}
		LA74: ;
	}
	goto LA58;
	LA60: ;
	{
		NIM_BOOL LOC87;
		LOC87 = 0;
		LOC87 = ((*ty).Kind == ((NU8) 18));
		if (!(LOC87)) goto LA88;
		LOC87 = !(((*ty).N == NIM_NIL));
		LA88: ;
		if (!LOC87) goto LA89;
		f = getsymfromlist_235228((*ty).N, i, 0);
		{
			if (!!((f == NIM_NIL))) goto LA93;
			markused_405251((*(*n).kindU.S6.Sons->data[1]).Info, f);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_535594((*n).kindU.S6.Sons->data[0]));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), newsymnode_226132(f));
			asgnRefNoCycle((void**) (&(*n).Typ), (*f).Typ);
			result = n;
		}
		LA93: ;
	}
	goto LA58;
	LA89: ;
	LA58: ;
	{
		ttype225852* t;
		if (!(result == NIM_NIL)) goto LA97;
		t = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, 14680064);
		{
			if (!((*t).Kind == ((NU8) 11) || (*t).Kind == ((NU8) 54))) goto LA101;
			result = readtypeparameter_535640(c, t, i, (*n).Info);
		}
		LA101: ;
	}
	LA97: ;
	BeforeRet: ;
	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, gatherusedsyms_491875)(tcontext290021* c, tnodeseq225810** usedsyms) {
	{
		tscope225840* scope_491881;
		tscope225840* HEX3Atmp_491992;
		tscope225840* current_491995;
		scope_491881 = 0;
		HEX3Atmp_491992 = 0;
		HEX3Atmp_491992 = (*c).Currentscope;
		current_491995 = HEX3Atmp_491992;
		{
			while (1) {
				if (!!((current_491995 == NIM_NIL))) goto LA3;
				scope_491881 = current_491995;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = HEX3DHEX3D_315667((*scope_491881).Usingsyms, NIM_NIL);
					if (!!(LOC6)) goto LA7;
					{
						tnode225816* s_491911;
						tnodeseq225810* HEX3Atmp_491986;
						NI i_491989;
						NI l_491991;
						s_491911 = 0;
						HEX3Atmp_491986 = 0;
						HEX3Atmp_491986 = (*scope_491881).Usingsyms;
						i_491989 = 0;
						l_491991 = HEX3Atmp_491986->Sup.len;
						{
							while (1) {
								if (!(i_491989 < l_491991)) goto LA11;
								s_491911 = HEX3Atmp_491986->data[i_491989];
								safeadd_491915(usedsyms, s_491911);
								i_491989 += 1;
							} LA11: ;
						}
					}
				}
				LA7: ;
				current_491995 = (*current_491995).Parent;
			} LA3: ;
		}
	}
}

N_NIMCALL(tsym225846*, lookupmacro_524201)(tcontext290021* c, tnode225816* n) {
	tsym225846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 3))) goto LA3;
		result = (*n).kindU.S4.Sym;
		{
			if (!!(((393216 &(1<<(((*result).Kind)&31)))!=0))) goto LA7;
			result = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		tident200021* LOC10;
		LOC10 = 0;
		LOC10 = considerquotedident_295010(n);
		result = searchinscopes_295355(c, LOC10, 393216);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, copyexcept_524142)(tnode225816* n, NI i) {
	tnode225816* result;
	result = 0;
	result = copynode_226323(n);
	{
		NI j_524168;
		NI HEX3Atmp_524184;
		NI LOC2;
		NI res_524187;
		j_524168 = 0;
		HEX3Atmp_524184 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_524184 = (LOC2 - 1);
		res_524187 = 0;
		{
			while (1) {
				if (!(res_524187 <= HEX3Atmp_524184)) goto LA4;
				j_524168 = res_524187;
				{
					if (!!((j_524168 == i))) goto LA7;
					add_226498(result, (*n).kindU.S6.Sons->data[j_524168]);
				}
				LA7: ;
				res_524187 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode225816*, semprocannotation_524247)(tcontext290021* c, tnode225816* prc) {
	tnode225816* result;
	tnode225816* n;
	result = 0;
	n = (*prc).kindU.S6.Sons->data[4];
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (n == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = ((*n).Kind == ((NU8) 1));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	{
		NI i_524316;
		NI HEX3Atmp_524488;
		NI LOC8;
		NI res_524491;
		i_524316 = 0;
		HEX3Atmp_524488 = 0;
		LOC8 = 0;
		LOC8 = len_226364(n);
		HEX3Atmp_524488 = (LOC8 - 1);
		res_524491 = 0;
		{
			while (1) {
				if (!(res_524491 <= HEX3Atmp_524488)) goto LA10;
				i_524316 = res_524491;
				{
					tnode225816* it;
					tnode225816* key;
					tsym225846* m;
					tnode225816* x;
					tnode225816* LOC33;
					it = (*n).kindU.S6.Sons->data[i_524316];
					{
						if (!((*it).Kind == ((NU8) 34))) goto LA14;
						key = (*it).kindU.S6.Sons->data[0];
					}
					goto LA12;
					LA14: ;
					{
						key = it;
					}
					LA12: ;
					m = lookupmacro_524201(c, key);
					{
						if (!(m == NIM_NIL)) goto LA19;
						{
							NIM_BOOL LOC23;
							LOC23 = 0;
							LOC23 = ((*key).Kind == ((NU8) 2));
							if (!(LOC23)) goto LA24;
							LOC23 = ((*(*key).kindU.S5.Ident).Sup.Id == 85);
							LA24: ;
							if (!LOC23) goto LA25;
							{
								tident200021* LOC29;
								LOC29 = 0;
								LOC29 = considerquotedident_295010((*prc).kindU.S6.Sons->data[0]);
								if (!eqStrings((*LOC29).S, ((NimStringDesc*) &TMP2998))) goto LA30;
								asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[0]), newidentnode_226125(iddelegator_200559, (*prc).Info));
								asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[4]), copyexcept_524142(n, i_524316));
							}
							goto LA27;
							LA30: ;
							{
								localerror_197955((*prc).Info, ((NU16) 199), ((NimStringDesc*) &TMP2888));
							}
							LA27: ;
						}
						LA25: ;
						goto LA11;
					}
					LA19: ;
					x = newnodei_226138(((NU8) 27), (*n).Info);
					LOC33 = 0;
					LOC33 = newsymnode_226132(m);
					add_226498(x, LOC33);
					asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[4]), copyexcept_524142(n, i_524316));
					{
						if (!((*it).Kind == ((NU8) 34))) goto LA36;
						add_226498(x, (*it).kindU.S6.Sons->data[1]);
					}
					LA36: ;
					add_226498(x, prc);
					result = semstmt_487277(c, x);
					goto BeforeRet;
				} LA11: ;
				res_524491 += 1;
			} LA10: ;
		}
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, istoplevel_291437)(tcontext290021* c) {
	NIM_BOOL result;
	result = 0;
	result = ((*(*c).Currentscope).Depthlevel <= 2);
	return result;
}

N_NIMCALL(tsym225846*, newsymg_487930)(NU8 kind, tnode225816* n, tcontext290021* c) {
	tsym225846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 3))) goto LA3;
		result = (*n).kindU.S4.Sym;
		{
			NimStringDesc* LOC9;
			if (!!(((*result).Kind == kind))) goto LA7;
			LOC9 = 0;
			LOC9 = HEX24_198126(TMP2999);
			internalerror_198006(LOC9);
		}
		LA7: ;
		asgnRefNoCycle((void**) (&(*result).Owner), getcurrowner_290256());
	}
	goto LA1;
	LA3: ;
	{
		tident200021* LOC11;
		tsym225846* LOC12;
		LOC11 = 0;
		LOC11 = considerquotedident_295010(n);
		LOC12 = 0;
		LOC12 = getcurrowner_290256();
		result = newsym_226074(kind, LOC11, LOC12, (*n).Info);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym225846*, semidentvis_487990)(tcontext290021* c, NU8 kind, tnode225816* n, NU32 allowed) {
	tsym225846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 31))) goto LA3;
		{
			NIM_BOOL LOC7;
			NI LOC8;
			tident200021* v;
			LOC7 = 0;
			LOC8 = 0;
			LOC8 = sonslen_226249(n);
			LOC7 = (LOC8 == 2);
			if (!(LOC7)) goto LA9;
			LOC7 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
			LA9: ;
			if (!LOC7) goto LA10;
			result = newsymg_487930(kind, (*n).kindU.S6.Sons->data[1], c);
			v = (*(*n).kindU.S6.Sons->data[0]).kindU.S5.Ident;
			{
				NIM_BOOL LOC14;
				LOC14 = 0;
				LOC14 = ((allowed &(1<<((((NU8) 1))&31)))!=0);
				if (!(LOC14)) goto LA15;
				LOC14 = ((*v).Sup.Id == 75);
				LA15: ;
				if (!LOC14) goto LA16;
				(*result).Flags |= ((NI32)1)<<((((NU8) 1))%(sizeof(NI32)*8));
			}
			goto LA12;
			LA16: ;
			{
				localerror_197955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 174), (*v).S);
			}
			LA12: ;
		}
		goto LA5;
		LA10: ;
		{
			illformedast_291406(n);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		result = newsymg_487930(kind, n, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym225846*, semidentwithpragma_487999)(tcontext290021* c, NU8 kind, tnode225816* n, NU32 allowed) {
	tsym225846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 43))) goto LA3;
		checksonslen_291416(n, 2);
		result = semidentvis_487990(c, kind, (*n).kindU.S6.Sons->data[0], allowed);
		switch (kind) {
		case ((NU8) 7):
		{
		}
		break;
		case ((NU8) 19):
		{
			pragma_310079(c, result, (*n).kindU.S6.Sons->data[1], TMP3001);
		}
		break;
		case ((NU8) 8):
		{
			pragma_310079(c, result, (*n).kindU.S6.Sons->data[1], TMP3002);
		}
		break;
		case ((NU8) 9):
		{
			pragma_310079(c, result, (*n).kindU.S6.Sons->data[1], TMP3002);
		}
		break;
		case ((NU8) 10):
		{
			pragma_310079(c, result, (*n).kindU.S6.Sons->data[1], TMP3003);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	goto LA1;
	LA3: ;
	{
		result = semidentvis_487990(c, kind, n, allowed);
	}
	LA1: ;
	{
		if (!(gcmd_169120 == ((NU8) 7))) goto LA14;
	}
	LA14: ;
	return result;
}

static N_INLINE(void, suggestsym_420882)(tlineinfo195539 info, tsym225846* s) {
	{
		if (!((gglobaloptions_169118 &(1<<((((NU8) 26))&31)))!=0)) goto LA3;
		findusages_418417(info, s);
	}
	LA3: ;
	{
		if (!((gglobaloptions_169118 &(1<<((((NU8) 25))&31)))!=0)) goto LA7;
		finddefinition_418457(info, s);
	}
	LA7: ;
	{
		if (!isserving_169133) goto LA11;
		addtosourcemap_418598(s, info);
	}
	LA11: ;
}

N_NIMCALL(tsym225846*, semidentdef_519665)(tcontext290021* c, tnode225816* n, NU8 kind) {
	tsym225846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_291437(c);
		if (!LOC3) goto LA4;
		result = semidentwithpragma_487999(c, kind, n, 2);
		(*result).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
	}
	goto LA1;
	LA4: ;
	{
		result = semidentwithpragma_487999(c, kind, n, 0);
	}
	LA1: ;
	suggestsym_420882((*n).Info, result);
	return result;
}

N_NIMCALL(ttype225852*, semgenericconstraints_503975)(tcontext290021* c, ttype225852* x) {
	ttype225852* result;
	ttypeseq225848* LOC1;
	TY411748 LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = (ttypeseq225848*) newSeq((&NTI225848), 1);
	memset((void*)LOC2, 0, sizeof(LOC2));
	LOC2[0] = x;
	asgnRefNoCycle((void**) (&LOC1->data[0]), LOC2[0]);
	result = newtypewithsons_290823(c, ((NU8) 12), LOC1);
	return result;
}

N_NIMCALL(tnode225816*, semgenericparamlist_504001)(tcontext290021* c, tnode225816* n, ttype225852* father) {
	tnode225816* result;
	result = 0;
	result = copynode_226323(n);
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		illformedast_291406(n);
		goto BeforeRet;
	}
	LA3: ;
	{
		NI i_504028;
		NI HEX3Atmp_504343;
		NI LOC6;
		NI res_504346;
		i_504028 = 0;
		HEX3Atmp_504343 = 0;
		LOC6 = 0;
		LOC6 = sonslen_226249(n);
		HEX3Atmp_504343 = (NI32)(LOC6 - 1);
		res_504346 = 0;
		{
			while (1) {
				tnode225816* a;
				NI l;
				tnode225816* def;
				NI LOC13;
				tnode225816* constraint;
				NI LOC20;
				ttype225852* typ;
				if (!(res_504346 <= HEX3Atmp_504343)) goto LA8;
				i_504028 = res_504346;
				a = (*n).kindU.S6.Sons->data[i_504028];
				{
					if (!!(((*a).Kind == ((NU8) 35)))) goto LA11;
					illformedast_291406(n);
				}
				LA11: ;
				l = len_226364(a);
				LOC13 = 0;
				{
					if (!NIM_FALSE) goto LA16;
					LOC13 = -1;
				}
				goto LA14;
				LA16: ;
				{
					NI LOC19;
					LOC19 = 0;
					LOC19 = len_226364(a);
					LOC13 = (NI32)(LOC19 + -1);
				}
				LA14: ;
				def = HEX5BHEX5D_226698(a, LOC13);
				LOC20 = 0;
				{
					if (!NIM_FALSE) goto LA23;
					LOC20 = -2;
				}
				goto LA21;
				LA23: ;
				{
					NI LOC26;
					LOC26 = 0;
					LOC26 = len_226364(a);
					LOC20 = (NI32)(LOC26 + -2);
				}
				LA21: ;
				constraint = HEX5BHEX5D_226698(a, LOC20);
				typ = 0;
				{
					if (!!(((*constraint).Kind == ((NU8) 1)))) goto LA29;
					typ = semtypenode_487269(c, constraint, NIM_NIL);
					{
						NIM_BOOL LOC33;
						NI LOC35;
						LOC33 = 0;
						LOC33 = !(((*typ).Kind == ((NU8) 59)));
						if (LOC33) goto LA34;
						LOC35 = 0;
						LOC35 = len_230005(typ);
						LOC33 = (LOC35 == 0);
						LA34: ;
						if (!LOC33) goto LA36;
						{
							if (!((*typ).Kind == ((NU8) 8))) goto LA40;
							{
								ttypeseq225848* LOC46;
								TY411748 LOC47;
								if (!((*(*typ).Sons->data[0]).Kind == ((NU8) 0))) goto LA44;
								LOC46 = 0;
								LOC46 = (ttypeseq225848*) newSeq((&NTI225848), 1);
								memset((void*)LOC47, 0, sizeof(LOC47));
								LOC47[0] = newtypes_290214(((NU8) 0), c);
								asgnRefNoCycle((void**) (&LOC46->data[0]), LOC47[0]);
								typ = newtypewithsons_290823(c, ((NU8) 8), LOC46);
							}
							LA44: ;
						}
						goto LA38;
						LA40: ;
						{
							typ = semgenericconstraints_503975(c, typ);
						}
						LA38: ;
					}
					LA36: ;
				}
				LA29: ;
				{
					if (!!(((*def).Kind == ((NU8) 1)))) goto LA51;
					def = semconstexpr_488503(c, def);
					{
						if (!(typ == NIM_NIL)) goto LA55;
						{
							ttypeseq225848* LOC61;
							TY411748 LOC62;
							if (!!(((*(*def).Typ).Kind == ((NU8) 8)))) goto LA59;
							LOC61 = 0;
							LOC61 = (ttypeseq225848*) newSeq((&NTI225848), 1);
							memset((void*)LOC62, 0, sizeof(LOC62));
							LOC62[0] = (*def).Typ;
							asgnRefNoCycle((void**) (&LOC61->data[0]), LOC62[0]);
							typ = newtypewithsons_290823(c, ((NU8) 59), LOC61);
						}
						LA59: ;
					}
					goto LA53;
					LA55: ;
					{
						asgnRefNoCycle((void**) (&(*def).Typ), skiptypes_230245((*def).Typ, 256));
						{
							NIM_BOOL LOC66;
							LOC66 = 0;
							LOC66 = containsgenerictype_272929((*def).Typ);
							if (!!(LOC66)) goto LA67;
							def = fitnode_487245(c, typ, def);
						}
						LA67: ;
					}
					LA53: ;
				}
				LA51: ;
				{
					if (!(typ == NIM_NIL)) goto LA71;
					typ = newtypes_290214(((NU8) 12), c);
					{
						if (!(father == NIM_NIL)) goto LA75;
						(*typ).Flags |= ((NI32)1)<<((((NU8) 25))%(sizeof(NI32)*8));
					}
					LA75: ;
				}
				LA71: ;
				(*typ).Flags |= ((NI32)1)<<((((NU8) 23))%(sizeof(NI32)*8));
				{
					NI j_504243;
					NI HEX3Atmp_504338;
					NI res_504341;
					j_504243 = 0;
					HEX3Atmp_504338 = 0;
					HEX3Atmp_504338 = (NI32)(l - 3);
					res_504341 = 0;
					{
						while (1) {
							ttype225852* finaltype;
							tsym225846* s;
							tnode225816* LOC102;
							if (!(res_504341 <= HEX3Atmp_504338)) goto LA79;
							j_504243 = res_504341;
							{
								if (!(j_504243 == 0)) goto LA82;
								finaltype = typ;
							}
							goto LA80;
							LA82: ;
							{
								finaltype = copytype_226195(typ, (*typ).Owner, NIM_FALSE);
							}
							LA80: ;
							{
								NIM_BOOL LOC87;
								tsym225846* LOC91;
								LOC87 = 0;
								LOC87 = ((*finaltype).Kind == ((NU8) 59));
								if (LOC87) goto LA88;
								LOC87 = (((*typ).Flags &(1<<((((NU8) 25))&31)))!=0);
								LA88: ;
								if (!LOC87) goto LA89;
								LOC91 = 0;
								LOC91 = newsymg_487930(((NU8) 4), (*a).kindU.S6.Sons->data[j_504243], c);
								s = linkto_226825(LOC91, finaltype);
							}
							goto LA85;
							LA89: ;
							{
								tsym225846* LOC93;
								LOC93 = 0;
								LOC93 = newsymg_487930(((NU8) 7), (*a).kindU.S6.Sons->data[j_504243], c);
								s = linkto_226825(LOC93, finaltype);
							}
							LA85: ;
							{
								if (!!(((*def).Kind == ((NU8) 1)))) goto LA96;
								asgnRefNoCycle((void**) (&(*s).Ast), def);
							}
							LA96: ;
							{
								if (!!((father == NIM_NIL))) goto LA100;
								addsonskipintlit_282572(father, (*s).Typ);
							}
							LA100: ;
							(*s).Position = len_226364(result);
							LOC102 = 0;
							LOC102 = newsymnode_226132(s);
							addson_226287(result, LOC102);
							{
								if (!!((((*s).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA105;
								adddecl_295694(c, s);
							}
							LA105: ;
							res_504341 += 1;
						} LA79: ;
					}
				}
				res_504346 += 1;
			} LA8: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semparamtype_501513)(tcontext290021* c, tnode225816* n, tnode225816** constraint) {
	ttype225852* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 40))) goto LA3;
		result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		unsureAsgnRef((void**) (&(*constraint)), semnodekindconstraints_321527(n));
	}
	goto LA1;
	LA3: ;
	{
		result = semtypenode_487269(c, n, NIM_NIL);
	}
	LA1: ;
	return result;
}
N_NIMCALL(void, TMP3025)(void* p, NI op) {
	TY501454* a;
	a = (TY501454*)p;
	nimGCvisit((void*)(*a).Paramname500297, op);
	nimGCvisit((void*)(*a).Genericparams500295, op);
	nimGCvisit((void*)(*a).C500293, op);
}

N_CLOSURE(ttype225852*, addimplicitgenericimpl_500318)(ttype225852* typeclass, tident200021* typid, void* ClEnv) {
	ttype225852* result;
	TY501454* HEX3Aenvp_501469;
	tident200021* finaltypid;
	tsym225846* owner;
	tsym225846* s;
	tsym225846* LOC28;
	tnode225816* LOC29;
	result = 0;
	HEX3Aenvp_501469 = (TY501454*) ClEnv;
	{
		if (!!((typid == NIM_NIL))) goto LA3;
		finaltypid = typid;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC6;
		LOC6 = 0;
		LOC6 = rawNewString((*HEX3Aenvp_501469).Paramname500297->Sup.len + 5);
appendString(LOC6, (*HEX3Aenvp_501469).Paramname500297);
appendString(LOC6, ((NimStringDesc*) &TMP3026));
		finaltypid = getident_200472(LOC6);
	}
	LA1: ;
	{
		if (!((*HEX3Aenvp_501469).Genericparams500295 == NIM_NIL)) goto LA9;
		goto BeforeRet;
	}
	LA9: ;
	{
		NI i_500370;
		NI HEX3Atmp_500482;
		NI LOC12;
		NI res_500485;
		i_500370 = 0;
		HEX3Atmp_500482 = 0;
		LOC12 = 0;
		LOC12 = len_226364((*HEX3Aenvp_501469).Genericparams500295);
		HEX3Atmp_500482 = (NI32)(LOC12 - 1);
		res_500485 = 0;
		{
			while (1) {
				if (!(res_500485 <= HEX3Atmp_500482)) goto LA14;
				i_500370 = res_500485;
				{
					if (!((*(*(*(*(*HEX3Aenvp_501469).Genericparams500295).kindU.S6.Sons->data[i_500370]).kindU.S4.Sym).Name).Sup.Id == (*finaltypid).Sup.Id)) goto LA17;
					result = (*(*(*HEX3Aenvp_501469).Genericparams500295).kindU.S6.Sons->data[i_500370]).Typ;
					goto BeforeRet;
				}
				LA17: ;
				res_500485 += 1;
			} LA14: ;
		}
	}
	{
		if (!!(((*typeclass).Sym == NIM_NIL))) goto LA21;
		owner = (*typeclass).Sym;
	}
	goto LA19;
	LA21: ;
	{
		owner = getcurrowner_290256();
	}
	LA19: ;
	s = newsym_226074(((NU8) 7), finaltypid, owner, (*HEX3Aenvp_501469).Info500298);
	{
		if (!(typid == NIM_NIL)) goto LA26;
		(*s).Flags |= ((NI32)1)<<((((NU8) 29))%(sizeof(NI32)*8));
	}
	LA26: ;
	LOC28 = 0;
	LOC28 = linkto_226825(s, typeclass);
	(*typeclass).Flags |= ((NI32)1)<<((((NU8) 24))%(sizeof(NI32)*8));
	(*s).Position = len_226364((*HEX3Aenvp_501469).Genericparams500295);
	LOC29 = 0;
	LOC29 = newsymnode_226132(s);
	addson_226287((*HEX3Aenvp_501469).Genericparams500295, LOC29);
	result = typeclass;
	adddecl_295694((*HEX3Aenvp_501469).C500293, s);
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, liftparamtype_500291)(tcontext290021* c, NU8 prockind, tnode225816* genericparams, ttype225852* paramtype, NimStringDesc* paramname, tlineinfo195539 info, NIM_BOOL anon) {
	ttype225852* result;
	TY501454* HEX3Aenv_501511;
	NimStringDesc* LOC1;
	tident200021* paramtypid;
	result = 0;
	HEX3Aenv_501511 = 0;
	HEX3Aenv_501511 = (TY501454*) newObj((&NTI501512), sizeof(TY501454));
	LOC1 = 0;
	LOC1 = (*HEX3Aenv_501511).Paramname500297; (*HEX3Aenv_501511).Paramname500297 = copyStringRC1(paramname);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	asgnRefNoCycle((void**) (&(*HEX3Aenv_501511).Genericparams500295), genericparams);
	(*HEX3Aenv_501511).Info500298 = info;
	asgnRef((void**) (&(*HEX3Aenv_501511).C500293), c);
	{
		if (!(paramtype == NIM_NIL)) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	{
		NIM_BOOL LOC8;
		LOC8 = 0;
		LOC8 = !(anon);
		if (!(LOC8)) goto LA9;
		LOC8 = !(((*paramtype).Sym == NIM_NIL));
		LA9: ;
		if (!LOC8) goto LA10;
		paramtypid = (*(*paramtype).Sym).Name;
	}
	goto LA6;
	LA10: ;
	{
		paramtypid = NIM_NIL;
	}
	LA6: ;
	switch ((*paramtype).Kind) {
	case ((NU8) 58):
	{
		TY500319 LOC14;
		ttype225852* LOC15;
		memset((void*)(&LOC14), 0, sizeof(LOC14));
		LOC14.ClPrc = addimplicitgenericimpl_500318; LOC14.ClEnv = HEX3Aenv_501511;
		LOC15 = 0;
		LOC15 = newtypes_290214(((NU8) 12), (*HEX3Aenv_501511).C500293);
		result = LOC14.ClEnv? LOC14.ClPrc(LOC15, paramtypid, LOC14.ClEnv):((TMP3027)(LOC14.ClPrc))(LOC15, paramtypid);
	}
	break;
	case ((NU8) 59):
	{
		ttype225852* base;
		ttype225852* lifted_500547;
		ttype225852* LOC25;
		TY500319 LOC37;
		ttypeseq225848* LOC38;
		TY411748 LOC39;
		ttype225852* LOC40;
		{
			if (!!(((*paramtype).N == NIM_NIL))) goto LA19;
			goto BeforeRet;
		}
		LA19: ;
		{
			if (!(((*paramtype).Flags &(1<<((((NU8) 9))&31)))!=0)) goto LA23;
			goto BeforeRet;
		}
		LA23: ;
		LOC25 = 0;
		LOC25 = base_263038(paramtype);
		lifted_500547 = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, LOC25, (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_FALSE);
		{
			if (!!((lifted_500547 == NIM_NIL))) goto LA28;
			base = lifted_500547;
		}
		goto LA26;
		LA28: ;
		{
			base = base_263038(paramtype);
		}
		LA26: ;
		{
			NIM_BOOL LOC33;
			LOC33 = 0;
			LOC33 = ismetatype_226752(base);
			if (!(LOC33)) goto LA34;
			LOC33 = (prockind == ((NU8) 17));
			LA34: ;
			if (!LOC33) goto LA35;
			localerror_197955((*HEX3Aenv_501511).Info500298, ((NU16) 201), (*HEX3Aenv_501511).Paramname500297);
		}
		LA35: ;
		memset((void*)(&LOC37), 0, sizeof(LOC37));
		LOC37.ClPrc = addimplicitgenericimpl_500318; LOC37.ClEnv = HEX3Aenv_501511;
		LOC38 = 0;
		LOC38 = (ttypeseq225848*) newSeq((&NTI225848), 1);
		memset((void*)LOC39, 0, sizeof(LOC39));
		LOC39[0] = base;
		asgnRefNoCycle((void**) (&LOC38->data[0]), LOC39[0]);
		LOC40 = 0;
		LOC40 = newtypewithsons_290823((*HEX3Aenv_501511).C500293, ((NU8) 59), LOC38);
		result = LOC37.ClEnv? LOC37.ClPrc(LOC40, paramtypid, LOC37.ClEnv):((TMP3028)(LOC37.ClPrc))(LOC40, paramtypid);
		(*result).Flags = ((*result).Flags | 4194816);
	}
	break;
	case ((NU8) 8):
	{
		{
			TY500319 LOC55;
			ttypeseq225848* LOC56;
			TY411748 LOC57;
			ttype225852* LOC58;
			if (!!((((*paramtype).Flags &(1<<((((NU8) 9))&31)))!=0))) goto LA44;
			{
				NIM_BOOL LOC48;
				NIM_BOOL LOC49;
				ttype225852* LOC50;
				LOC48 = 0;
				LOC49 = 0;
				LOC50 = 0;
				LOC50 = base_263038(paramtype);
				LOC49 = ((*LOC50).Kind == ((NU8) 0));
				if (!(LOC49)) goto LA51;
				LOC49 = !((paramtypid == NIM_NIL));
				LA51: ;
				LOC48 = LOC49;
				if (!(LOC48)) goto LA52;
				LOC48 = ((*paramtypid).Sup.Id == (*typedescid_500285).Sup.Id);
				LA52: ;
				if (!LOC48) goto LA53;
				paramtypid = NIM_NIL;
			}
			LA53: ;
			memset((void*)(&LOC55), 0, sizeof(LOC55));
			LOC55.ClPrc = addimplicitgenericimpl_500318; LOC55.ClEnv = HEX3Aenv_501511;
			LOC56 = 0;
			LOC56 = (ttypeseq225848*) newSeq((&NTI225848), 1);
			memset((void*)LOC57, 0, sizeof(LOC57));
			LOC57[0] = base_263038(paramtype);
			asgnRefNoCycle((void**) (&LOC56->data[0]), LOC57[0]);
			LOC58 = 0;
			LOC58 = newtypewithsons_290823((*HEX3Aenv_501511).C500293, ((NU8) 8), LOC56);
			result = LOC55.ClEnv? LOC55.ClPrc(LOC58, paramtypid, LOC55.ClEnv):((TMP3029)(LOC55.ClPrc))(LOC58, paramtypid);
		}
		LA44: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			NI LOC62;
			LOC62 = 0;
			LOC62 = sonslen_226255(paramtype);
			if (!(LOC62 == 1)) goto LA63;
			result = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, (*paramtype).Sons->data[0], (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_TRUE);
		}
		LA63: ;
	}
	break;
	case ((NU8) 24):
	case ((NU8) 19):
	case ((NU8) 16):
	case ((NU8) 27):
	case ((NU8) 23):
	case ((NU8) 21):
	case ((NU8) 22):
	case ((NU8) 25):
	{
		{
			NIM_BOOL LOC68;
			ttype225852* LOC70;
			ttype225852* typ;
			ttypeseq225848* LOC73;
			TY411748 LOC74;
			TY500319 LOC75;
			LOC68 = 0;
			LOC68 = ((*paramtype).Kind == ((NU8) 24));
			if (!(LOC68)) goto LA69;
			LOC70 = 0;
			LOC70 = lastson_226267(paramtype);
			LOC68 = ((*LOC70).Kind == ((NU8) 0));
			LA69: ;
			if (!LOC68) goto LA71;
			LOC73 = 0;
			LOC73 = (ttypeseq225848*) newSeq((&NTI225848), 1);
			memset((void*)LOC74, 0, sizeof(LOC74));
			LOC74[0] = newtypes_290214((*paramtype).Kind, (*HEX3Aenv_501511).C500293);
			asgnRefNoCycle((void**) (&LOC73->data[0]), LOC74[0]);
			typ = newtypewithsons_290823((*HEX3Aenv_501511).C500293, ((NU8) 51), LOC73);
			memset((void*)(&LOC75), 0, sizeof(LOC75));
			LOC75.ClPrc = addimplicitgenericimpl_500318; LOC75.ClEnv = HEX3Aenv_501511;
			result = LOC75.ClEnv? LOC75.ClPrc(typ, paramtypid, LOC75.ClEnv):((TMP3030)(LOC75.ClPrc))(typ, paramtypid);
		}
		goto LA66;
		LA71: ;
		{
			{
				NI i_500740;
				NI HEX3Atmp_501431;
				NI res_501434;
				i_500740 = 0;
				HEX3Atmp_501431 = 0;
				HEX3Atmp_501431 = ((*paramtype).Sons->Sup.len - 1);
				res_501434 = 0;
				{
					while (1) {
						ttype225852* lifted;
						if (!(res_501434 <= HEX3Atmp_501431)) goto LA79;
						i_500740 = res_501434;
						lifted = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, (*paramtype).Sons->data[i_500740], (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_FALSE);
						{
							if (!!((lifted == NIM_NIL))) goto LA82;
							asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_500740]), lifted);
							result = paramtype;
						}
						LA82: ;
						res_501434 += 1;
					} LA79: ;
				}
			}
		}
		LA66: ;
	}
	break;
	case ((NU8) 10):
	{
		ttypeseq225848* LOC97;
		TY290919 LOC98;
		TY500319 LOC99;
		result = newtypes_290214(((NU8) 9), (*HEX3Aenv_501511).C500293);
		rawaddson_230562(result, paramtype);
		{
			NI i_500769;
			NI HEX3Atmp_501437;
			NI LOC86;
			NI res_501440;
			i_500769 = 0;
			HEX3Atmp_501437 = 0;
			LOC86 = 0;
			LOC86 = sonslen_226255(paramtype);
			HEX3Atmp_501437 = (NI32)(LOC86 - 2);
			res_501440 = 0;
			{
				while (1) {
					ttype225852* LOC89;
					if (!(res_501440 <= HEX3Atmp_501437)) goto LA88;
					i_500769 = res_501440;
					LOC89 = 0;
					LOC89 = newtypes_290214(((NU8) 58), (*HEX3Aenv_501511).C500293);
					rawaddson_230562(result, LOC89);
					res_501440 += 1;
				} LA88: ;
			}
		}
		{
			ttype225852* LOC92;
			ttype225852* LOC95;
			TY500319 LOC96;
			LOC92 = 0;
			LOC92 = lastson_226267(paramtype);
			if (!((*LOC92).Kind == ((NU8) 52))) goto LA93;
			(*result).Kind = ((NU8) 53);
			LOC95 = 0;
			LOC95 = lastson_226267(paramtype);
			rawaddson_230562(result, LOC95);
			memset((void*)(&LOC96), 0, sizeof(LOC96));
			LOC96.ClPrc = addimplicitgenericimpl_500318; LOC96.ClEnv = HEX3Aenv_501511;
			result = LOC96.ClEnv? LOC96.ClPrc(result, paramtypid, LOC96.ClEnv):((TMP3031)(LOC96.ClPrc))(result, paramtypid);
			goto BeforeRet;
		}
		LA93: ;
		result = instgenericcontainer_490657((*HEX3Aenv_501511).C500293, (*(*paramtype).Sym).Info, result, NIM_TRUE);
		LOC97 = 0;
		LOC97 = (ttypeseq225848*) newSeq((&NTI225848), 2);
		memset((void*)LOC98, 0, sizeof(LOC98));
		LOC98[0] = paramtype;
		LOC98[1] = result;
		asgnRefNoCycle((void**) (&LOC97->data[0]), LOC98[0]);
		asgnRefNoCycle((void**) (&LOC97->data[1]), LOC98[1]);
		result = newtypewithsons_290823((*HEX3Aenv_501511).C500293, ((NU8) 54), LOC97);
		memset((void*)(&LOC99), 0, sizeof(LOC99));
		LOC99.ClPrc = addimplicitgenericimpl_500318; LOC99.ClEnv = HEX3Aenv_501511;
		result = LOC99.ClEnv? LOC99.ClPrc(result, paramtypid, LOC99.ClEnv):((TMP3032)(LOC99.ClPrc))(result, paramtypid);
	}
	break;
	case ((NU8) 49):
	{
		{
			TY500319 LOC119;
			if (!((*paramtype).Callconv == ((NU8) 5))) goto LA103;
			{
				if (!!(((409600 &(1<<((prockind)&31)))!=0))) goto LA107;
				localerror_197955((*HEX3Aenv_501511).Info500298, ((NU16) 203), ((NimStringDesc*) &TMP2888));
			}
			LA107: ;
			{
				NI LOC111;
				ttype225852* lifted;
				ttype225852* LOC114;
				LOC111 = 0;
				LOC111 = len_230005(paramtype);
				if (!(LOC111 == 1)) goto LA112;
				LOC114 = 0;
				LOC114 = base_263038(paramtype);
				lifted = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, LOC114, (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_FALSE);
				{
					if (!!((lifted == NIM_NIL))) goto LA117;
					asgnRefNoCycle((void**) (&(*paramtype).Sons->data[0]), lifted);
				}
				LA117: ;
			}
			LA112: ;
			memset((void*)(&LOC119), 0, sizeof(LOC119));
			LOC119.ClPrc = addimplicitgenericimpl_500318; LOC119.ClEnv = HEX3Aenv_501511;
			result = LOC119.ClEnv? LOC119.ClPrc(paramtype, paramtypid, LOC119.ClEnv):((TMP3033)(LOC119.ClPrc))(paramtype, paramtypid);
		}
		LA103: ;
	}
	break;
	case ((NU8) 11):
	{
		ttype225852* liftbody;
		ttype225852* LOC141;
		{
			ttype225852* LOC123;
			ttype225852* cp;
			tsym225846* LOC126;
			TY500319 LOC127;
			LOC123 = 0;
			LOC123 = lastson_226267(paramtype);
			if (!((*LOC123).Kind == ((NU8) 52))) goto LA124;
			LOC126 = 0;
			LOC126 = getcurrowner_290256();
			cp = copytype_226195(paramtype, LOC126, NIM_FALSE);
			(*cp).Kind = ((NU8) 53);
			memset((void*)(&LOC127), 0, sizeof(LOC127));
			LOC127.ClPrc = addimplicitgenericimpl_500318; LOC127.ClEnv = HEX3Aenv_501511;
			result = LOC127.ClEnv? LOC127.ClPrc(cp, paramtypid, LOC127.ClEnv):((TMP3034)(LOC127.ClPrc))(cp, paramtypid);
			goto BeforeRet;
		}
		LA124: ;
		{
			NI i_500869;
			NI HEX3Atmp_501443;
			NI res_501446;
			i_500869 = 0;
			HEX3Atmp_501443 = 0;
			HEX3Atmp_501443 = (NI32)((*paramtype).Sons->Sup.len - 2);
			res_501446 = 1;
			{
				while (1) {
					ttype225852* lifted;
					if (!(res_501446 <= HEX3Atmp_501443)) goto LA130;
					i_500869 = res_501446;
					lifted = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, (*paramtype).Sons->data[i_500869], (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_FALSE);
					{
						if (!!((lifted == NIM_NIL))) goto LA133;
						asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_500869]), lifted);
						result = paramtype;
						{
							ttype225852* LOC137;
							NimStringDesc* LOC140;
							LOC137 = 0;
							LOC137 = lastson_226267(result);
							if (!!((((*LOC137).Flags &(1<<((((NU8) 19))&31)))!=0))) goto LA138;
							LOC140 = 0;
							LOC140 = HEX24_198126(TMP3035);
							internalerror_198006(LOC140);
						}
						LA138: ;
					}
					LA133: ;
					res_501446 += 1;
				} LA130: ;
			}
		}
		LOC141 = 0;
		LOC141 = lastson_226267(paramtype);
		liftbody = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, LOC141, (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_TRUE);
		{
			if (!!((liftbody == NIM_NIL))) goto LA144;
			result = liftbody;
			{
				NimStringDesc* LOC150;
				if (!!((((*result).Flags &(1<<((((NU8) 19))&31)))!=0))) goto LA148;
				LOC150 = 0;
				LOC150 = HEX24_198126(TMP3035);
				internalerror_198006(LOC150);
			}
			LA148: ;
		}
		LA144: ;
	}
	break;
	case ((NU8) 9):
	{
		{
			NI i_500993;
			NI HEX3Atmp_501449;
			NI LOC153;
			NI res_501452;
			i_500993 = 0;
			HEX3Atmp_501449 = 0;
			LOC153 = 0;
			LOC153 = sonslen_226255(paramtype);
			HEX3Atmp_501449 = (LOC153 - 1);
			res_501452 = 1;
			{
				while (1) {
					ttype225852* lifted;
					if (!(res_501452 <= HEX3Atmp_501449)) goto LA155;
					i_500993 = res_501452;
					lifted = liftparamtype_500291((*HEX3Aenv_501511).C500293, prockind, (*HEX3Aenv_501511).Genericparams500295, (*paramtype).Sons->data[i_500993], (*HEX3Aenv_501511).Paramname500297, (*HEX3Aenv_501511).Info500298, NIM_FALSE);
					{
						if (!!((lifted == NIM_NIL))) goto LA158;
						asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_500993]), lifted);
					}
					LA158: ;
					res_501452 += 1;
				} LA155: ;
			}
		}
	}
	break;
	case ((NU8) 52):
	case ((NU8) 51):
	case ((NU8) 55):
	case ((NU8) 56):
	case ((NU8) 57):
	{
		TY500319 LOC161;
		tsym225846* LOC162;
		ttype225852* LOC163;
		memset((void*)(&LOC161), 0, sizeof(LOC161));
		LOC161.ClPrc = addimplicitgenericimpl_500318; LOC161.ClEnv = HEX3Aenv_501511;
		LOC162 = 0;
		LOC162 = getcurrowner_290256();
		LOC163 = 0;
		LOC163 = copytype_226195(paramtype, LOC162, NIM_TRUE);
		result = LOC161.ClEnv? LOC161.ClPrc(LOC163, paramtypid, LOC161.ClEnv):((TMP3036)(LOC161.ClPrc))(LOC163, paramtypid);
	}
	break;
	case ((NU8) 6):
	{
		{
			TY500319 LOC169;
			ttype225852* LOC170;
			if (!!(((393216 &(1<<((prockind)&31)))!=0))) goto LA167;
			memset((void*)(&LOC169), 0, sizeof(LOC169));
			LOC169.ClPrc = addimplicitgenericimpl_500318; LOC169.ClEnv = HEX3Aenv_501511;
			LOC170 = 0;
			LOC170 = newtypes_290214(((NU8) 58), (*HEX3Aenv_501511).C500293);
			result = LOC169.ClEnv? LOC169.ClPrc(LOC170, paramtypid, LOC169.ClEnv):((TMP3037)(LOC169.ClPrc))(LOC170, paramtypid);
		}
		LA167: ;
	}
	break;
	case ((NU8) 12):
	{
		markused_405251((*HEX3Aenv_501511).Info500298, (*paramtype).Sym);
		{
			if (!(((*paramtype).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA174;
			(*paramtype).Flags &= ~(((NI32)1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
			(*(*paramtype).Sym).Kind = ((NU8) 7);
		}
		LA174: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semproctypenode_501546)(tcontext290021* c, tnode225816* n, tnode225816* genericparams, ttype225852* prev, NU8 kind, NIM_BOOL istype) {
	ttype225852* result;
	tnode225816* res;
	intset222056 cl;
	toptionentry290005* LOC1;
	intset222056 check;
	NI counter;
	ttype225852* r;
	result = 0;
	res = 0;
	memset((void*)(&cl), 0, sizeof(cl));
	checkminsonslen_291426(n, 1);
	result = neworprevtype_495130(((NU8) 25), prev, c);
	LOC1 = 0;
	LOC1 = lastoptionentry_290176(c);
	(*result).Callconv = (*LOC1).Defaultcc;
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 76), (*n).Info));
	{
		NIM_BOOL LOC4;
		NI LOC6;
		LOC4 = 0;
		LOC4 = !((genericparams == NIM_NIL));
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = sonslen_226249(genericparams);
		LOC4 = (LOC6 == 0);
		LA5: ;
		if (!LOC4) goto LA7;
		chckNil((void*)(&cl));
		memset((void*)(&cl), 0, sizeof(cl));
		initintset_222950((&cl));
	}
	LA7: ;
	rawaddson_230562(result, NIM_NIL);
	res = newnodei_226138(((NU8) 151), (*n).Info);
	addson_226287((*result).N, res);
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_222950((&check));
	counter = 0;
	{
		NI i_501588;
		NI HEX3Atmp_502291;
		NI LOC10;
		NI res_502294;
		i_501588 = 0;
		HEX3Atmp_502291 = 0;
		LOC10 = 0;
		LOC10 = len_226364(n);
		HEX3Atmp_502291 = (NI32)(LOC10 - 1);
		res_502294 = 1;
		{
			while (1) {
				if (!(res_502294 <= HEX3Atmp_502291)) goto LA12;
				i_501588 = res_502294;
				{
					tnode225816* a;
					ttype225852* typ;
					tnode225816* def;
					tnode225816* constraint;
					NI length;
					NIM_BOOL hastype;
					NIM_BOOL hasdefault;
					a = (*n).kindU.S6.Sons->data[i_501588];
					{
						if (!!(((*a).Kind == ((NU8) 35)))) goto LA16;
						{
							NIM_BOOL LOC20;
							LOC20 = 0;
							LOC20 = ((*a).Kind == ((NU8) 3));
							if (!(LOC20)) goto LA21;
							LOC20 = (((*(*a).kindU.S4.Sym).Flags &(1<<((((NU8) 2))&31)))!=0);
							LA21: ;
							if (!LOC20) goto LA22;
							goto LA13;
						}
						LA22: ;
						illformedast_291406(a);
					}
					LA16: ;
					checkminsonslen_291426(a, 3);
					typ = NIM_NIL;
					def = NIM_NIL;
					constraint = NIM_NIL;
					length = sonslen_226249(a);
					hastype = !(((*(*a).kindU.S6.Sons->data[(NI32)(length - 2)]).Kind == ((NU8) 1)));
					hasdefault = !(((*(*a).kindU.S6.Sons->data[(NI32)(length - 1)]).Kind == ((NU8) 1)));
					{
						if (!hastype) goto LA26;
						typ = semparamtype_501513(c, (*a).kindU.S6.Sons->data[(NI32)(length - 2)], &constraint);
					}
					LA26: ;
					{
						if (!hasdefault) goto LA30;
						def = semexprwithtype_487211(c, (*a).kindU.S6.Sons->data[(NI32)(length - 1)], 0);
						{
							if (!(typ == NIM_NIL)) goto LA34;
							typ = (*def).Typ;
						}
						goto LA32;
						LA34: ;
						{
							if (!!((def == NIM_NIL))) goto LA37;
							{
								NIM_BOOL LOC41;
								LOC41 = 0;
								LOC41 = containsgenerictype_272929(typ);
								if (!!(LOC41)) goto LA42;
								def = fitnode_487245(c, typ, def);
							}
							LA42: ;
						}
						goto LA32;
						LA37: ;
						LA32: ;
					}
					LA30: ;
					{
						NIM_BOOL LOC46;
						NU8 tdef;
						LOC46 = 0;
						LOC46 = !(hastype);
						if (!(LOC46)) goto LA47;
						LOC46 = !(hasdefault);
						LA47: ;
						if (!LOC46) goto LA48;
						{
							if (!istype) goto LA52;
							localerror_197966((*a).Info, ((NimStringDesc*) &TMP3023));
						}
						LA52: ;
						{
							if (!((393216 &(1<<((kind)&31)))!=0)) goto LA56;
							tdef = ((NU8) 6);
						}
						goto LA54;
						LA56: ;
						{
							tdef = ((NU8) 58);
						}
						LA54: ;
						typ = newtypes_290214(tdef, c);
					}
					LA48: ;
					{
						ttype225852* LOC61;
						LOC61 = 0;
						LOC61 = skiptypes_230245(typ, 2048);
						if (!((*LOC61).Kind == ((NU8) 3))) goto LA62;
						goto LA13;
					}
					LA62: ;
					{
						NI j_501801;
						NI HEX3Atmp_502286;
						NI res_502289;
						j_501801 = 0;
						HEX3Atmp_502286 = 0;
						HEX3Atmp_502286 = (NI32)(length - 3);
						res_502289 = 0;
						{
							while (1) {
								tsym225846* arg;
								ttype225852* lifted;
								ttype225852* finaltype;
								tnode225816* LOC83;
								if (!(res_502289 <= HEX3Atmp_502286)) goto LA66;
								j_501801 = res_502289;
								arg = newsymg_487930(((NU8) 3), (*a).kindU.S6.Sons->data[j_501801], c);
								lifted = liftparamtype_500291(c, kind, genericparams, typ, (*(*arg).Name).S, (*arg).Info, NIM_FALSE);
								{
									if (!!((lifted == NIM_NIL))) goto LA69;
									finaltype = lifted;
								}
								goto LA67;
								LA69: ;
								{
									finaltype = skipintlit_282531(typ);
								}
								LA67: ;
								asgnRefNoCycle((void**) (&(*arg).Typ), finaltype);
								(*arg).Position = counter;
								asgnRefNoCycle((void**) (&(*arg).Constraint), constraint);
								counter += 1;
								{
									NIM_BOOL LOC74;
									LOC74 = 0;
									LOC74 = !((def == NIM_NIL));
									if (!(LOC74)) goto LA75;
									LOC74 = !(((*def).Kind == ((NU8) 1)));
									LA75: ;
									if (!LOC74) goto LA76;
									asgnRefNoCycle((void**) (&(*arg).Ast), copytree_226329(def));
								}
								LA76: ;
								{
									NIM_BOOL LOC80;
									LOC80 = 0;
									LOC80 = containsorincl_222916((&check), (*(*arg).Name).Sup.Id);
									if (!LOC80) goto LA81;
									localerror_197955((*(*a).kindU.S6.Sons->data[j_501801]).Info, ((NU16) 40), (*(*arg).Name).S);
								}
								LA81: ;
								LOC83 = 0;
								LOC83 = newsymnode_226132(arg);
								addson_226287((*result).N, LOC83);
								rawaddson_230562(result, finaltype);
								addparamorresult_490371(c, arg, kind);
								{
									if (!(gcmd_169120 == ((NU8) 7))) goto LA86;
								}
								LA86: ;
								res_502289 += 1;
							} LA66: ;
						}
					}
				} LA13: ;
				res_502294 += 1;
			} LA12: ;
		}
	}
	r = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA90;
		r = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	}
	goto LA88;
	LA90: ;
	{
		if (!(kind == ((NU8) 14))) goto LA93;
		r = newtypes_290214(((NU8) 58), c);
	}
	goto LA88;
	LA93: ;
	LA88: ;
	{
		if (!!((r == NIM_NIL))) goto LA97;
		{
			ttype225852* LOC101;
			LOC101 = 0;
			LOC101 = skiptypes_230245(r, 2048);
			if (!!(((*LOC101).Kind == ((NU8) 3)))) goto LA102;
			{
				if (!!(((*r).Kind == ((NU8) 6)))) goto LA106;
				{
					NIM_BOOL LOC110;
					ttype225852* lifted;
					LOC110 = 0;
					LOC110 = ((*r).Sym == NIM_NIL);
					if (LOC110) goto LA111;
					LOC110 = !((((*(*r).Sym).Flags &(1<<((((NU8) 29))&31)))!=0));
					LA111: ;
					if (!LOC110) goto LA112;
					lifted = liftparamtype_500291(c, kind, genericparams, r, ((NimStringDesc*) &TMP2911), (*(*n).kindU.S6.Sons->data[0]).Info, NIM_FALSE);
					{
						if (!!((lifted == NIM_NIL))) goto LA116;
						r = lifted;
					}
					LA116: ;
					(*r).Flags |= ((NI32)1)<<((((NU8) 10))%(sizeof(NI32)*8));
				}
				LA112: ;
				r = skipintlit_282531(r);
				{
					if (!(kind == ((NU8) 14))) goto LA120;
					{
						NIM_BOOL LOC124;
						ttypeseq225848* LOC127;
						TY411748 LOC128;
						LOC124 = 0;
						LOC124 = isinlineiterator_411610(r);
						if (!!(LOC124)) goto LA125;
						LOC127 = 0;
						LOC127 = (ttypeseq225848*) newSeq((&NTI225848), 1);
						memset((void*)LOC128, 0, sizeof(LOC128));
						LOC128[0] = r;
						asgnRefNoCycle((void**) (&LOC127->data[0]), LOC128[0]);
						r = newtypewithsons_290823(c, ((NU8) 49), LOC127);
					}
					LA125: ;
				}
				LA120: ;
			}
			LA106: ;
			asgnRefNoCycle((void**) (&(*result).Sons->data[0]), r);
			asgnRefNoCycle((void**) (&(*res).Typ), r);
		}
		LA102: ;
	}
	LA97: ;
	{
		if (!!((genericparams == NIM_NIL))) goto LA131;
		{
			tnode225816* n_502206;
			n_502206 = 0;
			{
				NI i_502301;
				NI HEX3Atmp_502303;
				NI LOC135;
				NI res_502305;
				i_502301 = 0;
				HEX3Atmp_502303 = 0;
				LOC135 = 0;
				LOC135 = len_226364(genericparams);
				HEX3Atmp_502303 = (LOC135 - 1);
				res_502305 = 0;
				{
					while (1) {
						if (!(res_502305 <= HEX3Atmp_502303)) goto LA137;
						i_502301 = res_502305;
						n_502206 = (*genericparams).kindU.S6.Sons->data[i_502301];
						{
							if (!(((*(*(*n_502206).kindU.S4.Sym).Typ).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA140;
							(*(*n_502206).kindU.S4.Sym).Kind = ((NU8) 7);
							(*(*(*n_502206).kindU.S4.Sym).Typ).Flags &= ~(((NI32)1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
						}
						LA140: ;
						res_502305 += 1;
					} LA137: ;
				}
			}
		}
	}
	LA131: ;
	return result;
}

N_NIMCALL(void, semparamlist_487284)(tcontext290021* c, tnode225816* n, tnode225816* genericparams, tsym225846* s) {
	asgnRefNoCycle((void**) (&(*s).Typ), semproctypenode_501546(c, n, genericparams, NIM_NIL, (*s).Kind, NIM_FALSE));
	{
		if (!!(((393216 &(1<<(((*s).Kind)&31)))!=0))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = !(((*(*s).Typ).Sons->data[0] == NIM_NIL));
			if (!(LOC7)) goto LA8;
			LOC7 = ((*(*(*s).Typ).Sons->data[0]).Kind == ((NU8) 7));
			LA8: ;
			if (!LOC7) goto LA9;
			localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3038));
		}
		LA9: ;
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, newparam_508940)(templctx504840* c, tnode225816* n, tsym225846* s) {
	tnode225816* result;
	tsym225846* x;
	result = 0;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
	x = (*(*(*(*(*c).Owner).Typ).N).kindU.S6.Sons->data[(NI32)((*s).Position + 1)]).kindU.S4.Sym;
	result = newsymnode_227755(x, (*n).Info);
	return result;
}

N_NIMCALL(tnode225816*, handlesym_509201)(templctx504840* c, tnode225816* n, tsym225846* s) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		if (!!((s == NIM_NIL))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = ((*s).Owner == (*c).Owner);
			if (!(LOC7)) goto LA8;
			LOC7 = ((*s).Kind == ((NU8) 3));
			LA8: ;
			if (!LOC7) goto LA9;
			result = newparam_508940(c, n, s);
		}
		goto LA5;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = contains_222837((*c).Tobind, (*s).Sup.Id);
			if (!LOC12) goto LA13;
			result = symchoice_504476((*c).C, n, s, ((NU8) 0));
		}
		goto LA5;
		LA13: ;
		{
			NIM_BOOL LOC16;
			NIM_BOOL LOC18;
			NI LOC19;
			tnode225816* LOC23;
			LOC16 = 0;
			LOC16 = ((*s).Kind == ((NU8) 18));
			if (!(LOC16)) goto LA17;
			LOC18 = 0;
			LOC19 = 0;
			LOC19 = len_230005((*s).Typ);
			LOC18 = (LOC19 == 1);
			if (LOC18) goto LA20;
			LOC18 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
			LA20: ;
			LOC16 = LOC18;
			LA17: ;
			if (!LOC16) goto LA21;
			LOC23 = 0;
			LOC23 = semtemplateexpr_488055((*c).C, n, s, 256);
			result = sempatternbody_508926(c, LOC23);
		}
		goto LA5;
		LA21: ;
		{
		}
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, sembindstmt_504600)(tcontext290021* c, tnode225816* n, intset222056* tobind) {
	tnode225816* result;
	result = 0;
	{
		NI i_504628;
		NI HEX3Atmp_504711;
		NI LOC2;
		NI res_504714;
		i_504628 = 0;
		HEX3Atmp_504711 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_504711 = (LOC2 - 1);
		res_504714 = 0;
		{
			while (1) {
				tnode225816* a;
				tsym225846* s;
				if (!(res_504714 <= HEX3Atmp_504711)) goto LA4;
				i_504628 = res_504714;
				a = (*n).kindU.S6.Sons->data[i_504628];
				s = qualifiedlookup_296122(c, a, 2);
				{
					tnode225816* sc;
					if (!!((s == NIM_NIL))) goto LA7;
					sc = symchoice_504476(c, n, s, ((NU8) 0));
					{
						if (!((*sc).Kind == ((NU8) 3))) goto LA11;
						incl_222869(tobind, (*(*sc).kindU.S4.Sym).Sup.Id);
					}
					goto LA9;
					LA11: ;
					{
						{
							tnode225816* x_504686;
							x_504686 = 0;
							{
								NI i_504706;
								NI HEX3Atmp_504708;
								NI LOC16;
								NI res_504710;
								i_504706 = 0;
								HEX3Atmp_504708 = 0;
								LOC16 = 0;
								LOC16 = len_226364(sc);
								HEX3Atmp_504708 = (LOC16 - 1);
								res_504710 = 0;
								{
									while (1) {
										if (!(res_504710 <= HEX3Atmp_504708)) goto LA18;
										i_504706 = res_504710;
										x_504686 = (*sc).kindU.S6.Sons->data[i_504706];
										incl_222869(tobind, (*(*x_504686).kindU.S4.Sym).Sup.Id);
										res_504710 += 1;
									} LA18: ;
								}
							}
						}
					}
					LA9: ;
				}
				goto LA5;
				LA7: ;
				{
					illformedast_291406(a);
				}
				LA5: ;
				res_504714 += 1;
			} LA4: ;
		}
	}
	result = newnodei_226138(((NU8) 1), (*n).Info);
	return result;
}

N_NIMCALL(tnode225816*, expectparam_509273)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* s;
	result = 0;
	s = qualifiedlookup_296122((*c).C, n, 0);
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = !((s == NIM_NIL));
		if (!(LOC4)) goto LA5;
		LOC4 = ((*s).Owner == (*c).Owner);
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = ((*s).Kind == ((NU8) 3));
		LA6: ;
		if (!LOC3) goto LA7;
		result = newparam_508940(c, n, s);
	}
	goto LA1;
	LA7: ;
	{
		localerror_197955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2888));
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, sempatternbody_508926)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym225846* s;
		s = qualifiedlookup_296122((*c).C, n, 0);
		result = handlesym_509201(c, n, s);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_504600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 40):
	{
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = len_226364(n);
			if (!!((LOC7 == 2))) goto LA8;
			localerror_197955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2888));
		}
		goto LA5;
		LA8: ;
		{
			if (!((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 2))) goto LA11;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[0]));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), expectparam_509273(c, (*n).kindU.S6.Sons->data[1]));
		}
		goto LA5;
		LA11: ;
		{
			NIM_BOOL LOC14;
			tnode225816* opr;
			LOC14 = 0;
			LOC14 = ((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 30));
			if (!(LOC14)) goto LA15;
			LOC14 = ((*(*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
			LA15: ;
			if (!LOC14) goto LA16;
			opr = (*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[0];
			{
				if (!eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP2890))) goto LA20;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[0]));
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[1]), expectparam_509273(c, (*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[1]));
			}
			goto LA18;
			LA20: ;
			{
				localerror_197955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2888));
			}
			LA18: ;
		}
		goto LA5;
		LA16: ;
		{
			localerror_197955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2888));
		}
		LA5: ;
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		tsym225846* s;
		s = qualifiedlookup_296122((*c).C, (*n).kindU.S6.Sons->data[0], 0);
		{
			if (!!((s == NIM_NIL))) goto LA27;
			{
				NIM_BOOL LOC31;
				LOC31 = 0;
				LOC31 = ((*s).Owner == (*c).Owner);
				if (!(LOC31)) goto LA32;
				LOC31 = ((*s).Kind == ((NU8) 3));
				LA32: ;
				if (!LOC31) goto LA33;
			}
			goto LA29;
			LA33: ;
			{
				NIM_BOOL LOC36;
				LOC36 = 0;
				LOC36 = contains_222837((*c).Tobind, (*s).Sup.Id);
				if (!LOC36) goto LA37;
			}
			goto LA29;
			LA37: ;
			{
				NIM_BOOL LOC40;
				NIM_BOOL LOC42;
				NI LOC43;
				tnode225816* LOC47;
				LOC40 = 0;
				LOC40 = ((*s).Kind == ((NU8) 18));
				if (!(LOC40)) goto LA41;
				LOC42 = 0;
				LOC43 = 0;
				LOC43 = len_230005((*s).Typ);
				LOC42 = (LOC43 == 1);
				if (LOC42) goto LA44;
				LOC42 = (((*s).Flags &(1<<((((NU8) 25))&31)))!=0);
				LA44: ;
				LOC40 = LOC42;
				LA41: ;
				if (!LOC40) goto LA45;
				LOC47 = 0;
				LOC47 = semtemplateexpr_488055((*c).C, n, s, 256);
				result = sempatternbody_508926(c, LOC47);
				goto BeforeRet;
			}
			goto LA29;
			LA45: ;
			LA29: ;
		}
		LA27: ;
		{
			NIM_BOOL LOC50;
			tnode225816* opr;
			LOC50 = 0;
			LOC50 = ((*n).Kind == ((NU8) 29));
			if (!(LOC50)) goto LA51;
			LOC50 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
			LA51: ;
			if (!LOC50) goto LA52;
			opr = (*n).kindU.S6.Sons->data[0];
			{
				NIM_BOOL LOC56;
				NI LOC60;
				LOC56 = 0;
				LOC56 = eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP3039));
				if (LOC56) goto LA57;
				LOC56 = eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP3040));
				LA57: ;
				if (!LOC56) goto LA58;
				LOC60 = 0;
				LOC60 = len_226364(n);
				result = newnodei_228007(((NU8) 152), (*n).Info, LOC60);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[1]));
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), expectparam_509273(c, (*n).kindU.S6.Sons->data[2]));
				goto BeforeRet;
			}
			goto LA54;
			LA58: ;
			{
				NI LOC64;
				if (!eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP2890))) goto LA62;
				LOC64 = 0;
				LOC64 = len_226364(n);
				result = newnodei_228007(((NU8) 152), (*n).Info, LOC64);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[1]));
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[2]));
				goto BeforeRet;
			}
			goto LA54;
			LA62: ;
			LA54: ;
		}
		LA52: ;
		{
			NIM_BOOL LOC67;
			tnode225816* opr;
			LOC67 = 0;
			LOC67 = ((*n).Kind == ((NU8) 30));
			if (!(LOC67)) goto LA68;
			LOC67 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
			LA68: ;
			if (!LOC67) goto LA69;
			opr = (*n).kindU.S6.Sons->data[0];
			{
				NI LOC75;
				if (!eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP3041))) goto LA73;
				LOC75 = 0;
				LOC75 = len_226364(n);
				result = newnodei_228007(((NU8) 152), (*n).Info, LOC75);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[1]));
				goto BeforeRet;
			}
			LA73: ;
		}
		LA69: ;
		{
			NI i_510020;
			NI HEX3Atmp_510125;
			NI LOC77;
			NI res_510128;
			i_510020 = 0;
			HEX3Atmp_510125 = 0;
			LOC77 = 0;
			LOC77 = sonslen_226249(n);
			HEX3Atmp_510125 = (NI32)(LOC77 - 1);
			res_510128 = 0;
			{
				while (1) {
					if (!(res_510128 <= HEX3Atmp_510125)) goto LA79;
					i_510020 = res_510128;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_510020]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[i_510020]));
					res_510128 += 1;
				} LA79: ;
			}
		}
	}
	break;
	default:
	{
		switch ((*n).Kind) {
		case ((NU8) 45):
		case ((NU8) 53):
		{
			tsym225846* s;
			s = qualifiedlookup_296122((*c).C, n, 0);
			{
				if (!!((s == NIM_NIL))) goto LA84;
				{
					NIM_BOOL LOC88;
					LOC88 = 0;
					LOC88 = contains_222837((*c).Tobind, (*s).Sup.Id);
					if (!LOC88) goto LA89;
					result = symchoice_504476((*c).C, n, s, ((NU8) 0));
					goto BeforeRet;
				}
				goto LA86;
				LA89: ;
				{
					result = newidentnode_226125((*s).Name, (*n).Info);
					goto BeforeRet;
				}
				LA86: ;
			}
			LA84: ;
		}
		break;
		case ((NU8) 37):
		{
			{
				NI LOC95;
				LOC95 = 0;
				LOC95 = len_226364(n);
				if (!(LOC95 == 1)) goto LA96;
				result = sempatternbody_508926(c, (*n).kindU.S6.Sons->data[0]);
				goto BeforeRet;
			}
			LA96: ;
		}
		break;
		default:
		{
		}
		break;
		}
		{
			NI i_510095;
			NI HEX3Atmp_510131;
			NI LOC100;
			NI res_510134;
			i_510095 = 0;
			HEX3Atmp_510131 = 0;
			LOC100 = 0;
			LOC100 = sonslen_226249(n);
			HEX3Atmp_510131 = (NI32)(LOC100 - 1);
			res_510134 = 0;
			{
				while (1) {
					if (!(res_510134 <= HEX3Atmp_510131)) goto LA102;
					i_510095 = res_510134;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_510095]), sempatternbody_508926(c, (*n).kindU.S6.Sons->data[i_510095]));
					res_510134 += 1;
				} LA102: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, sempattern_506110)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	templctx504840 ctx;
	tnode225816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	memset((void*)(&ctx), 0, sizeof(ctx));
	initintset_222950((&ctx.Tobind));
	initintset_222950((&ctx.Tomixin));
	initintset_222950((&ctx.Toinject));
	ctx.C = c;
	ctx.Owner = getcurrowner_290256();
	LOC2 = 0;
	LOC2 = sempatternbody_508926((&ctx), n);
	result = flattenstmts_262416(LOC2);
	{
		if (!((*result).Kind == ((NU8) 115) || (*result).Kind == ((NU8) 126))) goto LA5;
		{
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_226364(result);
			if (!(LOC9 == 1)) goto LA10;
			result = (*result).kindU.S6.Sons->data[0];
		}
		goto LA7;
		LA10: ;
		{
			NI LOC13;
			LOC13 = 0;
			LOC13 = len_226364(result);
			if (!(LOC13 == 0)) goto LA14;
			localerror_197955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2888));
		}
		goto LA7;
		LA14: ;
		LA7: ;
	}
	LA5: ;
	closescope_295211(c);
	return result;
}

N_NIMCALL(void, addgenericparamlisttoscope_522747)(tcontext290021* c, tnode225816* n) {
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		illformedast_291406(n);
	}
	LA3: ;
	{
		NI i_522772;
		NI HEX3Atmp_522812;
		NI LOC6;
		NI res_522815;
		i_522772 = 0;
		HEX3Atmp_522812 = 0;
		LOC6 = 0;
		LOC6 = sonslen_226249(n);
		HEX3Atmp_522812 = (NI32)(LOC6 - 1);
		res_522815 = 0;
		{
			while (1) {
				tnode225816* a;
				if (!(res_522815 <= HEX3Atmp_522812)) goto LA8;
				i_522772 = res_522815;
				a = (*n).kindU.S6.Sons->data[i_522772];
				{
					if (!((*a).Kind == ((NU8) 3))) goto LA11;
					adddecl_295694(c, (*a).kindU.S4.Sym);
				}
				goto LA9;
				LA11: ;
				{
					illformedast_291406(a);
				}
				LA9: ;
				res_522815 += 1;
			} LA8: ;
		}
	}
}

N_NIMCALL(void, addparams_487293)(tcontext290021* c, tnode225816* n, NU8 kind) {
	{
		NI i_523965;
		NI HEX3Atmp_524018;
		NI LOC2;
		NI res_524021;
		i_523965 = 0;
		HEX3Atmp_524018 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_524018 = (NI32)(LOC2 - 1);
		res_524021 = 1;
		{
			while (1) {
				if (!(res_524021 <= HEX3Atmp_524018)) goto LA4;
				i_523965 = res_524021;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_523965]).Kind == ((NU8) 3))) goto LA7;
					addparamorresult_490371(c, (*(*n).kindU.S6.Sons->data[i_523965]).kindU.S4.Sym, kind);
				}
				goto LA5;
				LA7: ;
				{
					illformedast_291406(n);
				}
				LA5: ;
				res_524021 += 1;
			} LA4: ;
		}
	}
}

static N_INLINE(NIM_BOOL, importantcomments_169156)(void) {
	NIM_BOOL result;
	result = 0;
	result = ((16640 &(1<<((gcmd_169120)&31)))!=0);
	return result;
}

static N_INLINE(NI, find_516617)(tsym225846** a_516622, NI a_516622Len0, tsym225846* item_516624) {
	NI result;
	result = 0;
	{
		tsym225846* i_516668;
		NI i_516700;
		i_516668 = 0;
		i_516700 = 0;
		{
			while (1) {
				if (!(i_516700 < a_516622Len0)) goto LA3;
				i_516668 = a_516622[i_516700];
				{
					if (!(i_516668 == item_516624)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += 1;
				i_516700 += 1;
			} LA3: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_516605)(tsym225846** a_516611, NI a_516611Len0, tsym225846* item_516614) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = find_516617(a_516611, a_516611Len0, item_516614);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(slice84173, HEX2EHEX2E_92298)(NI a_92302, NI b_92304) {
	slice84173 result;
	memset((void*)(&result), 0, sizeof(result));
	result.A = a_92302;
	result.B = b_92304;
	return result;
}

N_NIMCALL(tnode225816*, destroycase_516056)(tcontext290021* c, tnode225816* n, tnode225816* holder) {
	tnode225816* result;
	NI nontrivialfields;
	tnodeseq225810* LOC1;
	tnodeseq225810* LOC2;
	TY291287 LOC3;
	tnode225816* LOC4;
	result = 0;
	nontrivialfields = 0;
	LOC1 = 0;
	LOC1 = (tnodeseq225810*) newSeq((&NTI225810), 0);
	result = newnode_228207(((NU8) 97), (*n).Info, LOC1, NIM_NIL);
	LOC2 = 0;
	LOC2 = (tnodeseq225810*) newSeq((&NTI225810), 2);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = holder;
	LOC3[1] = (*n).kindU.S6.Sons->data[0];
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&LOC2->data[1]), LOC3[1]);
	LOC4 = 0;
	LOC4 = newnode_228207(((NU8) 45), (*n).Info, LOC2, NIM_NIL);
	addson_226287(result, LOC4);
	{
		NI i_516127;
		NI HEX3Atmp_516302;
		NI LOC6;
		NI res_516305;
		i_516127 = 0;
		HEX3Atmp_516302 = 0;
		LOC6 = 0;
		LOC6 = len_226364(n);
		HEX3Atmp_516302 = (NI32)(LOC6 - 1);
		res_516305 = 1;
		{
			while (1) {
				tnode225816* casebranch;
				tnode225816* LOC9;
				tnode225816* LOC10;
				tnode225816* LOC11;
				slice84173 LOC12;
				tnodeseq225810* LOC13;
				tnode225816* stmt;
				tnode225816* LOC14;
				tnode225816* LOC15;
				if (!(res_516305 <= HEX3Atmp_516302)) goto LA8;
				i_516127 = res_516305;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_226698(n, i_516127);
				LOC10 = 0;
				LOC10 = HEX5BHEX5D_226698(n, i_516127);
				LOC11 = 0;
				LOC11 = HEX5BHEX5D_226698(n, i_516127);
				LOC12 = HEX2EHEX2E_92298(0, -2);
				LOC13 = 0;
				LOC13 = HEX5BHEX5D_516155((*LOC11).kindU.S6.Sons, LOC12);
				casebranch = newnode_228207((*LOC9).Kind, (*LOC10).Info, LOC13, NIM_NIL);
				LOC14 = 0;
				LOC14 = HEX5BHEX5D_226698(n, i_516127);
				LOC15 = 0;
				LOC15 = lastson_226261(LOC14);
				stmt = destroyfieldorfields_515988(c, LOC15, holder);
				{
					tnode225816* LOC20;
					tnodeseq225810* LOC21;
					tnode225816* LOC22;
					if (!(stmt == NIM_NIL)) goto LA18;
					LOC20 = 0;
					LOC20 = HEX5BHEX5D_226698(n, i_516127);
					LOC21 = 0;
					LOC21 = (tnodeseq225810*) newSeq((&NTI225810), 0);
					LOC22 = 0;
					LOC22 = newnode_228207(((NU8) 115), (*LOC20).Info, LOC21, NIM_NIL);
					addson_226287(casebranch, LOC22);
				}
				goto LA16;
				LA18: ;
				{
					NI LOC24;
					addson_226287(casebranch, stmt);
					LOC24 = 0;
					LOC24 = len_226364(stmt);
					nontrivialfields += LOC24;
				}
				LA16: ;
				addson_226287(result, casebranch);
				res_516305 += 1;
			} LA8: ;
		}
	}
	{
		if (!(nontrivialfields == 0)) goto LA27;
		result = NIM_NIL;
	}
	LA27: ;
	return result;
}

N_NIMCALL(tnode225816*, destroysym_515993)(tcontext290021* c, tsym225846* field, tnode225816* holder) {
	tnode225816* result;
	ttype225852* destructablet;
	result = 0;
	destructablet = instantiatedestructor_515765(c, (*field).Typ);
	{
		tnodeseq225810* LOC5;
		TY291287 LOC6;
		tnodeseq225810* LOC7;
		TY291287 LOC8;
		if (!!((destructablet == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = (tnodeseq225810*) newSeq((&NTI225810), 2);
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = usesym_421001((*destructablet).Destructor);
		LOC7 = 0;
		LOC7 = (tnodeseq225810*) newSeq((&NTI225810), 2);
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = holder;
		LOC8[1] = usesym_421001(field);
		asgnRefNoCycle((void**) (&LOC7->data[0]), LOC8[0]);
		asgnRefNoCycle((void**) (&LOC7->data[1]), LOC8[1]);
		LOC6[1] = newnode_228207(((NU8) 45), (*field).Info, LOC7, NIM_NIL);
		asgnRefNoCycle((void**) (&LOC5->data[0]), LOC6[0]);
		asgnRefNoCycle((void**) (&LOC5->data[1]), LOC6[1]);
		result = newnode_228207(((NU8) 27), (*field).Info, LOC5, NIM_NIL);
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, destroyfieldorfields_515988)(tcontext290021* c, tnode225816* field, tnode225816* holder) {
	tnode225816* result;
	result = 0;
	switch ((*field).Kind) {
	case ((NU8) 138):
	{
		tnode225816* stmt_516332;
		stmt_516332 = destroycase_516056(c, field, holder);
		{
			if (!!((stmt_516332 == NIM_NIL))) goto LA4;
			{
				if (!(result == NIM_NIL)) goto LA8;
				result = newnode_226090(((NU8) 115));
			}
			LA8: ;
			addson_226287(result, stmt_516332);
		}
		LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		tnode225816* stmt_516368;
		stmt_516368 = destroysym_515993(c, (*field).kindU.S4.Sym, holder);
		{
			if (!!((stmt_516368 == NIM_NIL))) goto LA13;
			{
				if (!(result == NIM_NIL)) goto LA17;
				result = newnode_226090(((NU8) 115));
			}
			LA17: ;
			addson_226287(result, stmt_516368);
		}
		LA13: ;
	}
	break;
	case ((NU8) 137):
	{
		{
			tnode225816* son_516417;
			son_516417 = 0;
			{
				NI i_516465;
				NI HEX3Atmp_516467;
				NI LOC22;
				NI res_516469;
				i_516465 = 0;
				HEX3Atmp_516467 = 0;
				LOC22 = 0;
				LOC22 = len_226364(field);
				HEX3Atmp_516467 = (LOC22 - 1);
				res_516469 = 0;
				{
					while (1) {
						tnode225816* stmt_516419;
						if (!(res_516469 <= HEX3Atmp_516467)) goto LA24;
						i_516465 = res_516469;
						son_516417 = (*field).kindU.S6.Sons->data[i_516465];
						stmt_516419 = destroyfieldorfields_515988(c, son_516417, holder);
						{
							if (!!((stmt_516419 == NIM_NIL))) goto LA27;
							{
								if (!(result == NIM_NIL)) goto LA31;
								result = newnode_226090(((NU8) 115));
							}
							LA31: ;
							addson_226287(result, stmt_516419);
						}
						LA27: ;
						res_516469 += 1;
					} LA24: ;
				}
			}
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC38;
			if (!NIM_TRUE) goto LA36;
			LOC38 = 0;
			LOC38 = HEX24_198126(TMP3054);
			internalerror_198006(LOC38);
		}
		LA36: ;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, generatedestructor_516485)(tcontext290021* c, ttype225852* t) {
	tnode225816* result;
	tnode225816* destructedobj;
	tlineinfo195539 LOC12;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*t).N == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = HEX3DHEX3D_315667((*(*t).N).kindU.S6.Sons, NIM_NIL);
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	{
		NimStringDesc* LOC11;
		if (!!(((*(*t).N).Kind == ((NU8) 137)))) goto LA9;
		LOC11 = 0;
		LOC11 = HEX24_198126(TMP3052);
		internalerror_198006(LOC11);
	}
	LA9: ;
	LOC12 = unknownlineinfo_196405();
	destructedobj = newidentnode_226125(destructorparam_515762, LOC12);
	result = destroyfieldorfields_515988(c, (*t).N, destructedobj);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym225846*, symfromtype_488078)(ttype225852* t, tlineinfo195539 info) {
	tsym225846* result;
	tident200021* LOC5;
	result = 0;
	{
		if (!!(((*t).Sym == NIM_NIL))) goto LA3;
		result = (*t).Sym;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getident_200472(((NimStringDesc*) &TMP3056));
	result = newsym_226074(((NU8) 7), LOC5, (*t).Owner, info);
	(*result).Flags |= ((NI32)1)<<((((NU8) 29))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, symnodefromtype_488122)(tcontext290021* c, ttype225852* t, tlineinfo195539 info) {
	tnode225816* result;
	tsym225846* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = symfromtype_488078(t, info);
	result = newsymnode_227755(LOC1, info);
	asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_290763(c, t));
	return result;
}

N_NIMCALL(tnode225816*, semproc_515723)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = semprocaux_525170(c, n, ((NU8) 12), TMP3057, ((NU8) 0));
	return result;
}

N_NIMCALL(ttype225852*, instantiatedestructor_515765)(tcontext290021* c, ttype225852* typ) {
	ttype225852* result;
	ttype225852* t;
	ttype225852* LOC1;
	ttype225852* typeholdinguserdefinition;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_230245(typ, IL64(211106232532992));
	t = skipgenericalias_269619(LOC1);
	{
		if (!((*t).Kind == ((NU8) 11))) goto LA4;
		typeholdinguserdefinition = base_263038(t);
	}
	goto LA2;
	LA4: ;
	{
		typeholdinguserdefinition = t;
	}
	LA2: ;
	{
		if (!!(((*typeholdinguserdefinition).Destructor == NIM_NIL))) goto LA9;
		{
			TY516716 LOC13;
			NIM_BOOL LOC14;
			memset((void*)LOC13, 0, sizeof(LOC13));
			LOC13[0] = analyzingdestructor_515727;
			LOC13[1] = destructoristrivial_515728;
			LOC14 = 0;
			LOC14 = contains_516605(LOC13, 2, (*typeholdinguserdefinition).Destructor);
			if (!!(LOC14)) goto LA15;
			result = typeholdinguserdefinition;
			goto BeforeRet;
		}
		goto LA11;
		LA15: ;
		{
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA11: ;
	}
	LA9: ;
	t = skiptypes_230245(t, 2048);
	switch ((*t).Kind) {
	case ((NU8) 24):
	case ((NU8) 16):
	case ((NU8) 4):
	case ((NU8) 27):
	case ((NU8) 48):
	{
		{
			ttype225852* LOC21;
			LOC21 = 0;
			LOC21 = instantiatedestructor_515765(c, (*t).Sons->data[0]);
			if (!!((LOC21 == NIM_NIL))) goto LA22;
			{
				tident200021* LOC28;
				if (!(rangedestructorproc_515764 == NIM_NIL)) goto LA26;
				LOC28 = 0;
				LOC28 = getident_200472(((NimStringDesc*) &TMP3051));
				asgnRefNoCycle((void**) (&rangedestructorproc_515764), searchinscopes_295312(c, LOC28));
			}
			LA26: ;
			asgnRefNoCycle((void**) (&(*t).Destructor), rangedestructorproc_515764);
			result = t;
			goto BeforeRet;
		}
		goto LA19;
		LA22: ;
		{
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA19: ;
	}
	break;
	case ((NU8) 18):
	case ((NU8) 17):
	{
		tnode225816* generated;
		asgnRefNoCycle((void**) (&(*t).Destructor), analyzingdestructor_515727);
		generated = generatedestructor_516485(c, t);
		{
			tlineinfo195539 i;
			tnode225816* fulldef;
			tnodeseq225810* LOC40;
			TY228474 LOC41;
			tnodeseq225810* LOC42;
			TY291287 LOC43;
			tnodeseq225810* LOC44;
			TY537311 LOC45;
			ttype225852* LOC46;
			tnodeseq225810* LOC47;
			TY246892 LOC48;
			tnode225816* semantizeddef;
			tnode225816* LOC49;
			if (!!((generated == NIM_NIL))) goto LA33;
			{
				NimStringDesc* LOC39;
				if (!!(!(((*t).Sym == NIM_NIL)))) goto LA37;
				LOC39 = 0;
				LOC39 = HEX24_198126(TMP3055);
				internalerror_198006(LOC39);
			}
			LA37: ;
			i = (*(*t).Sym).Info;
			LOC40 = 0;
			LOC40 = (tnodeseq225810*) newSeq((&NTI225810), 7);
			memset((void*)LOC41, 0, sizeof(LOC41));
			LOC41[0] = newidentnode_226125(destructorname_515761, i);
			LOC41[1] = emptynode_226738;
			LOC41[2] = emptynode_226738;
			LOC42 = 0;
			LOC42 = (tnodeseq225810*) newSeq((&NTI225810), 2);
			memset((void*)LOC43, 0, sizeof(LOC43));
			LOC43[0] = emptynode_226738;
			LOC44 = 0;
			LOC44 = (tnodeseq225810*) newSeq((&NTI225810), 3);
			memset((void*)LOC45, 0, sizeof(LOC45));
			LOC45[0] = newidentnode_226125(destructorparam_515762, i);
			LOC46 = 0;
			LOC46 = makevartype_290207(c, t);
			LOC45[1] = symnodefromtype_488122(c, LOC46, (*(*t).Sym).Info);
			LOC45[2] = emptynode_226738;
			asgnRefNoCycle((void**) (&LOC44->data[0]), LOC45[0]);
			asgnRefNoCycle((void**) (&LOC44->data[1]), LOC45[1]);
			asgnRefNoCycle((void**) (&LOC44->data[2]), LOC45[2]);
			LOC43[1] = newnode_228207(((NU8) 35), i, LOC44, NIM_NIL);
			asgnRefNoCycle((void**) (&LOC42->data[0]), LOC43[0]);
			asgnRefNoCycle((void**) (&LOC42->data[1]), LOC43[1]);
			LOC41[3] = newnode_228207(((NU8) 76), i, LOC42, NIM_NIL);
			LOC47 = 0;
			LOC47 = (tnodeseq225810*) newSeq((&NTI225810), 1);
			memset((void*)LOC48, 0, sizeof(LOC48));
			LOC48[0] = destructorpragma_515763;
			asgnRefNoCycle((void**) (&LOC47->data[0]), LOC48[0]);
			LOC41[4] = newnode_228207(((NU8) 90), i, LOC47, NIM_NIL);
			LOC41[5] = emptynode_226738;
			LOC41[6] = generated;
			asgnRefNoCycle((void**) (&LOC40->data[0]), LOC41[0]);
			asgnRefNoCycle((void**) (&LOC40->data[1]), LOC41[1]);
			asgnRefNoCycle((void**) (&LOC40->data[2]), LOC41[2]);
			asgnRefNoCycle((void**) (&LOC40->data[3]), LOC41[3]);
			asgnRefNoCycle((void**) (&LOC40->data[4]), LOC41[4]);
			asgnRefNoCycle((void**) (&LOC40->data[5]), LOC41[5]);
			asgnRefNoCycle((void**) (&LOC40->data[6]), LOC41[6]);
			fulldef = newnode_228207(((NU8) 79), i, LOC40, NIM_NIL);
			semantizeddef = semproc_515723(c, fulldef);
			LOC49 = 0;
			LOC49 = HEX5BHEX5D_226698(semantizeddef, 0);
			asgnRefNoCycle((void**) (&(*t).Destructor), (*LOC49).kindU.S4.Sym);
			result = t;
			goto BeforeRet;
		}
		goto LA31;
		LA33: ;
		{
			asgnRefNoCycle((void**) (&(*t).Destructor), destructoristrivial_515728);
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA31: ;
	}
	break;
	default:
	{
		result = NIM_NIL;
		goto BeforeRet;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, dodestructorstuff_515769)(tcontext290021* c, tsym225846* s, tnode225816* n) {
	ttype225852* t;
	t = skiptypes_230245((*(*s).Typ).Sons->data[1], 8388608);
	{
		if (!((*t).Kind == ((NU8) 9))) goto LA3;
		{
			NI i_515806;
			NI HEX3Atmp_515952;
			NI LOC6;
			NI res_515955;
			i_515806 = 0;
			HEX3Atmp_515952 = 0;
			LOC6 = 0;
			LOC6 = sonslen_226255(t);
			HEX3Atmp_515952 = (LOC6 - 1);
			res_515955 = 1;
			{
				while (1) {
					if (!(res_515955 <= HEX3Atmp_515952)) goto LA8;
					i_515806 = res_515955;
					{
						if (!!(((*(*t).Sons->data[i_515806]).Kind == ((NU8) 12)))) goto LA11;
						localerror_197955((*n).Info, ((NU16) 202), ((NimStringDesc*) &TMP2888));
						goto BeforeRet;
					}
					LA11: ;
					res_515955 += 1;
				} LA8: ;
			}
		}
		t = base_263038(t);
	}
	goto LA1;
	LA3: ;
	{
		if (!((*t).Kind == ((NU8) 54))) goto LA14;
		t = base_263038(t);
		{
			if (!!(((*t).Kind == ((NU8) 10)))) goto LA18;
			localerror_197955((*n).Info, ((NU16) 202), ((NimStringDesc*) &TMP2888));
			goto BeforeRet;
		}
		LA18: ;
	}
	goto LA1;
	LA14: ;
	LA1: ;
	asgnRefNoCycle((void**) (&(*t).Destructor), s);
	{
		if (!!(((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)))) goto LA22;
		{
			NI i_515869;
			NI HEX3Atmp_515959;
			NI LOC25;
			NI res_515962;
			i_515869 = 0;
			HEX3Atmp_515959 = 0;
			LOC25 = 0;
			LOC25 = sonslen_226255(t);
			HEX3Atmp_515959 = (NI32)(LOC25 - 1);
			res_515962 = 0;
			{
				while (1) {
					if (!(res_515962 <= HEX3Atmp_515959)) goto LA27;
					i_515869 = res_515962;
					{
						ttype225852* destructablet;
						{
							if (!((*t).Sons->data[i_515869] == NIM_NIL)) goto LA31;
							goto LA28;
						}
						LA31: ;
						destructablet = instantiatedestructor_515765(c, (*t).Sons->data[i_515869]);
						{
							tnodeseq225810* LOC37;
							TY291287 LOC38;
							tnode225816* LOC39;
							tnode225816* LOC40;
							if (!!((destructablet == NIM_NIL))) goto LA35;
							LOC37 = 0;
							LOC37 = (tnodeseq225810*) newSeq((&NTI225810), 2);
							memset((void*)LOC38, 0, sizeof(LOC38));
							LOC38[0] = usesym_421001((*destructablet).Destructor);
							LOC39 = 0;
							LOC39 = HEX5BHEX5D_226698((*n).kindU.S6.Sons->data[3], 1);
							LOC38[1] = HEX5BHEX5D_226698(LOC39, 0);
							asgnRefNoCycle((void**) (&LOC37->data[0]), LOC38[0]);
							asgnRefNoCycle((void**) (&LOC37->data[1]), LOC38[1]);
							LOC40 = 0;
							LOC40 = newnode_228207(((NU8) 27), (*(*t).Sym).Info, LOC37, NIM_NIL);
							addson_226287((*n).kindU.S6.Sons->data[6], LOC40);
						}
						LA35: ;
					} LA28: ;
					res_515962 += 1;
				} LA27: ;
			}
		}
	}
	LA22: ;
	BeforeRet: ;
}

static N_INLINE(NIM_BOOL, experimentalmode_291447)(tcontext290021* c) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = gexperimentalmode_169137;
	if (LOC1) goto LA2;
	LOC1 = (((*(*c).Module).Flags &(1<<((((NU8) 30))&31)))!=0);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, semoverride_525035)(tcontext290021* c, tsym225846* s, tnode225816* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuNormalize((*(*s).Name).S);
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3048))) goto LA2;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3049))) goto LA3;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3050))) goto LA4;
	goto LA5;
	LA2: ;
	{
		dodestructorstuff_515769(c, s, n);
		{
			NIM_BOOL LOC10;
			LOC10 = 0;
			LOC10 = experimentalmode_291447(c);
			if (!!(LOC10)) goto LA11;
			localerror_197966((*n).Info, ((NimStringDesc*) &TMP3058));
		}
		LA11: ;
	}
	goto LA6;
	LA3: ;
	{
		{
			NIM_BOOL LOC16;
			NIM_BOOL LOC17;
			NI LOC18;
			ttype225852* LOC20;
			ttype225852* t;
			ttype225852* LOC24;
			ttype225852* LOC25;
			LOC16 = 0;
			LOC17 = 0;
			LOC18 = 0;
			LOC18 = len_230005((*s).Typ);
			LOC17 = (LOC18 == 2);
			if (!(LOC17)) goto LA19;
			LOC20 = 0;
			LOC20 = skiptypes_230245((*(*s).Typ).Sons->data[1], IL64(211106232576256));
			LOC17 = ((*LOC20).Kind == ((NU8) 22) || (*LOC20).Kind == ((NU8) 21));
			LA19: ;
			LOC16 = LOC17;
			if (!(LOC16)) goto LA21;
			LOC16 = sametype_268351((*(*s).Typ).Sons->data[1], (*(*s).Typ).Sons->data[0], 0);
			LA21: ;
			if (!LOC16) goto LA22;
			LOC24 = 0;
			LOC24 = skiptypes_230245((*(*s).Typ).Sons->data[1], IL64(211106232576256));
			LOC25 = 0;
			LOC25 = lastson_226267(LOC24);
			t = skiptypes_230245(LOC25, IL64(211106232576256));
			{
				while (1) {
					{
						if (!((*t).Kind == ((NU8) 10))) goto LA30;
						t = lastson_226267(t);
					}
					goto LA28;
					LA30: ;
					{
						if (!((*t).Kind == ((NU8) 9))) goto LA33;
						t = (*t).Sons->data[0];
					}
					goto LA28;
					LA33: ;
					{
						goto LA26;
					}
					LA28: ;
				}
			} LA26: ;
			{
				if (!((*t).Kind == ((NU8) 17) || (*t).Kind == ((NU8) 13) || (*t).Kind == ((NU8) 14))) goto LA38;
				{
					if (!(*t).Deepcopy == 0) goto LA42;
					asgnRefNoCycle((void**) (&(*t).Deepcopy), s);
				}
				goto LA40;
				LA42: ;
				{
					NimStringDesc* LOC45;
					NimStringDesc* LOC46;
					LOC45 = 0;
					LOC46 = 0;
					LOC46 = typetostring_263031(t, ((NU8) 0));
					LOC45 = rawNewString(LOC46->Sup.len + 35);
appendString(LOC45, ((NimStringDesc*) &TMP3059));
appendString(LOC45, LOC46);
					localerror_197955((*n).Info, ((NU16) 4), LOC45);
				}
				LA40: ;
			}
			goto LA36;
			LA38: ;
			{
				NimStringDesc* LOC48;
				NimStringDesc* LOC49;
				LOC48 = 0;
				LOC49 = 0;
				LOC49 = typetostring_263031(t, ((NU8) 0));
				LOC48 = rawNewString(LOC49->Sup.len + 27);
appendString(LOC48, ((NimStringDesc*) &TMP3060));
appendString(LOC48, LOC49);
				localerror_197955((*n).Info, ((NU16) 4), LOC48);
			}
			LA36: ;
		}
		goto LA14;
		LA22: ;
		{
			localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3061));
		}
		LA14: ;
	}
	goto LA6;
	LA4: ;
	{
	}
	goto LA6;
	LA5: ;
	{
		localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3062));
	}
	LA6: ;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
}

static N_INLINE(void, paramstypecheck_488015)(tcontext290021* c, ttype225852* typ) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = typeallowed_263231(typ, ((NU8) 10));
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = typetostring_263031(typ, ((NU8) 0));
		localerror_197955((*(*typ).N).Info, ((NU16) 165), LOC6);
	}
	LA4: ;
}

N_NIMCALL(void, activate_487327)(tcontext290021* c, tnode225816* n) {
}

N_NIMCALL(ttype225852*, arrayconstrtype_531546)(tcontext290021* c, tnode225816* n) {
	ttype225852* result;
	ttype225852* typ;
	NI LOC9;
	ttype225852* LOC10;
	result = 0;
	typ = newtypes_290214(((NU8) 4), c);
	rawaddson_230562(typ, NIM_NIL);
	{
		NI LOC3;
		ttype225852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_290214(((NU8) 3), c);
		rawaddson_230562(typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode225816* x;
		NI64 lastindex;
		NI LOC8;
		ttype225852* t;
		x = (*n).kindU.S6.Sons->data[0];
		LOC8 = 0;
		LOC8 = sonslen_226249(n);
		lastindex = ((NI64) ((NI32)(LOC8 - 1)));
		t = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, 8423424);
		addsonskipintlit_282572(typ, t);
	}
	LA1: ;
	LOC9 = 0;
	LOC9 = sonslen_226249(n);
	LOC10 = 0;
	LOC10 = getsystype_282030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*typ).Sons->data[0]), makerangetype_291351(c, IL64(0), ((NI64) ((NI32)(LOC9 - 1))), (*n).Info, LOC10));
	result = typ;
	return result;
}

N_NIMCALL(void, changetype_487253)(tnode225816* n, ttype225852* newtype, NIM_BOOL check) {
	switch ((*n).Kind) {
	case ((NU8) 39):
	case ((NU8) 41):
	{
		{
			NI i_531405;
			NI HEX3Atmp_531514;
			NI LOC3;
			NI res_531517;
			i_531405 = 0;
			HEX3Atmp_531514 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226249(n);
			HEX3Atmp_531514 = (NI32)(LOC3 - 1);
			res_531517 = 0;
			{
				while (1) {
					ttype225852* LOC6;
					if (!(res_531517 <= HEX3Atmp_531514)) goto LA5;
					i_531405 = res_531517;
					LOC6 = 0;
					LOC6 = elemtype_263656(newtype);
					changetype_487253((*n).kindU.S6.Sons->data[i_531405], LOC6, check);
					res_531517 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 37):
	{
		ttype225852* tup;
		tup = skiptypes_230245(newtype, 2048);
		{
			if (!!(((*tup).Kind == ((NU8) 18)))) goto LA10;
			internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3077));
		}
		goto LA8;
		LA10: ;
		{
			{
				NI i_531443;
				NI HEX3Atmp_531520;
				NI LOC14;
				NI res_531523;
				i_531443 = 0;
				HEX3Atmp_531520 = 0;
				LOC14 = 0;
				LOC14 = sonslen_226249(n);
				HEX3Atmp_531520 = (NI32)(LOC14 - 1);
				res_531523 = 0;
				{
					while (1) {
						tnode225816* m;
						if (!(res_531523 <= HEX3Atmp_531520)) goto LA16;
						i_531443 = res_531523;
						m = (*n).kindU.S6.Sons->data[i_531443];
						{
							if (!((*m).Kind == ((NU8) 34))) goto LA19;
							m = (*m).kindU.S6.Sons->data[1];
							asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_531443]), m);
						}
						LA19: ;
						changetype_487253(m, (*tup).Sons->data[i_531443], check);
						res_531523 += 1;
					} LA16: ;
				}
			}
		}
		LA8: ;
	}
	break;
	case ((NU8) 5) ... ((NU8) 15):
	{
		{
			NI64 value;
			if (!check) goto LA24;
			value = (*n).kindU.S1.Intval;
			{
				NIM_BOOL LOC28;
				NI64 LOC29;
				NI64 LOC31;
				NimStringDesc* LOC34;
				NimStringDesc* LOC35;
				NimStringDesc* LOC36;
				LOC28 = 0;
				LOC29 = 0;
				LOC29 = firstord_263004(newtype);
				LOC28 = (value < LOC29);
				if (LOC28) goto LA30;
				LOC31 = 0;
				LOC31 = lastord_263010(newtype);
				LOC28 = (LOC31 < value);
				LA30: ;
				if (!LOC28) goto LA32;
				LOC34 = 0;
				LOC35 = 0;
				LOC35 = nimInt64ToStr(value);
				LOC36 = 0;
				LOC36 = typetostring_263031(newtype, ((NU8) 0));
				LOC34 = rawNewString(LOC35->Sup.len + LOC36->Sup.len + 19);
appendString(LOC34, ((NimStringDesc*) &TMP3078));
appendString(LOC34, LOC35);
appendString(LOC34, ((NimStringDesc*) &TMP3079));
appendString(LOC34, LOC36);
				localerror_197955((*n).Info, ((NU16) 4), LOC34);
			}
			LA32: ;
		}
		LA24: ;
	}
	break;
	default:
	{
	}
	break;
	}
	asgnRefNoCycle((void**) (&(*n).Typ), newtype);
}

N_NIMCALL(NIM_BOOL, isemptycontainer_487464)(ttype225852* t) {
	NIM_BOOL result;
	result = 0;
	switch ((*t).Kind) {
	case ((NU8) 6):
	case ((NU8) 5):
	{
		result = NIM_TRUE;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		result = ((*(*t).Sons->data[1]).Kind == ((NU8) 3));
	}
	break;
	case ((NU8) 19):
	case ((NU8) 24):
	case ((NU8) 27):
	case ((NU8) 48):
	{
		result = ((*(*t).Sons->data[0]).Kind == ((NU8) 3));
	}
	break;
	case ((NU8) 11):
	{
		ttype225852* LOC5;
		LOC5 = 0;
		LOC5 = lastson_226267(t);
		result = isemptycontainer_487464(LOC5);
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(ttype225852*, commontype_487492)(ttype225852* x, ttype225852* y) {
	ttype225852* result;
	ttype225852* a;
	ttype225852* b;
	result = 0;
	{
		if (!(x == NIM_NIL)) goto LA3;
		result = x;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(y == NIM_NIL)) goto LA7;
		result = y;
		goto BeforeRet;
	}
	LA7: ;
	a = skiptypes_230245(x, 2048);
	b = skiptypes_230245(y, 2048);
	result = x;
	{
		if (!((*a).Kind == ((NU8) 6) || (*a).Kind == ((NU8) 5))) goto LA11;
		result = y;
	}
	goto LA9;
	LA11: ;
	{
		if (!((*b).Kind == ((NU8) 6) || (*b).Kind == ((NU8) 5))) goto LA14;
		result = x;
	}
	goto LA9;
	LA14: ;
	{
		if (!((*a).Kind == ((NU8) 7))) goto LA17;
		result = a;
	}
	goto LA9;
	LA17: ;
	{
		if (!((*b).Kind == ((NU8) 7))) goto LA20;
		result = b;
	}
	goto LA9;
	LA20: ;
	{
		if (!((*a).Kind == ((NU8) 8))) goto LA23;
		{
			NIM_BOOL LOC27;
			LOC27 = 0;
			LOC27 = HEX3DHEX3D_273497((*a).Sons, NIM_NIL);
			if (!LOC27) goto LA28;
			result = a;
		}
		goto LA25;
		LA28: ;
		{
			ttype225852* LOC31;
			result = newtype_226083(((NU8) 8), (*a).Owner);
			LOC31 = 0;
			LOC31 = newtype_226083(((NU8) 0), (*a).Owner);
			rawaddson_230562(result, LOC31);
		}
		LA25: ;
	}
	goto LA9;
	LA23: ;
	{
		NIM_BOOL LOC33;
		NI idx;
		LOC33 = 0;
		LOC33 = ((*b).Kind == ((NU8) 16) || (*b).Kind == ((NU8) 4) || (*b).Kind == ((NU8) 19) || (*b).Kind == ((NU8) 24));
		if (!(LOC33)) goto LA34;
		LOC33 = ((*a).Kind == (*b).Kind);
		LA34: ;
		if (!LOC33) goto LA35;
		idx = ((*b).Kind == ((NU8) 16) || (*b).Kind == ((NU8) 4));
		{
			if (!((*(*a).Sons->data[idx]).Kind == ((NU8) 3))) goto LA39;
			result = y;
			goto BeforeRet;
		}
		LA39: ;
	}
	goto LA9;
	LA35: ;
	{
		NIM_BOOL LOC42;
		NIM_BOOL LOC43;
		NI LOC46;
		NI LOC47;
		ttype225852* nt;
		LOC42 = 0;
		LOC43 = 0;
		LOC43 = ((*a).Kind == ((NU8) 18));
		if (!(LOC43)) goto LA44;
		LOC43 = ((*b).Kind == ((NU8) 18));
		LA44: ;
		LOC42 = LOC43;
		if (!(LOC42)) goto LA45;
		LOC46 = 0;
		LOC46 = len_230005(a);
		LOC47 = 0;
		LOC47 = len_230005(b);
		LOC42 = (LOC46 == LOC47);
		LA45: ;
		if (!LOC42) goto LA48;
		nt = 0;
		{
			NI i_487702;
			NI HEX3Atmp_487898;
			NI LOC51;
			NI res_487901;
			i_487702 = 0;
			HEX3Atmp_487898 = 0;
			LOC51 = 0;
			LOC51 = len_230005(a);
			HEX3Atmp_487898 = (LOC51 - 1);
			res_487901 = 0;
			{
				while (1) {
					if (!(res_487901 <= HEX3Atmp_487898)) goto LA53;
					i_487702 = res_487901;
					{
						NIM_BOOL LOC56;
						NIM_BOOL LOC58;
						LOC56 = 0;
						LOC56 = isemptycontainer_487464((*a).Sons->data[i_487702]);
						if (!(LOC56)) goto LA57;
						LOC58 = 0;
						LOC58 = isemptycontainer_487464((*b).Sons->data[i_487702]);
						LOC56 = !(LOC58);
						LA57: ;
						if (!LOC56) goto LA59;
						{
							if (!nt == 0) goto LA63;
							nt = copytype_226195(a, (*a).Owner, NIM_FALSE);
						}
						LA63: ;
						asgnRefNoCycle((void**) (&(*nt).Sons->data[i_487702]), (*b).Sons->data[i_487702]);
					}
					LA59: ;
					res_487901 += 1;
				} LA53: ;
			}
		}
		{
			if (!!(nt == 0)) goto LA67;
			result = nt;
		}
		LA67: ;
	}
	goto LA9;
	LA48: ;
	{
		NIM_BOOL LOC70;
		LOC70 = 0;
		LOC70 = ((*a).Kind == ((NU8) 20));
		if (!(LOC70)) goto LA71;
		LOC70 = ((*b).Kind == ((NU8) 20));
		LA71: ;
		if (!LOC70) goto LA72;
		{
			NIM_BOOL LOC76;
			ttype225852* LOC79;
			LOC76 = 0;
			LOC76 = sametype_268351(a, b, 0);
			if (!!(LOC76)) goto LA77;
			LOC79 = 0;
			LOC79 = skiptypes_230245(a, 1048576);
			result = skipintlit_282531(LOC79);
		}
		LA77: ;
	}
	goto LA9;
	LA72: ;
	{
		NU8 k;
		k = ((NU8) 0);
		{
			if (!((*a).Kind == ((NU8) 22) || (*a).Kind == ((NU8) 21))) goto LA83;
			k = (*a).Kind;
			{
				if (!!(((*b).Kind == (*a).Kind))) goto LA87;
				result = x;
				goto BeforeRet;
			}
			LA87: ;
			a = lastson_226267(a);
			b = lastson_226267(b);
		}
		LA83: ;
		{
			NIM_BOOL LOC91;
			LOC91 = 0;
			LOC91 = ((*a).Kind == ((NU8) 17));
			if (!(LOC91)) goto LA92;
			LOC91 = ((*b).Kind == ((NU8) 17));
			LA92: ;
			if (!LOC91) goto LA93;
			result = commonsuperclass_271084(a, b);
			{
				NIM_BOOL LOC97;
				LOC97 = 0;
				LOC97 = result == 0;
				if (LOC97) goto LA98;
				LOC97 = (result == a);
				LA98: ;
				if (!LOC97) goto LA99;
				result = x;
				goto BeforeRet;
			}
			LA99: ;
			{
				if (!(result == b)) goto LA103;
				result = y;
				goto BeforeRet;
			}
			LA103: ;
			{
				ttype225852* r;
				if (!!((k == ((NU8) 0)))) goto LA107;
				r = result;
				result = newtype_226083(k, (*r).Owner);
				addsonskipintlit_282572(result, r);
			}
			LA107: ;
		}
		LA93: ;
	}
	LA9: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semarrayconstr_531588)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	NI LOC35;
	ttype225852* LOC36;
	result = 0;
	result = newnodei_226138(((NU8) 41), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), newtypes_290214(((NU8) 4), c));
	rawaddson_230562((*result).Typ, NIM_NIL);
	{
		NI LOC3;
		ttype225852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_290214(((NU8) 3), c);
		rawaddson_230562((*result).Typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode225816* x;
		NI64 lastindex;
		ttype225852* indextype;
		tnode225816* yy;
		ttype225852* typ;
		x = (*n).kindU.S6.Sons->data[0];
		lastindex = IL64(0);
		indextype = getsystype_282030(((NU8) 31));
		{
			NIM_BOOL LOC10;
			NI LOC12;
			tnode225816* idx;
			LOC10 = 0;
			LOC10 = ((*x).Kind == ((NU8) 34));
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = sonslen_226249(x);
			LOC10 = (LOC12 == 2);
			LA11: ;
			if (!LOC10) goto LA13;
			idx = semconstexpr_488503(c, (*x).kindU.S6.Sons->data[0]);
			lastindex = getordvalue_263187(idx);
			indextype = (*idx).Typ;
			x = (*x).kindU.S6.Sons->data[1];
		}
		LA13: ;
		yy = semexprwithtype_487211(c, x, 0);
		typ = (*yy).Typ;
		addson_226287(result, yy);
		{
			NI i_531663;
			NI HEX3Atmp_531799;
			NI LOC16;
			NI res_531802;
			i_531663 = 0;
			HEX3Atmp_531799 = 0;
			LOC16 = 0;
			LOC16 = sonslen_226249(n);
			HEX3Atmp_531799 = (NI32)(LOC16 - 1);
			res_531802 = 1;
			{
				while (1) {
					tnode225816* xx;
					if (!(res_531802 <= HEX3Atmp_531799)) goto LA18;
					i_531663 = res_531802;
					x = (*n).kindU.S6.Sons->data[i_531663];
					{
						NIM_BOOL LOC21;
						NI LOC23;
						tnode225816* idx;
						LOC21 = 0;
						LOC21 = ((*x).Kind == ((NU8) 34));
						if (!(LOC21)) goto LA22;
						LOC23 = 0;
						LOC23 = sonslen_226249(x);
						LOC21 = (LOC23 == 2);
						LA22: ;
						if (!LOC21) goto LA24;
						idx = semconstexpr_488503(c, (*x).kindU.S6.Sons->data[0]);
						idx = fitnode_487245(c, indextype, idx);
						{
							NI64 LOC28;
							LOC28 = 0;
							LOC28 = getordvalue_263187(idx);
							if (!!(((NI64)(lastindex + IL64(1)) == LOC28))) goto LA29;
							localerror_197955((*x).Info, ((NU16) 144), ((NimStringDesc*) &TMP2888));
						}
						LA29: ;
						x = (*x).kindU.S6.Sons->data[1];
					}
					LA24: ;
					xx = semexprwithtype_487211(c, x, (flags & 32));
					add_226498(result, xx);
					typ = commontype_487492(typ, (*xx).Typ);
					lastindex += 1;
					res_531802 += 1;
				} LA18: ;
			}
		}
		addsonskipintlit_282572((*result).Typ, typ);
		{
			NI i_531768;
			NI HEX3Atmp_531805;
			NI LOC32;
			NI res_531808;
			i_531768 = 0;
			HEX3Atmp_531805 = 0;
			LOC32 = 0;
			LOC32 = len_226364(result);
			HEX3Atmp_531805 = (LOC32 - 1);
			res_531808 = 0;
			{
				while (1) {
					if (!(res_531808 <= HEX3Atmp_531805)) goto LA34;
					i_531768 = res_531808;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_531768]), fitnode_487245(c, typ, (*result).kindU.S6.Sons->data[i_531768]));
					res_531808 += 1;
				} LA34: ;
			}
		}
	}
	LA1: ;
	LOC35 = 0;
	LOC35 = sonslen_226249(result);
	LOC36 = 0;
	LOC36 = getsystype_282030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*(*result).Typ).Sons->data[0]), makerangetype_291351(c, IL64(0), ((NI64) ((NI32)(LOC35 - 1))), (*n).Info, LOC36));
	return result;
}

N_NIMCALL(void, fixabstracttype_531831)(tcontext290021* c, tnode225816* n) {
	{
		NI i_531847;
		NI HEX3Atmp_532104;
		NI LOC2;
		NI res_532107;
		i_531847 = 0;
		HEX3Atmp_532104 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_532104 = (NI32)(LOC2 - 1);
		res_532107 = 1;
		{
			while (1) {
				tnode225816* it;
				if (!(res_532107 <= HEX3Atmp_532104)) goto LA4;
				i_531847 = res_532107;
				it = (*n).kindU.S6.Sons->data[i_531847];
				switch ((*it).Kind) {
				case ((NU8) 58):
				case ((NU8) 59):
				{
					{
						if (!((*(*it).kindU.S6.Sons->data[1]).Kind == ((NU8) 41))) goto LA8;
						asgnRefNoCycle((void**) (&(*(*it).kindU.S6.Sons->data[1]).Typ), arrayconstrtype_531546(c, (*it).kindU.S6.Sons->data[1]));
					}
					LA8: ;
					{
						ttype225852* LOC12;
						ttype225852* s;
						LOC12 = 0;
						LOC12 = skiptypes_230245((*it).Typ, IL64(211106240964864));
						if (!((*LOC12).Kind == ((NU8) 27) || (*LOC12).Kind == ((NU8) 48))) goto LA13;
						s = skiptypes_230245((*(*it).kindU.S6.Sons->data[1]).Typ, IL64(211106240964864));
						{
							NIM_BOOL LOC17;
							tsym225846* LOC21;
							ttype225852* LOC22;
							ttype225852* LOC23;
							LOC17 = 0;
							LOC17 = ((*s).Kind == ((NU8) 4));
							if (!(LOC17)) goto LA18;
							LOC17 = ((*(*s).Sons->data[1]).Kind == ((NU8) 3));
							LA18: ;
							if (!LOC17) goto LA19;
							LOC21 = 0;
							LOC21 = getcurrowner_290256();
							s = copytype_226195(s, LOC21, NIM_FALSE);
							LOC22 = 0;
							LOC22 = skiptypes_230245(s, IL64(211106240964864));
							LOC23 = 0;
							LOC23 = skiptypes_230245((*it).Typ, IL64(211106240964864));
							asgnRefNoCycle((void**) (&(*LOC22).Sons->data[1]), elemtype_263656(LOC23));
							asgnRefNoCycle((void**) (&(*(*it).kindU.S6.Sons->data[1]).Typ), s);
						}
						goto LA15;
						LA19: ;
						{
							NIM_BOOL LOC25;
							tsym225846* LOC29;
							ttype225852* LOC30;
							ttype225852* LOC31;
							LOC25 = 0;
							LOC25 = ((*s).Kind == ((NU8) 24));
							if (!(LOC25)) goto LA26;
							LOC25 = ((*(*s).Sons->data[0]).Kind == ((NU8) 3));
							LA26: ;
							if (!LOC25) goto LA27;
							LOC29 = 0;
							LOC29 = getcurrowner_290256();
							s = copytype_226195(s, LOC29, NIM_FALSE);
							LOC30 = 0;
							LOC30 = skiptypes_230245(s, IL64(211106240964864));
							LOC31 = 0;
							LOC31 = skiptypes_230245((*it).Typ, IL64(211106240964864));
							asgnRefNoCycle((void**) (&(*LOC30).Sons->data[0]), elemtype_263656(LOC31));
							asgnRefNoCycle((void**) (&(*(*it).kindU.S6.Sons->data[1]).Typ), s);
						}
						goto LA15;
						LA27: ;
						LA15: ;
					}
					goto LA10;
					LA13: ;
					{
						ttype225852* LOC33;
						ttype225852* s;
						LOC33 = 0;
						LOC33 = skiptypes_230245((*(*it).kindU.S6.Sons->data[1]).Typ, IL64(211106240964864));
						if (!((*LOC33).Kind == ((NU8) 5) || (*LOC33).Kind == ((NU8) 4) || (*LOC33).Kind == ((NU8) 18) || (*LOC33).Kind == ((NU8) 19))) goto LA34;
						s = skiptypes_230245((*it).Typ, IL64(211106240964864));
						{
							if (!!(((*s).Kind == ((NU8) 6)))) goto LA38;
							changetype_487253((*it).kindU.S6.Sons->data[1], s, NIM_TRUE);
						}
						LA38: ;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_531847]), (*it).kindU.S6.Sons->data[1]);
					}
					goto LA10;
					LA34: ;
					LA10: ;
				}
				break;
				case ((NU8) 41):
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_531847]), semarrayconstr_531588(c, it, 0));
				}
				break;
				default:
				{
				}
				break;
				}
				res_532107 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(NU8, isassignable_532184)(tcontext290021* c, tnode225816* n) {
	NU8 result;
	result = 0;
	result = isassignable_322003((*(*c).P).Owner, n);
	return result;
}

N_NIMCALL(void, performprocvarcheck_515600)(tcontext290021* c, tnode225816* n, tsym225846* s) {
	NI smoduleid;
	tsym225846* LOC1;
	LOC1 = 0;
	LOC1 = getmodule_235243(s);
	smoduleid = (*LOC1).Sup.Id;
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = !((((*s).Flags &(1<<((((NU8) 17))&31)))!=0));
		if (!(LOC5)) goto LA6;
		LOC5 = ((*(*s).Typ).Callconv == ((NU8) 0));
		LA6: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA7;
		LOC4 = !((smoduleid == (*(*c).Module).Sup.Id));
		LA7: ;
		if (!LOC4) goto LA8;
		{
			{
				tsym225846* module_515641;
				tsymseq225818* HEX3Atmp_515643;
				NI i_515646;
				NI l_515648;
				module_515641 = 0;
				HEX3Atmp_515643 = 0;
				HEX3Atmp_515643 = (*c).Friendmodules;
				i_515646 = 0;
				l_515648 = HEX3Atmp_515643->Sup.len;
				{
					while (1) {
						if (!(i_515646 < l_515648)) goto LA13;
						module_515641 = HEX3Atmp_515643->data[i_515646];
						{
							if (!(smoduleid == (*module_515641).Sup.Id)) goto LA16;
							goto LA10;
						}
						LA16: ;
						i_515646 += 1;
					} LA13: ;
				}
			}
			localerror_197955((*n).Info, ((NU16) 134), (*(*s).Name).S);
		} LA10: ;
	}
	LA8: ;
}

N_NIMCALL(void, semprocvarcheck_515664)(tcontext290021* c, tnode225816* n_515667) {
	tnode225816* n;
	n = skipconv_273732(n_515667);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 3));
		if (!(LOC3)) goto LA4;
		LOC3 = ((126976 &(1<<(((*(*n).kindU.S4.Sym).Kind)&31)))!=0);
		LA4: ;
		if (!LOC3) goto LA5;
		performprocvarcheck_515600(c, n, (*n).kindU.S4.Sym);
	}
	LA5: ;
}

N_NIMCALL(tnode225816*, newhiddenaddrtaken_532192)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 65))) goto LA3;
		checksonslen_291416(n, 1);
		result = (*n).kindU.S6.Sons->data[0];
	}
	goto LA1;
	LA3: ;
	{
		ttype225852* LOC6;
		LOC6 = 0;
		LOC6 = makevartype_290207(c, (*n).Typ);
		result = newnodeit_226145(((NU8) 64), (*n).Info, LOC6);
		addson_226287(result, n);
		{
			NU8 LOC9;
			LOC9 = 0;
			LOC9 = isassignable_532184(c, n);
			if (!!(((6 &(1<<((LOC9)&7)))!=0))) goto LA10;
			localerror_197955((*n).Info, ((NU16) 127), ((NimStringDesc*) &TMP2888));
		}
		LA10: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, analyseifaddresstaken_532237)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 3):
	{
		{
			NIM_BOOL LOC4;
			ttype225852* LOC6;
			LOC4 = 0;
			LOC4 = !(((*(*n).kindU.S4.Sym).Typ == NIM_NIL));
			if (!(LOC4)) goto LA5;
			LOC6 = 0;
			LOC6 = skiptypes_230245((*(*n).kindU.S4.Sym).Typ, IL64(211106232576000));
			LOC4 = !(((*LOC6).Kind == ((NU8) 23)));
			LA5: ;
			if (!LOC4) goto LA7;
			(*(*n).kindU.S4.Sym).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
			result = newhiddenaddrtaken_532192(c, n);
		}
		LA7: ;
	}
	break;
	case ((NU8) 45):
	{
		checksonslen_291416(n, 2);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 3)))) goto LA12;
			internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3081));
			goto BeforeRet;
		}
		LA12: ;
		{
			ttype225852* LOC16;
			LOC16 = 0;
			LOC16 = skiptypes_230245((*(*(*n).kindU.S6.Sons->data[1]).kindU.S4.Sym).Typ, IL64(211106232576000));
			if (!!(((*LOC16).Kind == ((NU8) 23)))) goto LA17;
			(*(*(*n).kindU.S6.Sons->data[1]).kindU.S4.Sym).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
			result = newhiddenaddrtaken_532192(c, n);
		}
		LA17: ;
	}
	break;
	case ((NU8) 42):
	{
		checkminsonslen_291426(n, 1);
		{
			ttype225852* LOC22;
			LOC22 = 0;
			LOC22 = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, IL64(211106232576000));
			if (!!(((*LOC22).Kind == ((NU8) 23)))) goto LA23;
			{
				if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3))) goto LA27;
				(*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
			}
			LA27: ;
			result = newhiddenaddrtaken_532192(c, n);
		}
		LA23: ;
	}
	break;
	default:
	{
		result = newhiddenaddrtaken_532192(c, n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, analyseifaddresstakenincall_532577)(tcontext290021* c, tnode225816* n) {
	ttype225852* t;
	checkminsonslen_291426(n, 1);
	t = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, 2048);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
		if (!(LOC3)) goto LA4;
		LOC3 = ((TMP3080[(*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic/8] &(1<<((*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic%8)))!=0);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NI i_532675;
			NI HEX3Atmp_532930;
			NI LOC8;
			NI res_532933;
			i_532675 = 0;
			HEX3Atmp_532930 = 0;
			LOC8 = 0;
			LOC8 = sonslen_226249(n);
			HEX3Atmp_532930 = (NI32)(LOC8 - 1);
			res_532933 = 1;
			{
				while (1) {
					if (!(res_532933 <= HEX3Atmp_532930)) goto LA10;
					i_532675 = res_532933;
					{
						NIM_BOOL LOC13;
						NIM_BOOL LOC14;
						NI LOC15;
						ttype225852* LOC18;
						LOC13 = 0;
						LOC14 = 0;
						LOC15 = 0;
						LOC15 = sonslen_226255(t);
						LOC14 = (i_532675 < LOC15);
						if (!(LOC14)) goto LA16;
						LOC14 = !(((*t).Sons->data[i_532675] == NIM_NIL));
						LA16: ;
						LOC13 = LOC14;
						if (!(LOC13)) goto LA17;
						LOC18 = 0;
						LOC18 = skiptypes_230245((*t).Sons->data[i_532675], IL64(211106232576000));
						LOC13 = ((*LOC18).Kind == ((NU8) 23));
						LA17: ;
						if (!LOC13) goto LA19;
						{
							NU8 LOC23;
							LOC23 = 0;
							LOC23 = isassignable_532184(c, (*n).kindU.S6.Sons->data[i_532675]);
							if (!!(((6 &(1<<((LOC23)&7)))!=0))) goto LA24;
							{
								if (!!(((*(*n).kindU.S6.Sons->data[i_532675]).Kind == ((NU8) 64)))) goto LA28;
								localerror_197955((*(*n).kindU.S6.Sons->data[i_532675]).Info, ((NU16) 127), ((NimStringDesc*) &TMP2888));
							}
							LA28: ;
						}
						LA24: ;
					}
					LA19: ;
					res_532933 += 1;
				} LA10: ;
			}
		}
		goto BeforeRet;
	}
	LA5: ;
	{
		NI i_532798;
		NI HEX3Atmp_532936;
		NI LOC31;
		NI res_532939;
		i_532798 = 0;
		HEX3Atmp_532936 = 0;
		LOC31 = 0;
		LOC31 = sonslen_226249(n);
		HEX3Atmp_532936 = (NI32)(LOC31 - 1);
		res_532939 = 1;
		{
			while (1) {
				if (!(res_532939 <= HEX3Atmp_532936)) goto LA33;
				i_532798 = res_532939;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_532798]).Kind == ((NU8) 32))) goto LA36;
					analyseifaddresstakenincall_532577(c, (*n).kindU.S6.Sons->data[i_532798]);
				}
				LA36: ;
				semprocvarcheck_515664(c, (*n).kindU.S6.Sons->data[i_532798]);
				{
					NIM_BOOL LOC40;
					NI LOC41;
					ttype225852* LOC43;
					LOC40 = 0;
					LOC41 = 0;
					LOC41 = sonslen_226255(t);
					LOC40 = (i_532798 < LOC41);
					if (!(LOC40)) goto LA42;
					LOC43 = 0;
					LOC43 = skiptypes_230245((*t).Sons->data[i_532798], IL64(211106232576000));
					LOC40 = ((*LOC43).Kind == ((NU8) 23));
					LA42: ;
					if (!LOC40) goto LA44;
					{
						if (!!(((*(*n).kindU.S6.Sons->data[i_532798]).Kind == ((NU8) 64)))) goto LA48;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_532798]), analyseifaddresstaken_532237(c, (*n).kindU.S6.Sons->data[i_532798]));
					}
					LA48: ;
				}
				LA44: ;
				res_532939 += 1;
			} LA33: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tnode225816*, semispartof_532962)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	NU8 r;
	tnode225816* LOC1;
	tnode225816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(n, 1);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_226698(n, 2);
	r = ispartof_478430(LOC1, LOC2);
	result = newintnodet_304028(((NI64) (r)), n);
	return result;
}

N_NIMCALL(tnode225816*, evaltypetrait_533072)(tnode225816* trait, ttype225852* operand, tsym225846* context) {
	tnode225816* result;
	ttype225852* typ;
	NimStringDesc* LOC1;
	result = 0;
	typ = skiptypes_230245(operand, 256);
	LOC1 = 0;
	LOC1 = nsuNormalize((*(*(*trait).kindU.S4.Sym).Name).S);
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3084))) goto LA2;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3085))) goto LA3;
	goto LA4;
	LA2: ;
	{
		NimStringDesc* LOC7;
		LOC7 = 0;
		LOC7 = typetostring_263031(typ, ((NU8) 0));
		result = newstrnode_226118(((NU8) 20), LOC7);
		asgnRefNoCycle((void**) (&(*result).Typ), newtype_226083(((NU8) 28), context));
		(*result).Info = (*trait).Info;
	}
	goto LA5;
	LA3: ;
	{
		NI LOC9;
		LOC9 = 0;
		LOC9 = len_226364((*typ).N);
		result = newintnode_226096(((NU8) 6), ((NI64) ((NI32)(LOC9 - 1))));
		asgnRefNoCycle((void**) (&(*result).Typ), newtype_226083(((NU8) 31), context));
		(*result).Info = (*trait).Info;
	}
	goto LA5;
	LA4: ;
	{
		{
			NimStringDesc* LOC15;
			if (!NIM_TRUE) goto LA13;
			LOC15 = 0;
			LOC15 = HEX24_198126(TMP3086);
			internalerror_198006(LOC15);
		}
		LA13: ;
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode225816*, semtypetraits_533104)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* t;
	result = 0;
	checkminsonslen_291426(n, 2);
	t = (*(*n).kindU.S6.Sons->data[1]).Typ;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = !((t == NIM_NIL));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*t).Kind == ((NU8) 8));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_198126(TMP3082);
		internalerror_198006(LOC7);
	}
	LA5: ;
	{
		NI LOC10;
		tnode225816* LOC13;
		tsym225846* LOC14;
		LOC10 = 0;
		LOC10 = sonslen_226255(t);
		if (!(0 < LOC10)) goto LA11;
		LOC13 = 0;
		LOC13 = HEX5BHEX5D_226698(n, 0);
		LOC14 = 0;
		LOC14 = getcurrowner_290256();
		result = evaltypetrait_533072(LOC13, t, LOC14);
	}
	goto LA8;
	LA11: ;
	{
		result = n;
	}
	LA8: ;
	return result;
}

N_NIMCALL(NI, expectintlit_532980)(tcontext290021* c, tnode225816* n) {
	NI result;
	tnode225816* x;
	result = 0;
	x = (*c).Semconstexpr(c, n);
	switch ((*x).Kind) {
	case ((NU8) 6) ... ((NU8) 10):
	{
		result = ((NI) ((*x).kindU.S1.Intval));
	}
	break;
	default:
	{
		localerror_197955((*n).Info, ((NU16) 7), ((NimStringDesc*) &TMP2888));
	}
	break;
	}
	return result;
}

static N_INLINE(NI, tolinenumber_197073)(tlineinfo195539 info) {
	NI result;
	result = 0;
	result = ((NI) (info.Line));
	return result;
}

N_NIMCALL(tnode225816*, seminstantiationinfo_533003)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI idx;
	NI usefullpaths;
	tlineinfo195539 info;
	tnode225816* filename;
	ttype225852* LOC1;
	tnode225816* line;
	ttype225852* LOC7;
	NI LOC8;
	result = 0;
	result = newnodeit_226145(((NU8) 37), (*n).Info, (*n).Typ);
	idx = expectintlit_532980(c, (*n).kindU.S6.Sons->data[1]);
	usefullpaths = expectintlit_532980(c, (*n).kindU.S6.Sons->data[2]);
	info = getinfocontext_196992(idx);
	LOC1 = 0;
	LOC1 = getsystype_282030(((NU8) 28));
	filename = newnodeit_226145(((NU8) 20), (*n).Info, LOC1);
	{
		if (!!((usefullpaths == 0))) goto LA4;
		asgnRefNoCycle((void**) (&(*filename).kindU.S3.Strval), tofullpath_197037(info.Fileindex));
	}
	goto LA2;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*filename).kindU.S3.Strval), tofilename_197025(info.Fileindex));
	}
	LA2: ;
	LOC7 = 0;
	LOC7 = getsystype_282030(((NU8) 31));
	line = newnodeit_226145(((NU8) 6), (*n).Info, LOC7);
	LOC8 = 0;
	LOC8 = tolinenumber_197073(info);
	(*line).kindU.S1.Intval = ((NI64) (LOC8));
	add_226498(result, filename);
	add_226498(result, line);
	return result;
}

N_NIMCALL(tnode225816*, semord_533187)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI64 LOC1;
	NI64 LOC2;
	ttype225852* LOC3;
	result = 0;
	result = n;
	LOC1 = 0;
	LOC1 = firstord_263004((*(*n).kindU.S6.Sons->data[1]).Typ);
	LOC2 = 0;
	LOC2 = lastord_263010((*(*n).kindU.S6.Sons->data[1]).Typ);
	LOC3 = 0;
	LOC3 = getsystype_282030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*result).Typ), makerangetype_291351(c, LOC1, LOC2, (*n).Info, LOC3));
	return result;
}

N_NIMCALL(tnode225816*, semlowhigh_530538)(tcontext290021* c, tnode225816* n, NU16 m) {
	tnode225816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_197955((*n).Info, ((NU16) 69), optostr_530544[(m)- 4]);
	}
	goto LA1;
	LA4: ;
	{
		ttype225852* typ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 16));
		typ = skiptypes_230245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(2306054115455707392));
		switch ((*typ).Kind) {
		case ((NU8) 24):
		case ((NU8) 28):
		case ((NU8) 27):
		case ((NU8) 48):
		{
			asgnRefNoCycle((void**) (&(*n).Typ), getsystype_282030(((NU8) 31)));
		}
		break;
		case ((NU8) 4):
		case ((NU8) 16):
		{
			asgnRefNoCycle((void**) (&(*n).Typ), (*typ).Sons->data[0]);
		}
		break;
		case ((NU8) 31) ... ((NU8) 35):
		case ((NU8) 2):
		case ((NU8) 1):
		case ((NU8) 14):
		case ((NU8) 41):
		case ((NU8) 42):
		case ((NU8) 43):
		{
			asgnRefNoCycle((void**) (&(*n).Typ), skiptypes_230245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(2306054115454658816)));
		}
		break;
		case ((NU8) 12):
		{
			tnode225816* LOC11;
			LOC11 = 0;
			LOC11 = copytree_226329(n);
			asgnRefNoCycle((void**) (&(*n).Typ), maketypefromexpr_290812(c, LOC11));
		}
		break;
		default:
		{
			localerror_197955((*n).Info, ((NU16) 67), optostr_530544[(m)- 4]);
		}
		break;
		}
	}
	LA1: ;
	result = n;
	return result;
}

N_NIMCALL(tnode225816*, semshallowcopy_533548)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	{
		NI LOC3;
		tnode225816* LOC6;
		tnode225816* LOC7;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 3)) goto LA4;
		result = newnodei_226138(((NU8) 74), (*n).Info);
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_226698(n, 1);
		add_226498(result, LOC6);
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_226698(n, 2);
		add_226498(result, LOC7);
		result = semasgn_537534(c, result);
	}
	goto LA1;
	LA4: ;
	{
		result = semdirectop_488032(c, n, flags);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, sembindsym_533223)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* sl;
	tnode225816* ismixin;
	tnode225816* id;
	tident200021* LOC13;
	tsym225846* s;
	result = 0;
	result = copynode_226323(n);
	add_226498(result, (*n).kindU.S6.Sons->data[0]);
	sl = semconstexpr_488503(c, (*n).kindU.S6.Sons->data[1]);
	{
		if (!!(((*sl).Kind == ((NU8) 20) || (*sl).Kind == ((NU8) 21) || (*sl).Kind == ((NU8) 22)))) goto LA3;
		localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 6), ((NimStringDesc*) &TMP2888));
		result = errornode_291329(c, n);
		goto BeforeRet;
	}
	LA3: ;
	ismixin = semconstexpr_488503(c, (*n).kindU.S6.Sons->data[2]);
	{
		NIM_BOOL LOC7;
		NIM_BOOL LOC8;
		LOC7 = 0;
		LOC8 = 0;
		LOC8 = !(((*ismixin).Kind == ((NU8) 6)));
		if (LOC8) goto LA9;
		LOC8 = ((*ismixin).kindU.S1.Intval < IL64(0));
		LA9: ;
		LOC7 = LOC8;
		if (LOC7) goto LA10;
		LOC7 = (IL64(2) < (*ismixin).kindU.S1.Intval);
		LA10: ;
		if (!LOC7) goto LA11;
		localerror_197955((*(*n).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
		result = errornode_291329(c, n);
		goto BeforeRet;
	}
	LA11: ;
	LOC13 = 0;
	LOC13 = getident_200472((*sl).kindU.S3.Strval);
	id = newidentnode_226125(LOC13, (*n).Info);
	s = qualifiedlookup_296122(c, id, 2);
	{
		tnode225816* sc;
		if (!!((s == NIM_NIL))) goto LA16;
		sc = symchoice_504476(c, id, s, ((NU8) ((*ismixin).kindU.S1.Intval)));
		add_226498(result, sc);
	}
	goto LA14;
	LA16: ;
	{
		localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 61), (*sl).kindU.S3.Strval);
	}
	LA14: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(tnode225816*, newderef_517404)(tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = newnodeit_226145(((NU8) 65), (*n).Info, (*(*n).Typ).Sons->data[0]);
	addson_226287(result, n);
	return result;
}

N_NIMCALL(tnode225816*, semlocals_533437)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI counter;
	ttype225852* tupletype;
	result = 0;
	counter = 0;
	tupletype = newtypes_290214(((NU8) 18), c);
	result = newnodeit_226145(((NU8) 37), (*n).Info, tupletype);
	asgnRefNoCycle((void**) (&(*tupletype).N), newnodei_226138(((NU8) 137), (*n).Info));
	{
		tscope225840* scope_533444;
		tscope225840* HEX3Atmp_533523;
		tscope225840* current_533526;
		scope_533444 = 0;
		HEX3Atmp_533523 = 0;
		HEX3Atmp_533523 = (*c).Currentscope;
		current_533526 = HEX3Atmp_533523;
		{
			while (1) {
				if (!!((current_533526 == NIM_NIL))) goto LA3;
				scope_533444 = current_533526;
				{
					if (!(scope_533444 == (*c).Toplevelscope)) goto LA6;
					goto LA1;
				}
				LA6: ;
				{
					tsym225846* it_533461;
					tstrtable225820 HEX3Atmp_533517;
					ttabiter235119 it_533520;
					tsym225846* s_533522;
					it_533461 = 0;
					memset((void*)(&HEX3Atmp_533517), 0, sizeof(HEX3Atmp_533517));
					HEX3Atmp_533517.Counter = (*scope_533444).Symbols.Counter;
					HEX3Atmp_533517.Data = (*scope_533444).Symbols.Data;
					memset((void*)(&it_533520), 0, sizeof(it_533520));
					s_533522 = inittabiter_235124((&it_533520), HEX3Atmp_533517);
					{
						while (1) {
							if (!!((s_533522 == NIM_NIL))) goto LA10;
							it_533461 = s_533522;
							{
								NIM_BOOL LOC13;
								ttype225852* LOC15;
								tsym225846* field;
								tsym225846* LOC18;
								tnode225816* LOC19;
								tnode225816* a;
								LOC13 = 0;
								LOC13 = ((2099976 &(1<<(((*it_533461).Kind)&31)))!=0);
								if (!(LOC13)) goto LA14;
								LOC15 = 0;
								LOC15 = skiptypes_230245((*it_533461).Typ, 8390656);
								LOC13 = !(((*LOC15).Kind == ((NU8) 48) || (*LOC15).Kind == ((NU8) 27) || (*LOC15).Kind == ((NU8) 8) || (*LOC15).Kind == ((NU8) 59) || (*LOC15).Kind == ((NU8) 6) || (*LOC15).Kind == ((NU8) 7) || (*LOC15).Kind == ((NU8) 3)));
								LA14: ;
								if (!LOC13) goto LA16;
								LOC18 = 0;
								LOC18 = getcurrowner_290256();
								field = newsym_226074(((NU8) 19), (*it_533461).Name, LOC18, (*n).Info);
								asgnRefNoCycle((void**) (&(*field).Typ), skiptypes_230245((*it_533461).Typ, 8390656));
								(*field).Position = counter;
								counter += 1;
								LOC19 = 0;
								LOC19 = newsymnode_226132(field);
								addson_226287((*tupletype).N, LOC19);
								addsonskipintlit_282572(tupletype, (*field).Typ);
								a = newsymnode_227755(it_533461, (*result).Info);
								{
									ttype225852* LOC22;
									LOC22 = 0;
									LOC22 = skiptypes_230245((*it_533461).Typ, 2048);
									if (!((*LOC22).Kind == ((NU8) 23))) goto LA23;
									a = newderef_517404(a);
								}
								LA23: ;
								add_226498(result, a);
							}
							LA16: ;
							s_533522 = nextiter_235132((&it_533520), HEX3Atmp_533517);
						} LA10: ;
					}
				}
				current_533526 = (*current_533526).Parent;
			} LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, magicsafteroverloadresolution_533553)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tnode225816* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(n, 0);
	switch ((*(*LOC1).kindU.S4.Sym).Magic) {
	case ((NU16) 164):
	{
		result = semispartof_532962(c, n, flags);
	}
	break;
	case ((NU16) 7):
	{
		result = semtypetraits_533104(c, n);
	}
	break;
	case ((NU16) 165):
	{
		tnode225816* LOC5;
		NimStringDesc* LOC6;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_226698(n, 1);
		LOC6 = 0;
		LOC6 = rendertree_250058(LOC5, 4);
		result = newstrnodet_304042(LOC6, n);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 28)));
	}
	break;
	case ((NU16) 261):
	{
		result = seminstantiationinfo_533003(c, n);
	}
	break;
	case ((NU16) 23):
	{
		result = semord_533187(c, n);
	}
	break;
	case ((NU16) 5):
	case ((NU16) 4):
	{
		tnode225816* LOC10;
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_226698(n, 0);
		result = semlowhigh_530538(c, n, (*(*LOC10).kindU.S4.Sym).Magic);
	}
	break;
	case ((NU16) 11):
	{
		result = semshallowcopy_533548(c, n, flags);
	}
	break;
	case ((NU16) 253):
	{
		result = sembindsym_533223(c, n);
	}
	break;
	case ((NU16) 254):
	{
		result = semlocals_533437(c, n);
	}
	break;
	case ((NU16) 218):
	{
		tnode225816* LOC15;
		result = n;
		LOC15 = 0;
		LOC15 = HEX5BHEX5D_226698(n, 1);
		asgnRefNoCycle((void**) (&(*result).Typ), (*LOC15).Typ);
	}
	break;
	default:
	{
		result = n;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, fixuptypeaftereval_488201)(tcontext290021* c, tnode225816* evaluated, tnode225816* eorig) {
	tnode225816* result;
	result = 0;
	{
		if (!((*(*eorig).Typ).Kind == ((NU8) 6) || (*(*eorig).Typ).Kind == ((NU8) 7) || (*(*eorig).Typ).Kind == ((NU8) 8))) goto LA3;
		result = semexprwithtype_487211(c, evaluated, 0);
	}
	goto LA1;
	LA3: ;
	{
		ttype225852* expectedtype;
		result = evaluated;
		expectedtype = skiptypes_230245((*eorig).Typ, IL64(576460752303423488));
		annotatetype_482223(result, expectedtype);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, evalatcompiletime_533591)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* callee;
	result = 0;
	result = n;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((*n).Kind == ((NU8) 27) || (*n).Kind == ((NU8) 29) || (*n).Kind == ((NU8) 30) || (*n).Kind == ((NU8) 31) || (*n).Kind == ((NU8) 26) || (*n).Kind == ((NU8) 28) || (*n).Kind == ((NU8) 32)));
		if (LOC3) goto LA4;
		LOC3 = !(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	callee = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	{
		NIM_BOOL LOC9;
		NIM_BOOL LOC10;
		tnode225816* call;
		NIM_BOOL allconst;
		LOC9 = 0;
		LOC10 = 0;
		LOC10 = !(((*callee).Magic == ((NU16) 0)));
		if (!(LOC10)) goto LA11;
		LOC10 = ((TMP3089[(*callee).Magic/8] &(1<<((*callee).Magic%8)))!=0);
		LA11: ;
		LOC9 = LOC10;
		if (!(LOC9)) goto LA12;
		LOC9 = !(((*n).Typ == NIM_NIL));
		LA12: ;
		if (!LOC9) goto LA13;
		call = newnodeit_226145(((NU8) 27), (*n).Info, (*n).Typ);
		add_226498(call, (*n).kindU.S6.Sons->data[0]);
		allconst = NIM_TRUE;
		{
			NI i_533737;
			NI HEX3Atmp_534164;
			NI LOC16;
			NI res_534167;
			i_533737 = 0;
			HEX3Atmp_534164 = 0;
			LOC16 = 0;
			LOC16 = len_226364(n);
			HEX3Atmp_534164 = (LOC16 - 1);
			res_534167 = 1;
			{
				while (1) {
					tnode225816* a;
					if (!(res_534167 <= HEX3Atmp_534164)) goto LA18;
					i_533737 = res_534167;
					a = getconstexpr_304004((*c).Module, (*n).kindU.S6.Sons->data[i_533737]);
					{
						if (!(a == NIM_NIL)) goto LA21;
						allconst = NIM_FALSE;
						a = (*n).kindU.S6.Sons->data[i_533737];
						{
							if (!((*a).Kind == ((NU8) 58))) goto LA25;
							a = (*a).kindU.S6.Sons->data[1];
						}
						LA25: ;
					}
					LA21: ;
					add_226498(call, a);
					res_534167 += 1;
				} LA18: ;
			}
		}
		{
			if (!allconst) goto LA29;
			result = getconstexpr_304004((*c).Module, call);
			{
				if (!result == 0) goto LA33;
				result = n;
			}
			goto LA31;
			LA33: ;
			{
				goto BeforeRet;
			}
			LA31: ;
		}
		LA29: ;
		asgnRefNoCycle((void**) (&(*result).Typ), getintervaltype_304464((*callee).Magic, call));
	}
	LA13: ;
	{
		{
			NI LOC39;
			ttypeseq225848* LOC54;
			TY411748 LOC55;
			LOC39 = 0;
			LOC39 = len_226364(n);
			if (!(1 < LOC39)) goto LA40;
			{
				NI i_533841;
				NI HEX3Atmp_534170;
				NI LOC43;
				NI res_534173;
				i_533841 = 0;
				HEX3Atmp_534170 = 0;
				LOC43 = 0;
				LOC43 = len_226364(n);
				HEX3Atmp_534170 = (LOC43 - 1);
				res_534173 = 1;
				{
					while (1) {
						if (!(res_534173 <= HEX3Atmp_534170)) goto LA45;
						i_533841 = res_534173;
						{
							NIM_BOOL LOC48;
							tnode225816* LOC49;
							tnode225816* LOC51;
							LOC48 = 0;
							LOC49 = 0;
							LOC49 = HEX5BHEX5D_226698(n, i_533841);
							LOC48 = !(((*(*LOC49).Typ).Kind == ((NU8) 59)));
							if (LOC48) goto LA50;
							LOC51 = 0;
							LOC51 = HEX5BHEX5D_226698(n, i_533841);
							LOC48 = !((((*(*LOC51).Typ).Flags &(1<<((((NU8) 9))&31)))!=0));
							LA50: ;
							if (!LOC48) goto LA52;
							goto LA36;
						}
						LA52: ;
						res_534173 += 1;
					} LA45: ;
				}
			}
			LOC54 = 0;
			LOC54 = (ttypeseq225848*) newSeq((&NTI225848), 1);
			memset((void*)LOC55, 0, sizeof(LOC55));
			LOC55[0] = (*n).Typ;
			asgnRefNoCycle((void**) (&LOC54->data[0]), LOC55[0]);
			asgnRefNoCycle((void**) (&(*n).Typ), newtypewithsons_290823(c, ((NU8) 59), LOC54));
			(*(*n).Typ).Flags |= ((NI32)1)<<((((NU8) 9))%(sizeof(NI32)*8));
		}
		LA40: ;
	} LA36: ;
	{
		NIM_BOOL LOC58;
		NIM_BOOL LOC59;
		tnode225816* call;
		LOC58 = 0;
		LOC59 = 0;
		LOC59 = !(((8389632 & (*callee).Flags) == 0));
		if (!(LOC59)) goto LA60;
		LOC59 = ((48 & (*callee).Flags) == 0);
		LA60: ;
		LOC58 = LOC59;
		if (!(LOC58)) goto LA61;
		LOC58 = !(((*n).Typ == NIM_NIL));
		LA61: ;
		if (!LOC58) goto LA62;
		{
			NIM_BOOL LOC66;
			LOC66 = 0;
			LOC66 = !((((*callee).Flags &(1<<((((NU8) 23))&31)))!=0));
			if (!(LOC66)) goto LA67;
			LOC66 = !(((goptions_169116 &(1<<((((NU8) 20))&31)))!=0));
			LA67: ;
			if (!LOC66) goto LA68;
			goto BeforeRet;
		}
		LA68: ;
		{
			if (!!(((TMP3089[(*callee).Magic/8] &(1<<((*callee).Magic%8)))!=0))) goto LA72;
			goto BeforeRet;
		}
		LA72: ;
		{
			NIM_BOOL LOC76;
			LOC76 = 0;
			LOC76 = !(((69632 &(1<<(((*callee).Kind)&31)))!=0));
			if (LOC76) goto LA77;
			LOC76 = isgenericroutine_232649(callee);
			LA77: ;
			if (!LOC76) goto LA78;
			goto BeforeRet;
		}
		LA78: ;
		{
			NIM_BOOL LOC82;
			NIM_BOOL LOC84;
			LOC82 = 0;
			LOC82 = !(((*n).Typ == NIM_NIL));
			if (!(LOC82)) goto LA83;
			LOC84 = 0;
			LOC84 = typeallowed_263231((*n).Typ, ((NU8) 10));
			LOC82 = !(LOC84);
			LA83: ;
			if (!LOC82) goto LA85;
			goto BeforeRet;
		}
		LA85: ;
		call = newnodeit_226145(((NU8) 27), (*n).Info, (*n).Typ);
		add_226498(call, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_534095;
			NI HEX3Atmp_534176;
			NI LOC88;
			NI res_534179;
			i_534095 = 0;
			HEX3Atmp_534176 = 0;
			LOC88 = 0;
			LOC88 = len_226364(n);
			HEX3Atmp_534176 = (LOC88 - 1);
			res_534179 = 1;
			{
				while (1) {
					tnode225816* a;
					if (!(res_534179 <= HEX3Atmp_534176)) goto LA90;
					i_534095 = res_534179;
					a = getconstexpr_304004((*c).Module, (*n).kindU.S6.Sons->data[i_534095]);
					{
						if (!(a == NIM_NIL)) goto LA93;
						result = n;
						goto BeforeRet;
					}
					LA93: ;
					add_226498(call, a);
					res_534179 += 1;
				} LA90: ;
			}
		}
		{
			if (!(((*callee).Flags &(1<<((((NU8) 23))&31)))!=0)) goto LA97;
			result = evalstaticexpr_477237((*c).Module, call, (*(*c).P).Owner);
			{
				NimStringDesc* LOC103;
				if (!result == 0) goto LA101;
				LOC103 = 0;
				LOC103 = rendertree_250058(call, 0);
				localerror_197955((*n).Info, ((NU16) 208), LOC103);
			}
			goto LA99;
			LA101: ;
			{
				result = fixuptypeaftereval_488201(c, result, n);
			}
			LA99: ;
		}
		goto LA95;
		LA97: ;
		{
			result = evalconstexpr_477226((*c).Module, call);
			{
				if (!result == 0) goto LA108;
				result = n;
			}
			goto LA106;
			LA108: ;
			{
				result = fixuptypeaftereval_488201(c, result, n);
			}
			LA106: ;
		}
		LA95: ;
	}
	LA62: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, aftercallactions_535062)(tcontext290021* c, tnode225816* n, tnode225816* orig, NU16 flags) {
	tnode225816* result;
	tsym225846* callee;
	result = 0;
	result = n;
	callee = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	switch ((*callee).Kind) {
	case ((NU8) 17):
	{
		result = semmacroexpr_488066(c, result, orig, callee, flags);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_488055(c, result, callee, flags);
	}
	break;
	default:
	{
		semfinishoperands_414292(c, result);
		activate_487327(c, result);
		fixabstracttype_531831(c, result);
		analyseifaddresstakenincall_532577(c, result);
		{
			if (!!(((*callee).Magic == ((NU16) 0)))) goto LA6;
			result = magicsafteroverloadresolution_533553(c, result, flags);
		}
		LA6: ;
	}
	break;
	}
	{
		if (!((*c).Intypeclass == 0)) goto LA10;
		result = evalatcompiletime_533591(c, result);
	}
	LA10: ;
	return result;
}

N_NIMCALL(tnode225816*, semdirectop_488032)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tnode225816* norig;
	result = 0;
	norig = copytree_226329(n);
	result = semoverloadedcallanalyseeffects_534248(c, n, norig, flags);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		result = aftercallactions_535062(c, result, norig, flags);
	}
	goto LA1;
	LA3: ;
	{
		result = errornode_291329(c, n);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, evalpattern_488579)(tcontext290021* c, tnode225816* n, tnode225816* orig) {
	tnode225816* result;
	NimStringDesc* rule;
	tsym225846* s;
	result = 0;
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 27));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
		LA4: ;
		if (!!(LOC3)) goto LA5;
		LOC7 = 0;
		LOC7 = HEX24_198126(TMP3075);
		internalerror_198006(LOC7);
	}
	LA5: ;
	rule = 0;
	{
		NIM_BOOL LOC10;
		LOC10 = 0;
		LOC10 = ((goptions_169116 &(1<<((((NU8) 12))&31)))!=0);
		if (!(LOC10)) goto LA11;
		LOC10 = ((gnotes_196305 &(IL64(1)<<(((((NU16) 274)- 230))&IL64(63))))!=0);
		LA11: ;
		if (!LOC10) goto LA12;
		rule = rendertree_250058(n, 4);
	}
	LA12: ;
	s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	switch ((*s).Kind) {
	case ((NU8) 17):
	{
		result = semmacroexpr_488066(c, n, orig, s, 0);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_488055(c, n, s, 0);
	}
	break;
	default:
	{
		result = semdirectop_488032(c, n, 0);
	}
	break;
	}
	{
		NIM_BOOL LOC19;
		NimStringDesc* LOC23;
		NimStringDesc* LOC24;
		LOC19 = 0;
		LOC19 = ((goptions_169116 &(1<<((((NU8) 12))&31)))!=0);
		if (!(LOC19)) goto LA20;
		LOC19 = ((gnotes_196305 &(IL64(1)<<(((((NU16) 274)- 230))&IL64(63))))!=0);
		LA20: ;
		if (!LOC19) goto LA21;
		LOC23 = 0;
		LOC24 = 0;
		LOC24 = rendertree_250058(result, 4);
		LOC23 = rawNewString(rule->Sup.len + LOC24->Sup.len + 7);
appendString(LOC23, rule);
appendString(LOC23, ((NimStringDesc*) &TMP3171));
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP3172));
		message_197976((*orig).Info, ((NU16) 274), LOC23);
	}
	LA21: ;
	return result;
}

N_NIMCALL(tnode225816*, applypatterns_488746)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		NI i_488784;
		NI HEX3Atmp_489242;
		NI res_489245;
		i_488784 = 0;
		HEX3Atmp_489242 = 0;
		HEX3Atmp_489242 = ((*c).Patterns->Sup.len - 1);
		res_489245 = HEX3Atmp_489242;
		{
			while (1) {
				tsym225846* pattern;
				if (!(0 <= res_489245)) goto LA3;
				i_488784 = res_489245;
				pattern = (*c).Patterns->data[i_488784];
				{
					tnode225816* x;
					if (!!(pattern == 0)) goto LA6;
					x = applyrule_481563(c, pattern, result);
					{
						if (!!(x == 0)) goto LA10;
						evaltemplatecounter_455330 += 1;
						{
							if (!(100 < evaltemplatecounter_455330)) goto LA14;
							globalerror_197934((*n).Info, ((NU16) 183), ((NimStringDesc*) &TMP2888));
						}
						LA14: ;
						asgnRefNoCycle((void**) (&(*c).Patterns->data[i_488784]), NIM_NIL);
						{
							if (!((*x).Kind == ((NU8) 115))) goto LA18;
							asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[1]), evalpattern_488579(c, (*x).kindU.S6.Sons->data[1], result));
							result = flattenstmts_262416(x);
						}
						goto LA16;
						LA18: ;
						{
							result = evalpattern_488579(c, x, result);
						}
						LA16: ;
						evaltemplatecounter_455330 -= 1;
						asgnRefNoCycle((void**) (&(*c).Patterns->data[i_488784]), pattern);
					}
					LA10: ;
				}
				LA6: ;
				res_489245 -= 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(tnode225816*, hlo_488575)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	(*c).Hloloopdetector += 1;
	{
		if (!(300 < (*c).Hloloopdetector)) goto LA3;
		result = n;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 82):
	case ((NU8) 83):
	case ((NU8) 51) ... ((NU8) 52):
	case ((NU8) 79) ... ((NU8) 81):
	case ((NU8) 84):
	{
		result = n;
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC9;
			NIM_BOOL LOC10;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = ((*n).Kind == ((NU8) 74) || (*n).Kind == ((NU8) 73) || (*n).Kind == ((NU8) 35) || (*n).Kind == ((NU8) 36));
			if (!(LOC10)) goto LA11;
			LOC10 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
			LA11: ;
			LOC9 = LOC10;
			if (!(LOC9)) goto LA12;
			LOC9 = ((520 & (*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Flags) == 520);
			LA12: ;
			if (!LOC9) goto LA13;
			result = n;
			goto BeforeRet;
		}
		LA13: ;
		result = applypatterns_488746(c, n);
		{
			if (!(result == n)) goto LA17;
			{
				NI i_489414;
				NI HEX3Atmp_489462;
				NI LOC20;
				NI res_489465;
				i_489414 = 0;
				HEX3Atmp_489462 = 0;
				LOC20 = 0;
				LOC20 = safelen_226424(result);
				HEX3Atmp_489462 = (LOC20 - 1);
				res_489465 = 0;
				{
					while (1) {
						tnode225816* a;
						tnode225816* h;
						if (!(res_489465 <= HEX3Atmp_489462)) goto LA22;
						i_489414 = res_489465;
						a = (*result).kindU.S6.Sons->data[i_489414];
						h = hlo_488575(c, a);
						{
							if (!!((h == a))) goto LA25;
							asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_489414]), h);
						}
						LA25: ;
						res_489465 += 1;
					} LA22: ;
				}
			}
		}
		goto LA15;
		LA17: ;
		{
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = isemptytype_232990((*n).Typ);
				if (!(LOC30)) goto LA31;
				LOC30 = isemptytype_232990((*result).Typ);
				LA31: ;
				if (!LOC30) goto LA32;
			}
			goto LA28;
			LA32: ;
			{
				result = fitnode_487245(c, (*n).Typ, result);
			}
			LA28: ;
			result = commonoptimizations_440642((*c).Module, result);
			result = hlo_488575(c, result);
			result = commonoptimizations_440642((*c).Module, result);
		}
		LA15: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, hlobody_489479)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*c).Patterns->Sup.len == 0);
		if (LOC3) goto LA4;
		LOC3 = !(((goptions_169116 &(1<<((((NU8) 21))&31)))!=0));
		LA4: ;
		if (!LOC3) goto LA5;
		result = n;
		goto BeforeRet;
	}
	LA5: ;
	(*c).Hloloopdetector = 0;
	result = hlo_488575(c, n);
	BeforeRet: ;
	return result;
}

static N_INLINE(void, popproccon_290426)(tcontext290021* c) {
	asgnRef((void**) (&(*c).P), (*(*c).P).Next);
}

N_NIMCALL(void, fixupinstantiatedsymbols_490553)(tcontext290021* c, tsym225846* s) {
	{
		NI i_490580;
		NI HEX3Atmp_490598;
		NI res_490601;
		i_490580 = 0;
		HEX3Atmp_490598 = 0;
		HEX3Atmp_490598 = (NI32)((*c).Generics->Sup.len - 1);
		res_490601 = 0;
		{
			while (1) {
				if (!(res_490601 <= HEX3Atmp_490598)) goto LA3;
				i_490580 = res_490601;
				{
					tsym225846* oldprc;
					tscope225840* LOC8;
					tnode225816* n;
					tnode225816* LOC9;
					if (!((*(*c).Generics->data[i_490580].Genericsym).Sup.Id == (*s).Sup.Id)) goto LA6;
					oldprc = (*(*c).Generics->data[i_490580].Inst).Sym;
					pushinfocontext_196930((*oldprc).Info);
					LOC8 = 0;
					LOC8 = openscope_295191(c);
					n = (*oldprc).Ast;
					LOC9 = 0;
					LOC9 = getbody_279270(s);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), copytree_226329(LOC9));
					instantiatebody_490449(c, n, oldprc);
					closescope_295211(c);
					popinfocontext_196957();
				}
				LA6: ;
				res_490601 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(tsym225846*, searchforborrowproc_494620)(tcontext290021* c, tscope225840* startscope, tsym225846* fn) {
	tsym225846* result;
	tnode225816* call;
	NIM_BOOL hasdistinct;
	tnode225816* LOC1;
	result = 0;
	call = newnodei_226138(((NU8) 27), (*fn).Info);
	hasdistinct = NIM_FALSE;
	LOC1 = 0;
	LOC1 = newidentnode_226125((*fn).Name, (*fn).Info);
	add_226498(call, LOC1);
	{
		NI i_494649;
		NI HEX3Atmp_494750;
		NI LOC3;
		NI res_494753;
		i_494649 = 0;
		HEX3Atmp_494750 = 0;
		LOC3 = 0;
		LOC3 = len_226364((*(*fn).Typ).N);
		HEX3Atmp_494750 = (LOC3 - 1);
		res_494753 = 1;
		{
			while (1) {
				tnode225816* param;
				ttype225852* t;
				ttype225852* LOC12;
				tnode225816* LOC13;
				if (!(res_494753 <= HEX3Atmp_494750)) goto LA5;
				i_494649 = res_494753;
				param = (*(*(*fn).Typ).N).kindU.S6.Sons->data[i_494649];
				t = skiptypes_230245((*param).Typ, IL64(211106240964608));
				{
					NIM_BOOL LOC8;
					LOC8 = 0;
					LOC8 = ((*t).Kind == ((NU8) 13));
					if (LOC8) goto LA9;
					LOC8 = ((*(*param).Typ).Kind == ((NU8) 13));
					LA9: ;
					if (!LOC8) goto LA10;
					hasdistinct = NIM_TRUE;
				}
				LA10: ;
				LOC12 = 0;
				LOC12 = baseofdistinct_272939(t);
				LOC13 = 0;
				LOC13 = newnodeit_226145(((NU8) 1), (*fn).Info, LOC12);
				add_226498(call, LOC13);
				res_494753 += 1;
			} LA5: ;
		}
	}
	{
		tnode225816* resolved;
		NU32 LOC18;
		if (!hasdistinct) goto LA16;
		LOC18 = 0;
		LOC18 |=(1<<((NI32)((*fn).Kind)%(sizeof(NI32)*8)));
		resolved = semoverloadedcall_494100(c, call, call, LOC18);
		{
			if (!!((resolved == NIM_NIL))) goto LA21;
			result = (*(*resolved).kindU.S6.Sons->data[0]).kindU.S4.Sym;
		}
		LA21: ;
	}
	LA16: ;
	return result;
}

N_NIMCALL(void, semborrow_524035)(tcontext290021* c, tnode225816* n, tsym225846* s) {
	tsym225846* b;
	b = searchforborrowproc_494620(c, (*(*c).Currentscope).Parent, s);
	{
		if (!!((b == NIM_NIL))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), newsymnode_226132(b));
	}
	goto LA1;
	LA3: ;
	{
		localerror_197955((*n).Info, ((NU16) 139), ((NimStringDesc*) &TMP2888));
	}
	LA1: ;
}

N_NIMCALL(void, sideeffectscheck_490615)(tcontext290021* c, tsym225846* s) {
	{
		if (!((3072 & (*s).Flags) == 3072)) goto LA3;
		localerror_197955((*s).Info, ((NU16) 217), (*(*s).Name).S);
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, semprocaux_525170)(tcontext290021* c, tnode225816* n, NU8 kind, tspecialwords204012 validpragmas, NU8 phase) {
	tnode225816* result;
	tsym225846* s;
	NIM_BOOL typeisdetermined;
	NIM_BOOL isanon;
	tscope225840* oldscope;
	tscope225840* LOC25;
	tnode225816* gp;
	tsym225846* proto;
	result = 0;
	result = semprocannotation_524247(c, n);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = n;
	checksonslen_291416(n, 7);
	s = 0;
	typeisdetermined = NIM_FALSE;
	isanon = NIM_FALSE;
	{
		tnode225816* LOC7;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_226698(n, 0);
		if (!!(((*LOC7).Kind == ((NU8) 3)))) goto LA8;
		{
			tnode225816* LOC12;
			tsym225846* LOC15;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_226698(n, 0);
			if (!((*LOC12).Kind == ((NU8) 1))) goto LA13;
			LOC15 = 0;
			LOC15 = getcurrowner_290256();
			s = newsym_226074(kind, idanon_200504, LOC15, (*n).Info);
			isanon = NIM_TRUE;
		}
		goto LA10;
		LA13: ;
		{
			s = semidentdef_519665(c, (*n).kindU.S6.Sons->data[0], kind);
		}
		LA10: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_226132(s));
		asgnRefNoCycle((void**) (&(*s).Ast), n);
		asgnRef((void**) (&(*s).kindU.S2.Scope), (*c).Currentscope);
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = (((*(*c).Module).Flags &(1<<((((NU8) 8))&31)))!=0);
			if (!(LOC19)) goto LA20;
			LOC19 = !((((*(*c).Module).Flags &(1<<((((NU8) 13))&31)))!=0));
			LA20: ;
			if (!LOC19) goto LA21;
			addinterfaceoverloadablesymat_295855(c, (*c).Currentscope, s);
			(*s).Flags |= ((NI32)1)<<((((NU8) 4))%(sizeof(NI32)*8));
			goto BeforeRet;
		}
		LA21: ;
	}
	goto LA5;
	LA8: ;
	{
		tnode225816* LOC24;
		LOC24 = 0;
		LOC24 = HEX5BHEX5D_226698(n, 0);
		s = (*LOC24).kindU.S4.Sym;
		asgnRefNoCycle((void**) (&(*s).Owner), getcurrowner_290256());
		typeisdetermined = ((*s).Typ == NIM_NIL);
		asgnRefNoCycle((void**) (&(*s).Ast), n);
		asgnRef((void**) (&(*s).kindU.S2.Scope), (*c).Currentscope);
	}
	LA5: ;
	oldscope = (*c).Currentscope;
	asgnRef((void**) (&(*c).Currentscope), (*s).kindU.S2.Scope);
	pushowner_290261(s);
	LOC25 = 0;
	LOC25 = openscope_295191(c);
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA28;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_504001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA26;
	LA28: ;
	{
		gp = newnodei_226138(((NU8) 75), (*n).Info);
	}
	LA26: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA33;
		semparamlist_487284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NI LOC37;
			LOC37 = 0;
			LOC37 = sonslen_226249(gp);
			if (!(0 < LOC37)) goto LA38;
			{
				if (!((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1))) goto LA42;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), gp);
			}
			LA42: ;
		}
		LA38: ;
	}
	goto LA31;
	LA33: ;
	{
		asgnRefNoCycle((void**) (&(*s).Typ), newtypes_290214(((NU8) 25), c));
		rawaddson_230562((*s).Typ, NIM_NIL);
	}
	LA31: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA47;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), sempattern_506110(c, (*n).kindU.S6.Sons->data[1]));
	}
	LA47: ;
	{
		if (!((49152 &(1<<(((*s).Kind)&31)))!=0)) goto LA51;
		(*(*s).Typ).Flags |= ((NI32)1)<<((((NU8) 14))%(sizeof(NI32)*8));
	}
	LA51: ;
	proto = searchforproc_309414(c, (*s).kindU.S2.Scope, s);
	{
		if (!(proto == NIM_NIL)) goto LA55;
		{
			if (!((*s).Kind == ((NU8) 15))) goto LA59;
			(*(*s).Typ).Callconv = ((NU8) 8);
		}
		goto LA57;
		LA59: ;
		{
			toptionentry290005* LOC62;
			LOC62 = 0;
			LOC62 = lastoptionentry_290176(c);
			(*(*s).Typ).Callconv = (*LOC62).Defaultcc;
		}
		LA57: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 31))&31)))!=0)) goto LA65;
		}
		goto LA63;
		LA65: ;
		{
			if (!((520256 &(1<<((kind)&31)))!=0)) goto LA68;
			{
				if (!!(typeisdetermined)) goto LA72;
				addinterfaceoverloadablesymat_295855(c, (*s).kindU.S2.Scope, s);
			}
			LA72: ;
		}
		goto LA63;
		LA68: ;
		{
			{
				if (!!(typeisdetermined)) goto LA77;
				addinterfacedeclat_295779(c, (*s).kindU.S2.Scope, s);
			}
			LA77: ;
		}
		LA63: ;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA81;
			pragma_310079(c, s, (*n).kindU.S6.Sons->data[4], validpragmas);
		}
		goto LA79;
		LA81: ;
		{
			implicitpragmas_315398(c, s, n, validpragmas);
		}
		LA79: ;
	}
	goto LA53;
	LA55: ;
	{
		tscope225840* LOC93;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA87;
			localerror_197955((*(*n).kindU.S6.Sons->data[4]).Info, ((NU16) 136), ((NimStringDesc*) &TMP2888));
		}
		LA87: ;
		{
			if (!!((((*proto).Flags &(1<<((((NU8) 4))&31)))!=0))) goto LA91;
			wrongredefinition_295675((*n).Info, (*(*proto).Name).S);
		}
		LA91: ;
		(*proto).Flags &= ~(((NI32)1) << ((((NU8) 4)) % (sizeof(NI32)*8)));
		closescope_295211(c);
		LOC93 = 0;
		LOC93 = openscope_295191(c);
		{
			if (!!(((*(*(*proto).Ast).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA96;
			addgenericparamlisttoscope_522747(c, (*(*proto).Ast).kindU.S6.Sons->data[2]);
		}
		LA96: ;
		addparams_487293(c, (*(*proto).Typ).N, (*proto).Kind);
		(*proto).Info = (*s).Info;
		asgnRefNoCycle((void**) (&(*s).Typ), (*proto).Typ);
		s = proto;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), (*(*proto).Ast).kindU.S6.Sons->data[2]);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[3]), (*(*proto).Ast).kindU.S6.Sons->data[3]);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[4]), (*(*proto).Ast).kindU.S6.Sons->data[4]);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA100;
			internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3046));
		}
		LA100: ;
		asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym), proto);
		{
			NIM_BOOL LOC104;
			NimStringDesc* LOC108;
			LOC104 = 0;
			LOC104 = importantcomments_169156();
			if (!(LOC104)) goto LA105;
			LOC104 = !((*(*proto).Ast).Comment == 0);
			LA105: ;
			if (!LOC104) goto LA106;
			LOC108 = 0;
			LOC108 = (*n).Comment; (*n).Comment = copyStringRC1((*(*proto).Ast).Comment);
			if (LOC108) nimGCunrefNoCycle(LOC108);
		}
		LA106: ;
		asgnRefNoCycle((void**) (&(*proto).Ast), n);
		popowner_290267();
		pushowner_290261(s);
	}
	LA53: ;
	(*s).Options = goptions_169116;
	{
		if (!(((*s).Flags &(1<<((((NU8) 30))&31)))!=0)) goto LA111;
		semoverride_525035(c, s, n);
	}
	LA111: ;
	{
		NIM_BOOL usepseudogenerics;
		if (!!(((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)))) goto LA115;
		{
			if (!(((*s).Flags &(1<<((((NU8) 26))&31)))!=0)) goto LA119;
			localerror_197955((*(*n).kindU.S6.Sons->data[6]).Info, ((NU16) 137), (*(*s).Name).S);
		}
		LA119: ;
		usepseudogenerics = ((393216 &(1<<((kind)&31)))!=0);
		{
			NIM_BOOL LOC123;
			LOC123 = 0;
			LOC123 = ((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1));
			if (LOC123) goto LA124;
			LOC123 = usepseudogenerics;
			LA124: ;
			if (!LOC123) goto LA125;
			{
				if (!!(usepseudogenerics)) goto LA129;
				paramstypecheck_488015(c, (*s).Typ);
			}
			LA129: ;
			pushproccon_290381(c, s);
			maybeaddresult_487301(c, s, n);
			{
				tnode225816* sembody;
				tnode225816* LOC135;
				if (!!((((*s).Flags &(1<<((((NU8) 5))&31)))!=0))) goto LA133;
				LOC135 = 0;
				LOC135 = semprocbody_487238(c, (*n).kindU.S6.Sons->data[6]);
				sembody = hlobody_489479(c, LOC135);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_441373((*c).Module, sembody, s));
			}
			LA133: ;
			popproccon_290426(c);
		}
		goto LA121;
		LA125: ;
		{
			intset222056 tobind;
			{
				NIM_BOOL LOC139;
				tident200021* LOC143;
				tsym225846* LOC144;
				LOC139 = 0;
				LOC139 = !(((*(*s).Typ).Sons->data[0] == NIM_NIL));
				if (!(LOC139)) goto LA140;
				LOC139 = !(((49152 &(1<<((kind)&31)))!=0));
				LA140: ;
				if (!LOC139) goto LA141;
				LOC143 = 0;
				LOC143 = getident_200472(((NimStringDesc*) &TMP2923));
				LOC144 = 0;
				LOC144 = newsym_226074(((NU8) 0), LOC143, NIM_NIL, (*n).Info);
				adddecl_295694(c, LOC144);
			}
			LA141: ;
			memset((void*)(&tobind), 0, sizeof(tobind));
			chckNil((void*)(&tobind));
			memset((void*)(&tobind), 0, sizeof(tobind));
			initintset_222950((&tobind));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semgenericstmtscope_510240(c, (*n).kindU.S6.Sons->data[6], 0, (&tobind)));
			fixupinstantiatedsymbols_490553(c, s);
		}
		LA121: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 5))&31)))!=0)) goto LA147;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), emptynode_226738);
		}
		LA147: ;
	}
	goto LA113;
	LA115: ;
	{
		{
			if (!!((proto == NIM_NIL))) goto LA152;
			localerror_197955((*n).Info, ((NU16) 138), (*(*proto).Name).S);
		}
		LA152: ;
		{
			NIM_BOOL LOC156;
			LOC156 = 0;
			LOC156 = ((67108896 & (*s).Flags) == 0);
			if (!(LOC156)) goto LA157;
			LOC156 = ((*s).Magic == ((NU16) 0));
			LA157: ;
			if (!LOC156) goto LA158;
			(*s).Flags |= ((NI32)1)<<((((NU8) 4))%(sizeof(NI32)*8));
		}
		goto LA154;
		LA158: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 26))&31)))!=0)) goto LA161;
			semborrow_524035(c, n, s);
		}
		goto LA154;
		LA161: ;
		LA154: ;
	}
	LA113: ;
	sideeffectscheck_490615(c, s);
	closescope_295211(c);
	asgnRef((void**) (&(*c).Currentscope), oldscope);
	popowner_290267();
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA165;
		(*c).Patterns = (tsymseq225818*) incrSeq(&((*c).Patterns)->Sup, sizeof(tsym225846*));
		asgnRefNoCycle((void**) (&(*c).Patterns->data[(*c).Patterns->Sup.len-1]), s);
	}
	LA165: ;
	{
		if (!isanon) goto LA169;
		asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
	}
	LA169: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, determinetype_491327)(tcontext290021* c, tsym225846* s) {
	tnode225816* LOC5;
	{
		if (!!(((*s).Typ == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = semprocaux_525170(c, (*s).Ast, (*s).Kind, TMP3227, ((NU8) 1));
	BeforeRet: ;
}

N_NIMCALL(void, pickbestcandidate_491331)(tcontext290021* c, tnode225816* headsymbol, tnode225816* n, tnode225816* orig, tnode225816* initialbinding, NU32 filter, tcandidate405209* best, tcandidate405209* alt, tsymseq225818** errors) {
	toverloaditer295491 o;
	tsym225846* sym;
	NI symscope;
	tcandidate405209 z;
	memset((void*)(&o), 0, sizeof(o));
	sym = initoverloaditer_296665((&o), c, headsymbol);
	symscope = lastoverloadscope_297011((&o));
	memset((void*)(&z), 0, sizeof(z));
	{
		if (!(sym == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	initcandidate_405295(c, best, sym, initialbinding, symscope);
	initcandidate_405295(c, alt, sym, initialbinding, symscope);
	(*best).State = ((NU8) 2);
	{
		while (1) {
			if (!!((sym == NIM_NIL))) goto LA6;
			{
				NI LOC11;
				if (!((filter &(1<<(((*sym).Kind)&31)))!=0)) goto LA9;
				determinetype_491327(c, sym);
				LOC11 = 0;
				LOC11 = lastoverloadscope_297011((&o));
				initcandidate_405295(c, (&z), sym, initialbinding, LOC11);
				z.Calleesym = sym;
				matches_414382(c, n, orig, (&z));
				{
					NIM_BOOL LOC14;
					LOC14 = 0;
					LOC14 = HEX3DHEX3D_491401((*errors), NIM_NIL);
					if (!!(LOC14)) goto LA15;
					safeadd_491544(errors, sym);
					{
						NIM_BOOL LOC19;
						LOC19 = 0;
						LOC19 = HEX3DHEX3D_491401(z.Errors, NIM_NIL);
						if (!!(LOC19)) goto LA20;
						{
							tsym225846* err_491642;
							tsymseq225818* HEX3Atmp_491703;
							NI i_491706;
							NI l_491708;
							err_491642 = 0;
							HEX3Atmp_491703 = 0;
							HEX3Atmp_491703 = z.Errors;
							i_491706 = 0;
							l_491708 = HEX3Atmp_491703->Sup.len;
							{
								while (1) {
									if (!(i_491706 < l_491708)) goto LA24;
									err_491642 = HEX3Atmp_491703->data[i_491706];
									(*errors) = (tsymseq225818*) incrSeq(&((*errors))->Sup, sizeof(tsym225846*));
									asgnRefNoCycle((void**) (&(*errors)->data[(*errors)->Sup.len-1]), err_491642);
									i_491706 += 1;
								} LA24: ;
							}
						}
					}
					LA20: ;
				}
				LA15: ;
				{
					if (!(z.State == ((NU8) 1))) goto LA27;
					{
						if (!((49152 &(1<<(((*sym).Kind)&31)))!=0)) goto LA31;
						z.Exactmatches += 200;
					}
					LA31: ;
					switch ((*best).State) {
					case ((NU8) 0):
					case ((NU8) 2):
					{
						genericAssign((void*)(&(*best)), (void*)(&z), (&NTI405209));
					}
					break;
					case ((NU8) 1):
					{
						NI cmp;
						cmp = cmpcandidates_406039((&(*best)), (&z));
						{
							if (!(cmp < 0)) goto LA37;
							genericAssign((void*)(&(*best)), (void*)(&z), (&NTI405209));
						}
						goto LA35;
						LA37: ;
						{
							if (!(cmp == 0)) goto LA40;
							genericAssign((void*)(&(*alt)), (void*)(&z), (&NTI405209));
						}
						goto LA35;
						LA40: ;
						{
						}
						LA35: ;
					}
					break;
					}
				}
				LA27: ;
			}
			LA9: ;
			sym = nextoverloaditer_297032((&o), c, headsymbol);
		} LA6: ;
	}
	BeforeRet: ;
}

static N_INLINE(NimStringDesc*, HEX5BHEX5D_84166)(NimStringDesc* s, slice84173 x) {
	NimStringDesc* result;
	NI LOC1;
	NI LOC7;
	result = 0;
	LOC1 = 0;
	{
		if (!(0 <= x.A)) goto LA4;
		LOC1 = x.A;
	}
	goto LA2;
	LA4: ;
	{
		LOC1 = (NI32)(s->Sup.len + x.A);
	}
	LA2: ;
	LOC7 = 0;
	{
		if (!(0 <= x.B)) goto LA10;
		LOC7 = x.B;
	}
	goto LA8;
	LA10: ;
	{
		LOC7 = (NI32)(s->Sup.len + x.B);
	}
	LA8: ;
	result = copyStrLast(s, LOC1, LOC7);
	return result;
}

N_NIMCALL(void, notfounderror_491727)(tcontext290021* c, tnode225816* n_491730, tsymseq225818* errors) {
	NimStringDesc* proto;
	NU8 prefer;
	NimStringDesc* result;
	NimStringDesc* LOC32;
	NimStringDesc* candidates;
	{
		if (!(0 < (*c).Incompilescontext)) goto LA3;
		globalerror_197934((*n_491730).Info, ((NU16) 129), ((NimStringDesc*) &TMP2888));
	}
	LA3: ;
	{
		tnode225816* LOC9;
		NimStringDesc* LOC10;
		if (!(errors->Sup.len == 0)) goto LA7;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_226698(n_491730, 0);
		LOC10 = 0;
		LOC10 = rendertree_250058(LOC9, 0);
		localerror_197955((*n_491730).Info, ((NU16) 88), LOC10);
	}
	LA7: ;
	proto = describeargs_406200(c, n_491730, 1, ((NU8) 0));
	prefer = ((NU8) 0);
	{
		tsym225846* err_491758;
		NI i_491836;
		NI l_491838;
		err_491758 = 0;
		i_491836 = 0;
		l_491838 = errors->Sup.len;
		{
			while (1) {
				NimStringDesc* errproto;
				tnode225816* n;
				if (!(i_491836 < l_491838)) goto LA13;
				err_491758 = errors->data[i_491836];
				errproto = copyString(((NimStringDesc*) &TMP2888));
				n = (*(*err_491758).Typ).N;
				{
					NI i_491773;
					NI HEX3Atmp_491829;
					NI LOC15;
					NI res_491832;
					i_491773 = 0;
					HEX3Atmp_491829 = 0;
					LOC15 = 0;
					LOC15 = len_226364(n);
					HEX3Atmp_491829 = (NI32)(LOC15 - 1);
					res_491832 = 1;
					{
						while (1) {
							tnode225816* p;
							if (!(res_491832 <= HEX3Atmp_491829)) goto LA17;
							i_491773 = res_491832;
							p = (*n).kindU.S6.Sons->data[i_491773];
							{
								NimStringDesc* LOC22;
								if (!((*p).Kind == ((NU8) 3))) goto LA20;
								LOC22 = 0;
								LOC22 = typetostring_263031((*(*p).kindU.S4.Sym).Typ, ((NU8) 0));
								errproto = resizeString(errproto, LOC22->Sup.len + 0);
appendString(errproto, LOC22);
								{
									NI LOC25;
									LOC25 = 0;
									LOC25 = len_226364(n);
									if (!!((i_491773 == (NI32)(LOC25 - 1)))) goto LA26;
									errproto = resizeString(errproto, 2);
appendString(errproto, ((NimStringDesc*) &TMP3234));
								}
								LA26: ;
							}
							LA20: ;
							res_491832 += 1;
						} LA17: ;
					}
				}
				{
					if (!eqStrings(errproto, proto)) goto LA30;
					prefer = ((NU8) 3);
					goto LA11;
				}
				LA30: ;
				i_491836 += 1;
			} LA13: ;
		}
	} LA11: ;
	result = msgkindtostring_197378(((NU16) 129));
	LOC32 = 0;
	LOC32 = describeargs_406200(c, n_491730, 1, prefer);
	result = resizeString(result, LOC32->Sup.len + 0);
appendString(result, LOC32);
	result = addChar(result, 41);
	candidates = copyString(((NimStringDesc*) &TMP2888));
	{
		tsym225846* err_491826;
		NI i_491842;
		NI l_491844;
		err_491826 = 0;
		i_491842 = 0;
		l_491844 = errors->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC36;
				if (!(i_491842 < l_491844)) goto LA35;
				err_491826 = errors->data[i_491842];
				LOC36 = 0;
				LOC36 = getprocheader_263519(err_491826, prefer);
				candidates = resizeString(candidates, LOC36->Sup.len + 0);
appendString(candidates, LOC36);
				candidates = resizeString(candidates, 1);
appendString(candidates, ((NimStringDesc*) &TMP3235));
				i_491842 += 1;
			} LA35: ;
		}
	}
	{
		NimStringDesc* LOC41;
		NimStringDesc* LOC42;
		if (!!(((candidates) && (candidates)->Sup.len == 0))) goto LA39;
		LOC41 = 0;
		LOC42 = 0;
		LOC42 = msgkindtostring_197378(((NU16) 130));
		LOC41 = rawNewString(LOC42->Sup.len + candidates->Sup.len + 2);
appendString(LOC41, ((NimStringDesc*) &TMP3235));
appendString(LOC41, LOC42);
appendString(LOC41, ((NimStringDesc*) &TMP3235));
appendString(LOC41, candidates);
		result = resizeString(result, LOC41->Sup.len + 0);
appendString(result, LOC41);
	}
	LA39: ;
	localerror_197955((*n_491730).Info, ((NU16) 4), result);
}

N_NIMCALL(NIM_BOOL, samemethoddispatcher_491237)(tsym225846* a, tsym225846* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	{
		NIM_BOOL LOC3;
		tnode225816* aa;
		tnode225816* bb;
		LOC3 = 0;
		LOC3 = ((*a).Kind == ((NU8) 13));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*b).Kind == ((NU8) 13));
		LA4: ;
		if (!LOC3) goto LA5;
		aa = lastson_226261((*a).Ast);
		bb = lastson_226261((*b).Ast);
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = ((*aa).Kind == ((NU8) 3));
			if (!(LOC9)) goto LA10;
			LOC9 = ((*bb).Kind == ((NU8) 3));
			LA10: ;
			if (!LOC9) goto LA11;
			{
				if (!((*aa).kindU.S4.Sym == (*bb).kindU.S4.Sym)) goto LA15;
				result = NIM_TRUE;
			}
			LA15: ;
		}
		goto LA7;
		LA11: ;
		{
		}
		LA7: ;
	}
	LA5: ;
	return result;
}

N_NIMCALL(void, resolveoverloads_492017)(tcontext290021* c, tnode225816* n, tnode225816* orig, NU32 filter, tcandidate405209* Result) {
	tnode225816* initialbinding;
	tcandidate405209 alt;
	tnode225816* f;
	tsymseq225818* errors;
	tnodeseq225810* usedsyms;
	NU8 overloadsstate;
	initialbinding = 0;
	memset((void*)(&alt), 0, sizeof(alt));
	f = (*n).kindU.S6.Sons->data[0];
	{
		if (!((*f).Kind == ((NU8) 42))) goto LA3;
		initialbinding = f;
		f = (*f).kindU.S6.Sons->data[0];
	}
	goto LA1;
	LA3: ;
	{
		initialbinding = NIM_NIL;
	}
	LA1: ;
	errors = 0;
	usedsyms = 0;
	gatherusedsyms_491875(c, (&usedsyms));
	{
		NIM_BOOL LOC8;
		tnode225816* hiddenarg;
		LOC8 = 0;
		LOC8 = HEX3DHEX3D_315667(usedsyms, NIM_NIL);
		if (!!(LOC8)) goto LA9;
		{
			if (!(1 < usedsyms->Sup.len)) goto LA13;
			hiddenarg = newnode_228207(((NU8) 56), (*n).Info, usedsyms, NIM_NIL);
		}
		goto LA11;
		LA13: ;
		{
			hiddenarg = usedsyms->data[0];
		}
		LA11: ;
		insert_492119((&(*n).kindU.S6.Sons), hiddenarg, 1);
		insert_492119((&(*orig).kindU.S6.Sons), hiddenarg, 1);
		pickbestcandidate_491331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
		{
			if (!!(((*Result).State == ((NU8) 1)))) goto LA18;
			delete_492248((&(*n).kindU.S6.Sons), 1);
			delete_492248((&(*orig).kindU.S6.Sons), 1);
		}
		goto LA16;
		LA18: ;
		{
			goto BeforeRet;
		}
		LA16: ;
	}
	LA9: ;
	pickbestcandidate_491331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
	overloadsstate = (*Result).State;
	{
		if (!!((overloadsstate == ((NU8) 1)))) goto LA23;
		{
			tnode225816* calleename;
			tnode225816* LOC37;
			slice84173 LOC38;
			TY537311 LOC39;
			slice84173 LOC40;
			TY537311 LOC41;
			if (!(((*n).Flags &(1<<((((NU8) 8))&15)))!=0)) goto LA27;
			{
				NIM_BOOL LOC31;
				NI LOC33;
				NimStringDesc* LOC36;
				LOC31 = 0;
				LOC31 = ((*f).Kind == ((NU8) 2));
				if (!(LOC31)) goto LA32;
				LOC33 = 0;
				LOC33 = sonslen_226249(n);
				LOC31 = (2 <= LOC33);
				LA32: ;
				if (!!(LOC31)) goto LA34;
				LOC36 = 0;
				LOC36 = HEX24_198126(TMP3228);
				internalerror_198006(LOC36);
			}
			LA34: ;
			LOC37 = 0;
			LOC37 = newstrnode_226118(((NU8) 20), (*(*f).kindU.S5.Ident).S);
			calleename = withinfo_227695(LOC37, (*n).Info);
			LOC38 = HEX2EHEX2E_92298(0, 1);
			memset((void*)LOC39, 0, sizeof(LOC39));
			LOC39[0] = NIM_NIL;
			LOC39[1] = HEX5BHEX5D_226698(n, 1);
			LOC39[2] = calleename;
			HEX5BHEX5DHEX3D_492447((&(*n).kindU.S6.Sons), LOC38, LOC39, 3);
			LOC40 = HEX2EHEX2E_92298(0, 1);
			memset((void*)LOC41, 0, sizeof(LOC41));
			LOC41[0] = NIM_NIL;
			LOC41[1] = HEX5BHEX5D_226698(orig, 1);
			LOC41[2] = calleename;
			HEX5BHEX5DHEX3D_492447((&(*orig).kindU.S6.Sons), LOC40, LOC41, 3);
			{
				tnode225816* op_492796;
				tident200021* LOC46;
				if (!(((*n).Flags &(1<<((((NU8) 10))&15)))!=0)) goto LA44;
				LOC46 = 0;
				LOC46 = getident_200472(((NimStringDesc*) &TMP3230));
				op_492796 = newidentnode_226125(LOC46, (*n).Info);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), op_492796);
				asgnRefNoCycle((void**) (&(*orig).kindU.S6.Sons->data[0]), op_492796);
				pickbestcandidate_491331(c, op_492796, n, orig, initialbinding, filter, Result, (&alt), (&errors));
			}
			LA44: ;
			{
				tnode225816* op_492843;
				tident200021* LOC51;
				if (!((5 &(1<<(((*Result).State)&7)))!=0)) goto LA49;
				LOC51 = 0;
				LOC51 = getident_200472(((NimStringDesc*) &TMP3231));
				op_492843 = newidentnode_226125(LOC51, (*n).Info);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), op_492843);
				asgnRefNoCycle((void**) (&(*orig).kindU.S6.Sons->data[0]), op_492843);
				pickbestcandidate_491331(c, op_492843, n, orig, initialbinding, filter, Result, (&alt), (&errors));
			}
			LA49: ;
		}
		goto LA25;
		LA27: ;
		{
			tnode225816* calleename;
			slice84173 LOC63;
			NimStringDesc* LOC64;
			tnode225816* LOC65;
			tnode225816* callop;
			tident200021* LOC66;
			slice84173 LOC67;
			TY537311 LOC68;
			slice84173 LOC69;
			TY537311 LOC70;
			if (!(((*n).Flags &(1<<((((NU8) 9))&15)))!=0)) goto LA53;
			{
				NIM_BOOL LOC57;
				NI LOC59;
				NimStringDesc* LOC62;
				LOC57 = 0;
				LOC57 = ((*f).Kind == ((NU8) 2));
				if (!(LOC57)) goto LA58;
				LOC59 = 0;
				LOC59 = sonslen_226249(n);
				LOC57 = (LOC59 == 3);
				LA58: ;
				if (!!(LOC57)) goto LA60;
				LOC62 = 0;
				LOC62 = HEX24_198126(TMP3232);
				internalerror_198006(LOC62);
			}
			LA60: ;
			LOC63 = HEX2EHEX2E_92298(0, -2);
			LOC64 = 0;
			LOC64 = HEX5BHEX5D_84166((*(*f).kindU.S5.Ident).S, LOC63);
			LOC65 = 0;
			LOC65 = newstrnode_226118(((NU8) 20), LOC64);
			calleename = withinfo_227695(LOC65, (*n).Info);
			LOC66 = 0;
			LOC66 = getident_200472(((NimStringDesc*) &TMP3233));
			callop = newidentnode_226125(LOC66, (*n).Info);
			LOC67 = HEX2EHEX2E_92298(0, 1);
			memset((void*)LOC68, 0, sizeof(LOC68));
			LOC68[0] = callop;
			LOC68[1] = HEX5BHEX5D_226698(n, 1);
			LOC68[2] = calleename;
			HEX5BHEX5DHEX3D_492447((&(*n).kindU.S6.Sons), LOC67, LOC68, 3);
			LOC69 = HEX2EHEX2E_92298(0, 1);
			memset((void*)LOC70, 0, sizeof(LOC70));
			LOC70[0] = callop;
			LOC70[1] = HEX5BHEX5D_226698(orig, 1);
			LOC70[2] = calleename;
			HEX5BHEX5DHEX3D_492447((&(*orig).kindU.S6.Sons), LOC69, LOC70, 3);
			pickbestcandidate_491331(c, callop, n, orig, initialbinding, filter, Result, (&alt), (&errors));
		}
		goto LA25;
		LA53: ;
		LA25: ;
		{
			NIM_BOOL LOC73;
			tident200021* LOC77;
			LOC73 = 0;
			LOC73 = (overloadsstate == ((NU8) 0));
			if (!(LOC73)) goto LA74;
			LOC73 = ((*Result).State == ((NU8) 0));
			LA74: ;
			if (!LOC73) goto LA75;
			LOC77 = 0;
			LOC77 = considerquotedident_295010(f);
			localerror_197955((*n).Info, ((NU16) 61), (*LOC77).S);
			goto BeforeRet;
		}
		goto LA71;
		LA75: ;
		{
			if (!!(((*Result).State == ((NU8) 1)))) goto LA79;
			{
				NimStringDesc* LOC85;
				if (!(((*n).Flags &(1<<((((NU8) 11))&15)))!=0)) goto LA83;
				LOC85 = 0;
				LOC85 = rendertree_250058(n, 4);
				localerror_197955((*n).Info, ((NU16) 88), LOC85);
			}
			goto LA81;
			LA83: ;
			{
				{
					if (!!(((768 & (*n).Flags) == 0))) goto LA89;
					delete_492248((&(*n).kindU.S6.Sons), 2);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), f);
				}
				LA89: ;
				errors = (tsymseq225818*) newSeq((&NTI225818), 0);
				pickbestcandidate_491331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
				notfounderror_491727(c, n, errors);
			}
			LA81: ;
			goto BeforeRet;
		}
		goto LA71;
		LA79: ;
		LA71: ;
	}
	LA23: ;
	{
		NIM_BOOL LOC93;
		NIM_BOOL LOC94;
		NI LOC96;
		NIM_BOOL LOC98;
		LOC93 = 0;
		LOC94 = 0;
		LOC94 = (alt.State == ((NU8) 1));
		if (!(LOC94)) goto LA95;
		LOC96 = 0;
		LOC96 = cmpcandidates_406039(Result, (&alt));
		LOC94 = (LOC96 == 0);
		LA95: ;
		LOC93 = LOC94;
		if (!(LOC93)) goto LA97;
		LOC98 = 0;
		LOC98 = samemethoddispatcher_491237((*Result).Calleesym, alt.Calleesym);
		LOC93 = !(LOC98);
		LA97: ;
		if (!LOC93) goto LA99;
		{
			NimStringDesc* LOC105;
			if (!!(((*Result).State == ((NU8) 1)))) goto LA103;
			LOC105 = 0;
			LOC105 = HEX24_198126(TMP3236);
			internalerror_198006(LOC105);
		}
		LA103: ;
		{
			if (!(0 < (*c).Incompilescontext)) goto LA108;
			globalerror_197934((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3237));
		}
		goto LA106;
		LA108: ;
		{
			NimStringDesc* args;
			NimStringDesc* LOC122;
			TY208063 LOC123;
			NimStringDesc* LOC124;
			if (!(gerrorcounter_196306 == 0)) goto LA111;
			args = copyString(((NimStringDesc*) &TMP3238));
			{
				NI i_493247;
				NI HEX3Atmp_493272;
				NI LOC114;
				NI res_493275;
				i_493247 = 0;
				HEX3Atmp_493272 = 0;
				LOC114 = 0;
				LOC114 = sonslen_226249(n);
				HEX3Atmp_493272 = (NI32)(LOC114 - 1);
				res_493275 = 1;
				{
					while (1) {
						NimStringDesc* LOC121;
						if (!(res_493275 <= HEX3Atmp_493272)) goto LA116;
						i_493247 = res_493275;
						{
							if (!(1 < i_493247)) goto LA119;
							args = resizeString(args, 2);
appendString(args, ((NimStringDesc*) &TMP3234));
						}
						LA119: ;
						LOC121 = 0;
						LOC121 = typetostring_263031((*(*n).kindU.S6.Sons->data[i_493247]).Typ, ((NU8) 0));
						args = resizeString(args, LOC121->Sup.len + 0);
appendString(args, LOC121);
						res_493275 += 1;
					} LA116: ;
				}
			}
			args = resizeString(args, 1);
appendString(args, ((NimStringDesc*) &TMP2910));
			LOC122 = 0;
			LOC122 = msgkindtostring_197378(((NU16) 132));
			memset((void*)LOC123, 0, sizeof(LOC123));
			LOC123[0] = getprocheader_263519((*Result).Calleesym, ((NU8) 0));
			LOC123[1] = getprocheader_263519(alt.Calleesym, ((NU8) 0));
			LOC123[2] = copyString(args);
			LOC124 = 0;
			LOC124 = nsuFormatOpenArray(LOC122, LOC123, 3);
			localerror_197955((*n).Info, ((NU16) 4), LOC124);
		}
		goto LA106;
		LA111: ;
		LA106: ;
	}
	LA99: ;
	BeforeRet: ;
}

N_NIMCALL(void, instgenericconverterssons_493428)(tcontext290021* c, tnode225816* n, tcandidate405209* x) {
	{
		if (!(*x).Genericconverter) goto LA3;
		{
			NI i_493622;
			NI HEX3Atmp_493638;
			NI LOC6;
			NI res_493641;
			i_493622 = 0;
			HEX3Atmp_493638 = 0;
			LOC6 = 0;
			LOC6 = len_226364(n);
			HEX3Atmp_493638 = (LOC6 - 1);
			res_493641 = 1;
			{
				while (1) {
					if (!(res_493641 <= HEX3Atmp_493638)) goto LA8;
					i_493622 = res_493641;
					instgenericconvertersarg_493289(c, (*n).kindU.S6.Sons->data[i_493622], x);
					res_493641 += 1;
				} LA8: ;
			}
		}
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, semresolvedcall_493735)(tcontext290021* c, tnode225816* n, tcandidate405209* x) {
	tnode225816* result;
	tsym225846* finalcallee;
	result = 0;
	finalcallee = (*x).Calleesym;
	markused_405251((*(*n).kindU.S6.Sons->data[0]).Info, finalcallee);
	{
		if (!((*finalcallee).Ast == NIM_NIL)) goto LA3;
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3239));
	}
	LA3: ;
	{
		if (!!(((*(*(*finalcallee).Ast).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA7;
		{
			if (!!((*x).Proxymatch)) goto LA11;
			finalcallee = generateinstance_490802(c, (*x).Calleesym, (*x).Bindings, (*n).Info);
		}
		goto LA9;
		LA11: ;
		{
			result = (*x).Call;
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227755(finalcallee, (*(*result).kindU.S6.Sons->data[0]).Info));
			asgnRefNoCycle((void**) (&(*result).Typ), (*(*finalcallee).Typ).Sons->data[0]);
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = containsgenerictype_272929((*result).Typ);
				if (!LOC16) goto LA17;
				asgnRefNoCycle((void**) (&(*result).Typ), errortype_291319(c));
			}
			LA17: ;
			goto BeforeRet;
		}
		LA9: ;
	}
	LA7: ;
	result = (*x).Call;
	instgenericconverterssons_493428(c, result, x);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227755(finalcallee, (*(*result).kindU.S6.Sons->data[0]).Info));
	asgnRefNoCycle((void**) (&(*result).Typ), (*(*finalcallee).Typ).Sons->data[0]);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semoverloadedcall_494100)(tcontext290021* c, tnode225816* n, tnode225816* norig, NU32 filter) {
	tnode225816* result;
	tcandidate405209 r;
	result = 0;
	memset((void*)(&r), 0, sizeof(r));
	chckNil((void*)(&r));
	memset((void*)(&r), 0, sizeof(r));
	resolveoverloads_492017(c, n, norig, filter, (&r));
	{
		if (!(r.State == ((NU8) 1))) goto LA3;
		result = semresolvedcall_493735(c, n, (&r));
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, semoverloadedcallanalyseeffects_534248)(tcontext290021* c, tnode225816* n, tnode225816* norig, NU16 flags) {
	tnode225816* result;
	result = 0;
	{
		if (!!(((flags & 6) == 0))) goto LA3;
		result = semoverloadedcall_494100(c, n, norig, 520192);
	}
	goto LA1;
	LA3: ;
	{
		result = semoverloadedcall_494100(c, n, norig, 471040);
	}
	LA1: ;
	{
		tsym225846* callee;
		if (!!((result == NIM_NIL))) goto LA8;
		{
			if (!!(((*(*result).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA12;
			internalerror_198006(((NimStringDesc*) &TMP3240));
			goto BeforeRet;
		}
		LA12: ;
		callee = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
		switch ((*callee).Kind) {
		case ((NU8) 17):
		case ((NU8) 18):
		{
		}
		break;
		default:
		{
			{
				NIM_BOOL LOC18;
				LOC18 = 0;
				LOC18 = ((49152 &(1<<(((*callee).Kind)&31)))!=0);
				if (!(LOC18)) goto LA19;
				LOC18 = ((*callee).Sup.Id == (*(*(*c).P).Owner).Sup.Id);
				LA19: ;
				if (!LOC18) goto LA20;
				localerror_197955((*n).Info, ((NU16) 25), (*(*callee).Name).S);
			}
			LA20: ;
			{
				if (!!((((*callee).Flags &(1<<((((NU8) 10))&31)))!=0))) goto LA24;
				{
					if (!!(((2080 & (*callee).Flags) == 0))) goto LA28;
					(*(*(*c).P).Owner).Flags |= ((NI32)1)<<((((NU8) 11))%(sizeof(NI32)*8));
				}
				LA28: ;
			}
			LA24: ;
		}
		break;
		}
	}
	LA8: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, propertywriteaccess_537285)(tcontext290021* c, tnode225816* n, tnode225816* norig, tnode225816* a) {
	tnode225816* result;
	tident200021* id;
	tnode225816* LOC1;
	tnode225816* setterid;
	NimStringDesc* LOC2;
	tident200021* LOC3;
	tnode225816* aorig;
	tnodeseq225810* LOC4;
	TY537311 LOC5;
	tnode225816* LOC6;
	tnode225816* orig;
	tnodeseq225810* LOC7;
	TY537311 LOC8;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(a, 1);
	id = considerquotedident_295010(LOC1);
	LOC2 = 0;
	LOC2 = rawNewString((*id).S->Sup.len + 1);
appendString(LOC2, (*id).S);
appendChar(LOC2, 61);
	LOC3 = 0;
	LOC3 = getident_200472(LOC2);
	setterid = newidentnode_226125(LOC3, (*n).Info);
	aorig = HEX5BHEX5D_226698(norig, 0);
	LOC4 = 0;
	LOC4 = (tnodeseq225810*) newSeq((&NTI225810), 3);
	memset((void*)LOC5, 0, sizeof(LOC5));
	LOC5[0] = setterid;
	LOC5[1] = HEX5BHEX5D_226698(a, 0);
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_226698(n, 1);
	LOC5[2] = semexpr_487201(c, LOC6, 0);
	asgnRefNoCycle((void**) (&LOC4->data[0]), LOC5[0]);
	asgnRefNoCycle((void**) (&LOC4->data[1]), LOC5[1]);
	asgnRefNoCycle((void**) (&LOC4->data[2]), LOC5[2]);
	result = newnode_228207(((NU8) 27), (*n).Info, LOC4, NIM_NIL);
	(*result).Flags |= ((NI16)1)<<((((NU8) 9))%(sizeof(NI16)*8));
	LOC7 = 0;
	LOC7 = (tnodeseq225810*) newSeq((&NTI225810), 3);
	memset((void*)LOC8, 0, sizeof(LOC8));
	LOC8[0] = setterid;
	LOC8[1] = HEX5BHEX5D_226698(aorig, 0);
	LOC8[2] = HEX5BHEX5D_226698(norig, 1);
	asgnRefNoCycle((void**) (&LOC7->data[0]), LOC8[0]);
	asgnRefNoCycle((void**) (&LOC7->data[1]), LOC8[1]);
	asgnRefNoCycle((void**) (&LOC7->data[2]), LOC8[2]);
	orig = newnode_228207(((NU8) 27), (*n).Info, LOC7, NIM_NIL);
	result = semoverloadedcallanalyseeffects_534248(c, result, orig, 0);
	{
		if (!!((result == NIM_NIL))) goto LA11;
		result = aftercallactions_535062(c, result, norig, 0);
	}
	LA11: ;
	return result;
}

static N_INLINE(NIM_BOOL, issymchoice_530121)(tnode225816* n) {
	NIM_BOOL result;
	result = 0;
	result = ((*n).Kind == ((NU8) 56) || (*n).Kind == ((NU8) 57));
	return result;
}

N_NIMCALL(tnode225816*, dottransformation_536736)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode225816* LOC6;
		tnode225816* LOC7;
		LOC3 = 0;
		LOC3 = issymchoice_530121((*n).kindU.S6.Sons->data[1]);
		if (!LOC3) goto LA4;
		result = newnodei_226138(((NU8) 25), (*n).Info);
		addson_226287(result, (*n).kindU.S6.Sons->data[1]);
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_226698(n, 0);
		LOC7 = 0;
		LOC7 = copytree_226329(LOC6);
		addson_226287(result, LOC7);
	}
	goto LA1;
	LA4: ;
	{
		tident200021* i;
		tnode225816* LOC9;
		tnode225816* LOC10;
		tnode225816* LOC11;
		tnode225816* LOC12;
		i = considerquotedident_295010((*n).kindU.S6.Sons->data[1]);
		result = newnodei_226138(((NU8) 25), (*n).Info);
		(*result).Flags |= ((NI16)1)<<((((NU8) 8))%(sizeof(NI16)*8));
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_226698(n, 1);
		LOC10 = 0;
		LOC10 = newidentnode_226125(i, (*LOC9).Info);
		addson_226287(result, LOC10);
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_226698(n, 0);
		LOC12 = 0;
		LOC12 = copytree_226329(LOC11);
		addson_226287(result, LOC12);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semderef_536863)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* t;
	result = 0;
	checksonslen_291416(n, 1);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
	result = n;
	t = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, 8390656);
	switch ((*t).Kind) {
	case ((NU8) 22):
	case ((NU8) 21):
	{
		asgnRefNoCycle((void**) (&(*n).Typ), lastson_226267(t));
	}
	break;
	default:
	{
		result = NIM_NIL;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, semsubscript_536915)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	ttype225852* arr;
	result = 0;
	{
		NI LOC3;
		tnode225816* x;
		tnode225816* LOC10;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 1)) goto LA4;
		x = semderef_536863(c, n);
		{
			if (!(x == NIM_NIL)) goto LA8;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA8: ;
		result = newnodeit_226145(((NU8) 47), (*x).Info, (*x).Typ);
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_226698(x, 0);
		add_226498(result, LOC10);
		goto BeforeRet;
	}
	LA4: ;
	checkminsonslen_291426(n, 2);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
	arr = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, 14682112);
	switch ((*arr).Kind) {
	case ((NU8) 16):
	case ((NU8) 27):
	case ((NU8) 48):
	case ((NU8) 4):
	case ((NU8) 24):
	case ((NU8) 28):
	case ((NU8) 29):
	{
		ttype225852* indextype;
		tnode225816* arg;
		{
			NI LOC14;
			LOC14 = 0;
			LOC14 = len_226364(n);
			if (!!((LOC14 == 2))) goto LA15;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA15: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_535594((*n).kindU.S6.Sons->data[0]));
		{
			NI i_537023;
			NI HEX3Atmp_537242;
			NI LOC18;
			NI res_537245;
			i_537023 = 0;
			HEX3Atmp_537242 = 0;
			LOC18 = 0;
			LOC18 = sonslen_226249(n);
			HEX3Atmp_537242 = (NI32)(LOC18 - 1);
			res_537245 = 1;
			{
				while (1) {
					if (!(res_537245 <= HEX3Atmp_537242)) goto LA20;
					i_537023 = res_537245;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_537023]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[i_537023], (flags & 20)));
					res_537245 += 1;
				} LA20: ;
			}
		}
		{
			if (!((*arr).Kind == ((NU8) 16))) goto LA23;
			indextype = (*arr).Sons->data[0];
		}
		goto LA21;
		LA23: ;
		{
			indextype = getsystype_282030(((NU8) 31));
		}
		LA21: ;
		arg = indextypesmatch_487348(c, indextype, (*(*n).kindU.S6.Sons->data[1]).Typ, (*n).kindU.S6.Sons->data[1]);
		{
			if (!!((arg == NIM_NIL))) goto LA28;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), arg);
			result = n;
			asgnRefNoCycle((void**) (&(*result).Typ), elemtype_263656(arr));
		}
		LA28: ;
	}
	break;
	case ((NU8) 8):
	{
		ttype225852* LOC31;
		result = n;
		LOC31 = 0;
		LOC31 = semtypenode_487269(c, n, NIM_NIL);
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_290763(c, LOC31));
	}
	break;
	case ((NU8) 18):
	{
		checksonslen_291416(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_535594((*n).kindU.S6.Sons->data[0]));
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semconstexpr_488503(c, (*n).kindU.S6.Sons->data[1]));
		{
			ttype225852* LOC35;
			NI64 idx;
			LOC35 = 0;
			LOC35 = skiptypes_230245((*(*n).kindU.S6.Sons->data[1]).Typ, 1083392);
			if (!((*LOC35).Kind >= ((NU8) 31) && (*LOC35).Kind <= ((NU8) 35))) goto LA36;
			idx = getordvalue_263187((*n).kindU.S6.Sons->data[1]);
			{
				NIM_BOOL LOC40;
				NI LOC42;
				LOC40 = 0;
				LOC40 = (IL64(0) <= idx);
				if (!(LOC40)) goto LA41;
				LOC42 = 0;
				LOC42 = sonslen_226255(arr);
				LOC40 = (idx < ((NI64) (LOC42)));
				LA41: ;
				if (!LOC40) goto LA43;
				asgnRefNoCycle((void**) (&(*n).Typ), (*arr).Sons->data[idx]);
			}
			goto LA38;
			LA43: ;
			{
				localerror_197955((*n).Info, ((NU16) 185), ((NimStringDesc*) &TMP2888));
			}
			LA38: ;
		}
		goto LA33;
		LA36: ;
		{
			localerror_197955((*n).Info, ((NU16) 83), ((NimStringDesc*) &TMP2888));
		}
		LA33: ;
		result = n;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, buildoverloadedsubscripts_536829)(tnode225816* n, tident200021* ident) {
	tnode225816* result;
	tnode225816* LOC1;
	result = 0;
	result = newnodei_226138(((NU8) 27), (*n).Info);
	LOC1 = 0;
	LOC1 = newidentnode_226125(ident, (*n).Info);
	add_226498(result, LOC1);
	{
		NI i_536844;
		NI HEX3Atmp_536846;
		NI LOC3;
		NI res_536849;
		i_536844 = 0;
		HEX3Atmp_536846 = 0;
		LOC3 = 0;
		LOC3 = len_226364(n);
		HEX3Atmp_536846 = (NI32)(LOC3 - 1);
		res_536849 = 0;
		{
			while (1) {
				tnode225816* LOC6;
				if (!(res_536849 <= HEX3Atmp_536846)) goto LA5;
				i_536844 = res_536849;
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_226698(n, i_536844);
				add_226498(result, LOC6);
				res_536849 += 1;
			} LA5: ;
		}
	}
	return result;
}

N_NIMCALL(void, typemismatch_487357)(tnode225816* n, ttype225852* formal, ttype225852* actual) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		NimStringDesc* LOC8;
		NimStringDesc* LOC9;
		NimStringDesc* LOC10;
		TY197301 LOC11;
		NimStringDesc* LOC12;
		LOC3 = 0;
		LOC3 = !(((*formal).Kind == ((NU8) 50)));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*actual).Kind == ((NU8) 50)));
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC8 = 0;
		LOC8 = msgkindtostring_197378(((NU16) 129));
		LOC9 = 0;
		LOC9 = typetostring_263031(actual, ((NU8) 0));
		LOC10 = 0;
		LOC10 = msgkindtostring_197378(((NU16) 131));
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = typetostring_263031(formal, ((NU8) 0));
		LOC12 = 0;
		LOC12 = nsuFormatOpenArray(LOC10, LOC11, 1);
		LOC7 = rawNewString(LOC8->Sup.len + LOC9->Sup.len + LOC12->Sup.len + 2);
appendString(LOC7, LOC8);
appendString(LOC7, LOC9);
appendString(LOC7, ((NimStringDesc*) &TMP3244));
appendString(LOC7, LOC12);
		localerror_197955((*n).Info, ((NU16) 4), LOC7);
	}
	LA5: ;
}

N_NIMCALL(tnode225816*, takeimplicitaddr_537372)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NU8 valid;
	ttype225852* LOC20;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 64):
	case ((NU8) 63):
	{
		result = n;
		goto BeforeRet;
	}
	break;
	case ((NU8) 65):
	case ((NU8) 47):
	{
		result = (*n).kindU.S6.Sons->data[0];
		goto BeforeRet;
	}
	break;
	case ((NU8) 42):
	{
		{
			NI LOC6;
			LOC6 = 0;
			LOC6 = len_226364(n);
			if (!(LOC6 == 1)) goto LA7;
			result = (*n).kindU.S6.Sons->data[0];
			goto BeforeRet;
		}
		LA7: ;
	}
	break;
	default:
	{
	}
	break;
	}
	valid = isassignable_532184(c, n);
	{
		if (!!((valid == ((NU8) 1)))) goto LA12;
		{
			NimStringDesc* LOC18;
			if (!(valid == ((NU8) 2))) goto LA16;
			LOC18 = 0;
			LOC18 = rendertree_250058(n, 4);
			localerror_197955((*n).Info, ((NU16) 126), LOC18);
		}
		goto LA14;
		LA16: ;
		{
			localerror_197955((*n).Info, ((NU16) 125), ((NimStringDesc*) &TMP2888));
		}
		LA14: ;
	}
	LA12: ;
	LOC20 = 0;
	LOC20 = makeptrtype_290200(c, (*n).Typ);
	result = newnodeit_226145(((NU8) 64), (*n).Info, LOC20);
	add_226498(result, n);
	BeforeRet: ;
	return result;
}

static N_INLINE(void, asgntoresultvar_537428)(tcontext290021* c, tnode225816* n, tnode225816* le, tnode225816* ri) {
	{
		tnode225816* x;
		if (!((*le).Kind == ((NU8) 65))) goto LA3;
		x = (*le).kindU.S6.Sons->data[0];
		{
			NIM_BOOL LOC7;
			NIM_BOOL LOC8;
			LOC7 = 0;
			LOC8 = 0;
			LOC8 = ((*(*x).Typ).Kind == ((NU8) 23));
			if (!(LOC8)) goto LA9;
			LOC8 = ((*x).Kind == ((NU8) 3));
			LA9: ;
			LOC7 = LOC8;
			if (!(LOC7)) goto LA10;
			LOC7 = ((*(*x).kindU.S4.Sym).Kind == ((NU8) 11));
			LA10: ;
			if (!LOC7) goto LA11;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), x);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), takeimplicitaddr_537372(c, ri));
		}
		LA11: ;
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, semasgn_537534)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* a;
	ttype225852* le;
	result = 0;
	checksonslen_291416(n, 2);
	a = (*n).kindU.S6.Sons->data[0];
	switch ((*a).Kind) {
	case ((NU8) 45):
	{
		tnode225816* norig;
		norig = copytree_226329(n);
		a = builtinfieldaccess_535726(c, a, 1);
		{
			tnode225816* LOC6;
			tnode225816* LOC11;
			if (!(a == NIM_NIL)) goto LA4;
			LOC6 = 0;
			LOC6 = HEX5BHEX5D_226698(n, 0);
			a = propertywriteaccess_537285(c, n, norig, LOC6);
			{
				if (!!((a == NIM_NIL))) goto LA9;
				result = a;
				goto BeforeRet;
			}
			LA9: ;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_226698(n, 0);
			a = dottransformation_536736(c, LOC11);
			{
				if (!((*a).Kind == ((NU8) 25))) goto LA14;
				(*a).Kind = ((NU8) 27);
				a = semexprwithtype_487211(c, a, 1);
			}
			LA14: ;
		}
		LA4: ;
	}
	break;
	case ((NU8) 42):
	{
		a = semsubscript_536915(c, a, 1);
		{
			tident200021* LOC21;
			tnode225816* LOC22;
			if (!(a == NIM_NIL)) goto LA19;
			LOC21 = 0;
			LOC21 = getident_200472(((NimStringDesc*) &TMP3241));
			result = buildoverloadedsubscripts_536829((*n).kindU.S6.Sons->data[0], LOC21);
			LOC22 = 0;
			LOC22 = HEX5BHEX5D_226698(n, 1);
			add_226498(result, LOC22);
			result = semexprnotype_487221(c, result);
			goto BeforeRet;
		}
		LA19: ;
	}
	break;
	case ((NU8) 40):
	{
		tident200021* LOC24;
		tnode225816* LOC25;
		LOC24 = 0;
		LOC24 = getident_200472(((NimStringDesc*) &TMP3242));
		result = buildoverloadedsubscripts_536829((*n).kindU.S6.Sons->data[0], LOC24);
		LOC25 = 0;
		LOC25 = HEX5BHEX5D_226698(n, 1);
		add_226498(result, LOC25);
		result = semexprnotype_487221(c, result);
		goto BeforeRet;
	}
	break;
	default:
	{
		a = semexprwithtype_487211(c, a, 1);
	}
	break;
	}
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), a);
	le = (*a).Typ;
	{
		NIM_BOOL LOC29;
		ttype225852* LOC30;
		NU8 LOC32;
		NimStringDesc* LOC35;
		LOC29 = 0;
		LOC30 = 0;
		LOC30 = skiptypes_230245(le, 2048);
		LOC29 = !(((*LOC30).Kind == ((NU8) 23)));
		if (!(LOC29)) goto LA31;
		LOC32 = 0;
		LOC32 = isassignable_532184(c, a);
		LOC29 = (LOC32 == ((NU8) 0));
		LA31: ;
		if (!LOC29) goto LA33;
		LOC35 = 0;
		LOC35 = rendertree_250058(a, 4);
		localerror_197955((*a).Info, ((NU16) 176), LOC35);
	}
	goto LA27;
	LA33: ;
	{
		tnode225816* lhs;
		NIM_BOOL lhsisresult;
		NIM_BOOL LOC37;
		tnode225816* rhs;
		NU16 LOC39;
		lhs = (*n).kindU.S6.Sons->data[0];
		LOC37 = 0;
		LOC37 = ((*lhs).Kind == ((NU8) 3));
		if (!(LOC37)) goto LA38;
		LOC37 = ((*(*lhs).kindU.S4.Sym).Kind == ((NU8) 11));
		LA38: ;
		lhsisresult = LOC37;
		{
			if (!lhsisresult) goto LA42;
			LOC39 = 32;
		}
		goto LA40;
		LA42: ;
		{
			LOC39 = 0;
		}
		LA40: ;
		rhs = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], LOC39);
		{
			if (!lhsisresult) goto LA47;
			asgnRefNoCycle((void**) (&(*n).Typ), enforcevoidcontext_515110);
			{
				NIM_BOOL LOC51;
				NIM_BOOL LOC53;
				LOC51 = 0;
				LOC51 = !(((*(*(*c).P).Owner).Kind == ((NU8) 17)));
				if (!(LOC51)) goto LA52;
				LOC53 = 0;
				LOC53 = ismetatype_226752((*(*lhs).kindU.S4.Sym).Typ);
				if (!(LOC53)) goto LA54;
				LOC53 = !(((*(*(*lhs).kindU.S4.Sym).Typ).Kind == ((NU8) 8)));
				LA54: ;
				LOC51 = LOC53;
				LA52: ;
				if (!LOC51) goto LA55;
				{
					NU8 LOC59;
					LOC59 = 0;
					LOC59 = cmptypes_411293(c, (*lhs).Typ, (*rhs).Typ);
					if (!(LOC59 == ((NU8) 7))) goto LA60;
					{
						NimStringDesc* LOC66;
						if (!!(!(((*(*c).P).Resultsym == NIM_NIL)))) goto LA64;
						LOC66 = 0;
						LOC66 = HEX24_198126(TMP3243);
						internalerror_198006(LOC66);
					}
					LA64: ;
					asgnRefNoCycle((void**) (&(*lhs).Typ), (*rhs).Typ);
					asgnRefNoCycle((void**) (&(*(*(*c).P).Resultsym).Typ), (*rhs).Typ);
					asgnRefNoCycle((void**) (&(*(*(*(*c).P).Owner).Typ).Sons->data[0]), (*rhs).Typ);
				}
				goto LA57;
				LA60: ;
				{
					typemismatch_487357(n, (*lhs).Typ, (*rhs).Typ);
				}
				LA57: ;
			}
			LA55: ;
		}
		LA47: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), fitnode_487245(c, le, rhs));
		fixabstracttype_531831(c, n);
		asgntoresultvar_537428(c, n, (*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[1]);
	}
	LA27: ;
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semprocbody_487238)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	result = semexpr_487201(c, n, 0);
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC6;
		LOC4 = 0;
		LOC4 = !(((*(*c).P).Resultsym == NIM_NIL));
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = isemptytype_232990((*result).Typ);
		LOC4 = !(LOC6);
		LA5: ;
		if (!LOC4) goto LA7;
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = ((*result).Kind == ((NU8) 3));
			if (!(LOC11)) goto LA12;
			LOC11 = ((*result).kindU.S4.Sym == (*(*c).P).Resultsym);
			LA12: ;
			if (!LOC11) goto LA13;
		}
		goto LA9;
		LA13: ;
		{
			if (!((*result).Kind == ((NU8) 23))) goto LA16;
			asgnRefNoCycle((void**) (&(*result).Typ), NIM_NIL);
		}
		goto LA9;
		LA16: ;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = ((*result).Kind == ((NU8) 126));
			if (!(LOC19)) goto LA20;
			LOC19 = ((*(*result).Typ).Kind == ((NU8) 5));
			LA20: ;
			if (!LOC19) goto LA21;
			fixniltype_517549(result);
		}
		goto LA9;
		LA21: ;
		{
			tnode225816* a;
			a = newnodei_228007(((NU8) 73), (*n).Info, 2);
			asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newsymnode_226132((*(*c).P).Resultsym));
			asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), result);
			result = semasgn_537534(c, a);
		}
		LA9: ;
	}
	goto LA2;
	LA7: ;
	{
		discardcheck_517617(c, result);
	}
	LA2: ;
	{
		NIM_BOOL LOC27;
		NIM_BOOL LOC28;
		LOC27 = 0;
		LOC28 = 0;
		LOC28 = !(((393216 &(1<<(((*(*(*c).P).Owner).Kind)&31)))!=0));
		if (!(LOC28)) goto LA29;
		LOC28 = !(((*(*c).P).Resultsym == NIM_NIL));
		LA29: ;
		LOC27 = LOC28;
		if (!(LOC27)) goto LA30;
		LOC27 = ismetatype_226752((*(*(*c).P).Resultsym).Typ);
		LA30: ;
		if (!LOC27) goto LA31;
		localerror_197955((*(*(*c).P).Resultsym).Info, ((NU16) 226), ((NimStringDesc*) &TMP2888));
	}
	LA31: ;
	closescope_295211(c);
	return result;
}

N_NIMCALL(void, instantiatebody_490449)(tcontext290021* c, tnode225816* n, tsym225846* result) {
	{
		tnode225816* b;
		tidtable225864 symmap;
		if (!!(((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)))) goto LA3;
		(*c).Ingenericinst += 1;
		b = (*n).kindU.S6.Sons->data[6];
		memset((void*)(&symmap), 0, sizeof(symmap));
		initidtable_226167((&symmap));
		freshgensyms_490201(b, result, (&symmap));
		b = semprocbody_487238(c, b);
		b = hlobody_489479(c, b);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_441373((*c).Module, b, result));
		(*result).Flags &= ~(((NI32)1) << ((((NU8) 4)) % (sizeof(NI32)*8)));
		(*c).Ingenericinst -= 1;
	}
	LA3: ;
}

static N_INLINE(tsym225846*, pop_437736)(tsymseq225818** s_437744) {
	tsym225846* result;
	NI l;
	result = 0;
	l = (NI32)((*s_437744)->Sup.len - 1);
	result = (*s_437744)->data[l];
	(*s_437744) = (tsymseq225818*) setLengthSeq(&((*s_437744))->Sup, sizeof(tsym225846*), l);
	return result;
}

N_NIMCALL(NIM_BOOL, hasobjparam_526844)(tsym225846* s) {
	NIM_BOOL result;
	ttype225852* t;
	result = 0;
	t = (*s).Typ;
	{
		NI col_526861;
		NI HEX3Atmp_526872;
		NI LOC2;
		NI res_526875;
		col_526861 = 0;
		HEX3Atmp_526872 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226255(t);
		HEX3Atmp_526872 = (NI32)(LOC2 - 1);
		res_526875 = 1;
		{
			while (1) {
				if (!(res_526875 <= HEX3Atmp_526872)) goto LA4;
				col_526861 = res_526875;
				{
					ttype225852* LOC7;
					LOC7 = 0;
					LOC7 = skiptypes_230245((*t).Sons->data[col_526861], IL64(211106247215360));
					if (!((*LOC7).Kind == ((NU8) 17))) goto LA8;
					result = NIM_TRUE;
					goto BeforeRet;
				}
				LA8: ;
				res_526875 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, finishmethod_487341)(tcontext290021* c, tsym225846* s) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = hasobjparam_526844(s);
		if (!LOC3) goto LA4;
		methoddef_422824(s, NIM_FALSE);
	}
	LA4: ;
}

N_NIMCALL(tsym225846*, generateinstance_490802)(tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info) {
	tsym225846* result;
	tnode225816* n;
	tsym225846* LOC9;
	tscope225840* LOC10;
	tinstantiation225836* entry;
	tsym225846* oldprc;
	tsym225846* LOC35;
	result = 0;
	{
		if (!((393216 &(1<<(((*fn).Kind)&31)))!=0)) goto LA3;
		result = fn;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(1000 < (*c).Instcounter)) goto LA7;
		internalerror_197987((*(*fn).Ast).Info, ((NimStringDesc*) &TMP2917));
	}
	LA7: ;
	(*c).Instcounter += 1;
	n = copytree_226329((*fn).Ast);
	LOC9 = 0;
	LOC9 = getmodule_235243(fn);
	(*c).Friendmodules = (tsymseq225818*) incrSeq(&((*c).Friendmodules)->Sup, sizeof(tsym225846*));
	asgnRefNoCycle((void**) (&(*c).Friendmodules->data[(*c).Friendmodules->Sup.len-1]), LOC9);
	result = copysym_226203(fn, NIM_FALSE);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).Owner), fn);
	asgnRefNoCycle((void**) (&(*result).Ast), n);
	pushowner_290261(result);
	LOC10 = 0;
	LOC10 = openscope_295191(c);
	{
		NimStringDesc* LOC15;
		if (!!(!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1))))) goto LA13;
		LOC15 = 0;
		LOC15 = HEX24_198126(TMP2918);
		internalerror_198006(LOC15);
	}
	LA13: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_226132(result));
	pushinfocontext_196930(info);
	entry = new_490941();
	asgnRefNoCycle((void**) (&(*entry).Sym), result);
	instantiategenericparamlist_489543(c, (*n).kindU.S6.Sons->data[2], pt, entry);
	pushproccon_290381(c, result);
	instantiateproctype_490682(c, pt, result, info);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), emptynode_226738);
	oldprc = genericcacheget_489785(fn, (*entry));
	{
		tinstantiationpair290013 LOC24;
		if (!(oldprc == NIM_NIL)) goto LA18;
		{
			if (!((*c).Incompilescontext == 0)) goto LA22;
			safeadd_491032((&(*fn).kindU.S2.Procinstcache), entry);
		}
		LA22: ;
		memset((void*)(&LOC24), 0, sizeof(LOC24));
		makeinstpair_290148(fn, entry, (&LOC24));
		(*c).Generics = (TY290133*) incrSeq(&((*c).Generics)->Sup, sizeof(tinstantiationpair290013));
		asgnRefNoCycle((void**) (&(*c).Generics->data[(*c).Generics->Sup.len-1].Genericsym), LOC24.Genericsym);
		asgnRefNoCycle((void**) (&(*c).Generics->data[(*c).Generics->Sup.len-1].Inst), LOC24.Inst);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA27;
			pragma_310079(c, result, (*n).kindU.S6.Sons->data[4], TMP2993);
		}
		LA27: ;
		{
			tnode225816* LOC33;
			if (!(*n).kindU.S6.Sons->data[6] == 0) goto LA31;
			LOC33 = 0;
			LOC33 = getbody_279270(fn);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), copytree_226329(LOC33));
		}
		LA31: ;
		instantiatebody_490449(c, n, result);
		sideeffectscheck_490615(c, result);
		paramstypecheck_488015(c, (*result).Typ);
	}
	goto LA16;
	LA18: ;
	{
		result = oldprc;
	}
	LA16: ;
	popproccon_290426(c);
	popinfocontext_196957();
	closescope_295211(c);
	popowner_290267();
	LOC35 = 0;
	LOC35 = pop_437736((&(*c).Friendmodules));
	(*c).Instcounter -= 1;
	{
		if (!((*result).Kind == ((NU8) 13))) goto LA38;
		finishmethod_487341(c, result);
	}
	LA38: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, instgenericconvertersarg_493289)(tcontext290021* c, tnode225816* a, tcandidate405209* x) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		tsym225846* finalcallee;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = ((*a).Kind == ((NU8) 32));
		if (!(LOC4)) goto LA5;
		LOC4 = ((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA6;
		LOC3 = isgenericroutine_232649((*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym);
		LA6: ;
		if (!LOC3) goto LA7;
		finalcallee = generateinstance_490802(c, (*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym, (*x).Bindings, (*a).Info);
		asgnRefNoCycle((void**) (&(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym), finalcallee);
		asgnRefNoCycle((void**) (&(*(*a).kindU.S6.Sons->data[0]).Typ), (*finalcallee).Typ);
	}
	LA7: ;
}

N_NIMCALL(tnode225816*, indextypesmatch_487348)(tcontext290021* c, ttype225852* f, ttype225852* a, tnode225816* arg) {
	tnode225816* result;
	tcandidate405209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405270(c, (&m), f);
	result = paramtypesmatch_412263((&m), f, a, arg, NIM_NIL);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = m.Genericconverter;
		if (!(LOC3)) goto LA4;
		LOC3 = !((result == NIM_NIL));
		LA4: ;
		if (!LOC3) goto LA5;
		instgenericconvertersarg_493289(c, result, (&m));
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode225816*, fitnode_487245)(tcontext290021* c, ttype225852* formal, tnode225816* arg) {
	tnode225816* result;
	result = 0;
	{
		NimStringDesc* LOC5;
		if (!(*arg).Typ == 0) goto LA3;
		LOC5 = 0;
		LOC5 = rendertree_250058(arg, 4);
		localerror_197955((*arg).Info, ((NU16) 90), LOC5);
		result = copynode_226323(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), formal);
	}
	goto LA1;
	LA3: ;
	{
		result = indextypesmatch_487348(c, formal, (*arg).Typ, arg);
		{
			if (!(result == NIM_NIL)) goto LA9;
			typemismatch_487357(arg, formal, (*arg).Typ);
			result = copytree_226329(arg);
			asgnRefNoCycle((void**) (&(*result).Typ), formal);
		}
		goto LA7;
		LA9: ;
		{
			tnode225816* x;
			x = skipconv_273732(result);
			{
				NIM_BOOL LOC14;
				LOC14 = 0;
				LOC14 = ((*x).Kind == ((NU8) 37));
				if (!(LOC14)) goto LA15;
				LOC14 = !(((*formal).Kind == ((NU8) 6)));
				LA15: ;
				if (!LOC14) goto LA16;
				changetype_487253(x, formal, NIM_TRUE);
			}
			LA16: ;
		}
		LA7: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semconstboolexpr_495064)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* nn;
	ttype225852* LOC1;
	result = 0;
	nn = semexprwithtype_487211(c, n, 0);
	LOC1 = 0;
	LOC1 = getsystype_282030(((NU8) 1));
	result = fitnode_487245(c, LOC1, nn);
	{
		if (!(result == NIM_NIL)) goto LA4;
		localerror_197955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
		result = nn;
		goto BeforeRet;
	}
	LA4: ;
	result = getconstexpr_304004((*c).Module, result);
	{
		if (!(result == NIM_NIL)) goto LA8;
		localerror_197955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
		result = nn;
	}
	LA8: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, forcebool_495036)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getsystype_282030(((NU8) 1));
	result = fitnode_487245(c, LOC1, n);
	{
		if (!(result == NIM_NIL)) goto LA4;
		result = n;
	}
	LA4: ;
	return result;
}

N_NIMCALL(tnode225816*, sembranchrange_498111)(tcontext290021* c, tnode225816* t, tnode225816* a, tnode225816* b, NI64* covered) {
	tnode225816* result;
	tnode225816* ac;
	tnode225816* bc;
	tnode225816* at;
	tnode225816* LOC1;
	tnode225816* bt;
	tnode225816* LOC2;
	result = 0;
	checkminsonslen_291426(t, 1);
	ac = semconstexpr_488503(c, a);
	bc = semconstexpr_488503(c, b);
	LOC1 = 0;
	LOC1 = fitnode_487245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, ac);
	at = skipconvtaketype_273816(LOC1);
	LOC2 = 0;
	LOC2 = fitnode_487245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, bc);
	bt = skipconvtaketype_273816(LOC2);
	result = newnodei_226138(((NU8) 44), (*a).Info);
	add_226498(result, at);
	add_226498(result, bt);
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		LOC5 = emptyrange_284034(ac, bc);
		if (!LOC5) goto LA6;
		localerror_197955((*b).Info, ((NU16) 106), ((NimStringDesc*) &TMP2888));
	}
	goto LA3;
	LA6: ;
	{
		NI64 LOC9;
		NI64 LOC10;
		LOC9 = 0;
		LOC9 = getordvalue_263187(bc);
		LOC10 = 0;
		LOC10 = getordvalue_263187(ac);
		(*covered) = (NI64)((NI64)((NI64)((*covered) + LOC9) - LOC10) + IL64(1));
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, semcasebranchrange_498155)(tcontext290021* c, tnode225816* t, tnode225816* b, NI64* covered) {
	tnode225816* result;
	result = 0;
	checksonslen_291416(b, 3);
	result = sembranchrange_498111(c, t, (*b).kindU.S6.Sons->data[1], (*b).kindU.S6.Sons->data[2], covered);
	return result;
}

N_NIMCALL(tnode225816*, semcasebranchsetelem_498194)(tcontext290021* c, tnode225816* t, tnode225816* b, NI64* covered) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isrange_262216(b);
		if (!LOC3) goto LA4;
		checksonslen_291416(b, 3);
		result = sembranchrange_498111(c, t, (*b).kindU.S6.Sons->data[1], (*b).kindU.S6.Sons->data[2], covered);
	}
	goto LA1;
	LA4: ;
	{
		if (!((*b).Kind == ((NU8) 44))) goto LA7;
		checksonslen_291416(b, 2);
		result = sembranchrange_498111(c, t, (*b).kindU.S6.Sons->data[0], (*b).kindU.S6.Sons->data[1], covered);
	}
	goto LA1;
	LA7: ;
	{
		result = fitnode_487245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, b);
		(*covered) += 1;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, checkforoverlap_498004)(tcontext290021* c, tnode225816* t, NI currentex, NI branchindex) {
	tnode225816* ex;
	tnode225816* LOC1;
	tnode225816* LOC2;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_226698(t, branchindex);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_226698(LOC1, currentex);
	ex = skipconv_273732(LOC2);
	{
		NI i_498023;
		NI res_498088;
		i_498023 = 0;
		res_498088 = 1;
		{
			while (1) {
				if (!(res_498088 <= branchindex)) goto LA5;
				i_498023 = res_498088;
				{
					NI j_498050;
					NI HEX3Atmp_498081;
					NI LOC7;
					NI res_498084;
					j_498050 = 0;
					HEX3Atmp_498081 = 0;
					LOC7 = 0;
					LOC7 = sonslen_226249((*t).kindU.S6.Sons->data[i_498023]);
					HEX3Atmp_498081 = (NI32)(LOC7 - 2);
					res_498084 = 0;
					{
						while (1) {
							if (!(res_498084 <= HEX3Atmp_498081)) goto LA9;
							j_498050 = res_498084;
							{
								NIM_BOOL LOC12;
								LOC12 = 0;
								LOC12 = (i_498023 == branchindex);
								if (!(LOC12)) goto LA13;
								LOC12 = (j_498050 == currentex);
								LA13: ;
								if (!LOC12) goto LA14;
								goto LA6;
							}
							LA14: ;
							{
								tnode225816* LOC18;
								NIM_BOOL LOC19;
								LOC18 = 0;
								LOC18 = skipconv_273732((*(*t).kindU.S6.Sons->data[i_498023]).kindU.S6.Sons->data[j_498050]);
								LOC19 = 0;
								LOC19 = overlap_284012(LOC18, ex);
								if (!LOC19) goto LA20;
								localerror_197955((*ex).Info, ((NU16) 105), ((NimStringDesc*) &TMP2888));
							}
							LA20: ;
							res_498084 += 1;
						} LA9: ;
					}
				} LA6: ;
				res_498088 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(void, semcasebranch_498296)(tcontext290021* c, tnode225816* t, tnode225816* branch, NI branchindex, NI64* covered) {
	{
		NI i_498316;
		NI HEX3Atmp_498511;
		NI LOC2;
		NI res_498514;
		i_498316 = 0;
		HEX3Atmp_498511 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(branch);
		HEX3Atmp_498511 = (NI32)(LOC2 - 2);
		res_498514 = 0;
		{
			while (1) {
				tnode225816* b;
				if (!(res_498514 <= HEX3Atmp_498511)) goto LA4;
				i_498316 = res_498514;
				b = (*branch).kindU.S6.Sons->data[i_498316];
				{
					if (!((*b).Kind == ((NU8) 44))) goto LA7;
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_498316]), b);
				}
				goto LA5;
				LA7: ;
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = isrange_262216(b);
					if (!LOC10) goto LA11;
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_498316]), semcasebranchrange_498155(c, t, b, covered));
				}
				goto LA5;
				LA11: ;
				{
					tnode225816* r;
					r = semconstexpr_488503(c, b);
					{
						NIM_BOOL LOC16;
						NI LOC18;
						tnode225816* LOC21;
						LOC16 = 0;
						LOC16 = !(((*r).Kind == ((NU8) 39) || (*r).Kind == ((NU8) 41)));
						if (LOC16) goto LA17;
						LOC18 = 0;
						LOC18 = len_226364(r);
						LOC16 = (LOC18 == 0);
						LA17: ;
						if (!LOC16) goto LA19;
						checkminsonslen_291426(t, 1);
						LOC21 = 0;
						LOC21 = fitnode_487245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, r);
						asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_498316]), skipconv_273732(LOC21));
						(*covered) += 1;
					}
					goto LA14;
					LA19: ;
					{
						tnode225816* LOC23;
						LOC23 = 0;
						LOC23 = HEX5BHEX5D_226698(r, 0);
						asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_498316]), semcasebranchsetelem_498194(c, t, LOC23, covered));
						{
							NI j_498459;
							NI HEX3Atmp_498506;
							NI LOC25;
							NI res_498509;
							j_498459 = 0;
							HEX3Atmp_498506 = 0;
							LOC25 = 0;
							LOC25 = len_226364(r);
							HEX3Atmp_498506 = (LOC25 - 1);
							res_498509 = 1;
							{
								while (1) {
									tnode225816* LOC28;
									tnode225816* LOC29;
									NI l;
									tnode225816* LOC30;
									if (!(res_498509 <= HEX3Atmp_498506)) goto LA27;
									j_498459 = res_498509;
									LOC28 = 0;
									LOC28 = HEX5BHEX5D_226698(r, j_498459);
									LOC29 = 0;
									LOC29 = semcasebranchsetelem_498194(c, t, LOC28, covered);
									add_226498(branch, LOC29);
									l = len_226364(branch);
									LOC30 = 0;
									LOC30 = (*branch).kindU.S6.Sons->data[(NI32)(l - 2)];
									asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI32)(l - 2)]), (*branch).kindU.S6.Sons->data[(NI32)(l - 1)]);
									asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI32)(l - 1)]), LOC30);
									res_498509 += 1;
								} LA27: ;
							}
						}
					}
					LA14: ;
				}
				LA5: ;
				checkforoverlap_498004(c, t, i_498316, branchindex);
				res_498514 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(void, semrecordcase_498547)(tcontext290021* c, tnode225816* n, intset222056* check, NI* pos, tnode225816* father, ttype225852* rectype) {
	tnode225816* a;
	NI64 covered;
	ttype225852* typ;
	NIM_BOOL chckcovered;
	a = copynode_226323(n);
	checkminsonslen_291426(n, 2);
	semrecordnodeaux_498537(c, (*n).kindU.S6.Sons->data[0], check, pos, a, rectype);
	{
		if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA3;
		internalerror_198006(((NimStringDesc*) &TMP3247));
		goto BeforeRet;
	}
	LA3: ;
	(*(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym).Flags |= ((NI32)1)<<((((NU8) 18))%(sizeof(NI32)*8));
	covered = IL64(0);
	typ = skiptypes_230245((*(*a).kindU.S6.Sons->data[0]).Typ, IL64(211106240964608));
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = isordinaltype_263092(typ);
		if (!!(LOC7)) goto LA8;
		localerror_197955((*n).Info, ((NU16) 108), ((NimStringDesc*) &TMP2888));
	}
	goto LA5;
	LA8: ;
	{
		NI64 LOC11;
		LOC11 = 0;
		LOC11 = firstord_263004(typ);
		if (!(LOC11 < IL64(0))) goto LA12;
		localerror_197955((*n).Info, ((NU16) 109), (*(*(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	goto LA5;
	LA12: ;
	{
		NI64 LOC15;
		LOC15 = 0;
		LOC15 = lengthord_263016(typ);
		if (!(IL64(32767) < LOC15)) goto LA16;
		localerror_197955((*n).Info, ((NU16) 110), (*(*(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	goto LA5;
	LA16: ;
	LA5: ;
	chckcovered = NIM_TRUE;
	{
		NI i_498746;
		NI HEX3Atmp_498807;
		NI LOC19;
		NI res_498810;
		i_498746 = 0;
		HEX3Atmp_498807 = 0;
		LOC19 = 0;
		LOC19 = sonslen_226249(n);
		HEX3Atmp_498807 = (NI32)(LOC19 - 1);
		res_498810 = 1;
		{
			while (1) {
				tnode225816* b;
				NI LOC25;
				tnode225816* LOC26;
				if (!(res_498810 <= HEX3Atmp_498807)) goto LA21;
				i_498746 = res_498810;
				b = copytree_226329((*n).kindU.S6.Sons->data[i_498746]);
				addson_226287(a, b);
				switch ((*(*n).kindU.S6.Sons->data[i_498746]).Kind) {
				case ((NU8) 85):
				{
					checkminsonslen_291426(b, 2);
					semcasebranch_498296(c, a, b, i_498746, (&covered));
				}
				break;
				case ((NU8) 88):
				{
					chckcovered = NIM_FALSE;
					checksonslen_291416(b, 1);
				}
				break;
				default:
				{
					illformedast_291406(n);
				}
				break;
				}
				LOC25 = 0;
				LOC25 = sonslen_226249(b);
				delson_226294(b, (NI32)(LOC25 - 1));
				LOC26 = 0;
				LOC26 = lastson_226261((*n).kindU.S6.Sons->data[i_498746]);
				semrecordnodeaux_498537(c, LOC26, check, pos, b, rectype);
				res_498810 += 1;
			} LA21: ;
		}
	}
	{
		NIM_BOOL LOC29;
		NI64 LOC31;
		LOC29 = 0;
		LOC29 = chckcovered;
		if (!(LOC29)) goto LA30;
		LOC31 = 0;
		LOC31 = lengthord_263016((*(*a).kindU.S6.Sons->data[0]).Typ);
		LOC29 = !((covered == LOC31));
		LA30: ;
		if (!LOC29) goto LA32;
		localerror_197955((*a).Info, ((NU16) 151), ((NimStringDesc*) &TMP2888));
	}
	LA32: ;
	addson_226287(father, a);
	BeforeRet: ;
}

N_NIMCALL(void, semrecordnodeaux_498537)(tcontext290021* c, tnode225816* n, intset222056* check, NI* pos, tnode225816* father, ttype225852* rectype) {
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 139):
	{
		tnode225816* branch;
		branch = NIM_NIL;
		{
			NI i_498864;
			NI HEX3Atmp_499613;
			NI LOC7;
			NI res_499616;
			i_498864 = 0;
			HEX3Atmp_499613 = 0;
			LOC7 = 0;
			LOC7 = sonslen_226249(n);
			HEX3Atmp_499613 = (NI32)(LOC7 - 1);
			res_499616 = 0;
			{
				while (1) {
					tnode225816* it;
					NI idx;
					if (!(res_499616 <= HEX3Atmp_499613)) goto LA9;
					i_498864 = res_499616;
					it = (*n).kindU.S6.Sons->data[i_498864];
					{
						if (!(it == NIM_NIL)) goto LA12;
						illformedast_291406(n);
					}
					LA12: ;
					idx = 1;
					switch ((*it).Kind) {
					case ((NU8) 86):
					{
						checksonslen_291416(it, 2);
						{
							tnode225816* e;
							if (!((*c).Ingenericcontext == 0)) goto LA17;
							e = semconstboolexpr_495064(c, (*it).kindU.S6.Sons->data[0]);
							{
								if (!!(((*e).Kind == ((NU8) 6)))) goto LA21;
								internalerror_197987((*e).Info, ((NimStringDesc*) &TMP3246));
							}
							goto LA19;
							LA21: ;
							{
								NIM_BOOL LOC24;
								LOC24 = 0;
								LOC24 = !(((*e).kindU.S1.Intval == IL64(0)));
								if (!(LOC24)) goto LA25;
								LOC24 = (branch == NIM_NIL);
								LA25: ;
								if (!LOC24) goto LA26;
								branch = (*it).kindU.S6.Sons->data[1];
							}
							goto LA19;
							LA26: ;
							LA19: ;
						}
						goto LA15;
						LA17: ;
						{
							tnode225816* LOC29;
							LOC29 = 0;
							LOC29 = semexprwithtype_487211(c, (*it).kindU.S6.Sons->data[0], 0);
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), forcebool_495036(c, LOC29));
						}
						LA15: ;
					}
					break;
					case ((NU8) 88):
					{
						checksonslen_291416(it, 1);
						{
							if (!(branch == NIM_NIL)) goto LA33;
							branch = (*it).kindU.S6.Sons->data[0];
						}
						LA33: ;
						idx = 0;
					}
					break;
					default:
					{
						illformedast_291406(n);
					}
					break;
					}
					{
						intset222056 newcheck;
						NI newpos;
						tnode225816* newf;
						if (!(0 < (*c).Ingenericcontext)) goto LA38;
						memset((void*)(&newcheck), 0, sizeof(newcheck));
						assign_222975((&newcheck), (*check));
						newpos = (*pos);
						newf = newnodei_226138(((NU8) 137), (*n).Info);
						semrecordnodeaux_498537(c, (*it).kindU.S6.Sons->data[idx], (&newcheck), (&newpos), newf, rectype);
						{
							NI LOC42;
							LOC42 = 0;
							LOC42 = len_226364(newf);
							if (!(LOC42 == 1)) goto LA43;
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[idx]), HEX5BHEX5D_226698(newf, 0));
						}
						goto LA40;
						LA43: ;
						{
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[idx]), newf);
						}
						LA40: ;
					}
					LA38: ;
					res_499616 += 1;
				} LA9: ;
			}
		}
		{
			if (!(0 < (*c).Ingenericcontext)) goto LA48;
			addson_226287(father, n);
		}
		goto LA46;
		LA48: ;
		{
			if (!!((branch == NIM_NIL))) goto LA51;
			semrecordnodeaux_498537(c, branch, check, pos, father, rectype);
		}
		goto LA46;
		LA51: ;
		LA46: ;
	}
	break;
	case ((NU8) 138):
	{
		semrecordcase_498547(c, n, check, pos, father, rectype);
	}
	break;
	case ((NU8) 23):
	{
		{
			tnode225816* LOC59;
			if (!!(((*father).Kind == ((NU8) 137)))) goto LA57;
			LOC59 = 0;
			LOC59 = newnodei_226138(((NU8) 137), (*n).Info);
			addson_226287(father, LOC59);
		}
		LA57: ;
	}
	break;
	case ((NU8) 137):
	{
		tnode225816* a;
		{
			if (!((*father).Kind == ((NU8) 137))) goto LA63;
			a = father;
		}
		goto LA61;
		LA63: ;
		{
			a = copynode_226323(n);
		}
		LA61: ;
		{
			NI i_499110;
			NI HEX3Atmp_499619;
			NI LOC67;
			NI res_499622;
			i_499110 = 0;
			HEX3Atmp_499619 = 0;
			LOC67 = 0;
			LOC67 = sonslen_226249(n);
			HEX3Atmp_499619 = (NI32)(LOC67 - 1);
			res_499622 = 0;
			{
				while (1) {
					if (!(res_499622 <= HEX3Atmp_499619)) goto LA69;
					i_499110 = res_499622;
					semrecordnodeaux_498537(c, (*n).kindU.S6.Sons->data[i_499110], check, pos, a, rectype);
					res_499622 += 1;
				} LA69: ;
			}
		}
		{
			if (!!((a == father))) goto LA72;
			addson_226287(father, a);
		}
		LA72: ;
	}
	break;
	case ((NU8) 35):
	{
		NI length;
		tnode225816* a;
		ttype225852* typ;
		tsym225846* rec;
		checkminsonslen_291426(n, 3);
		length = sonslen_226249(n);
		a = 0;
		{
			NIM_BOOL LOC77;
			LOC77 = 0;
			LOC77 = !(((*father).Kind == ((NU8) 137)));
			if (!(LOC77)) goto LA78;
			LOC77 = (4 <= length);
			LA78: ;
			if (!LOC77) goto LA79;
			a = newnodei_226138(((NU8) 137), (*n).Info);
		}
		goto LA75;
		LA79: ;
		{
			a = emptynode_226738;
		}
		LA75: ;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[(NI32)(length - 1)]).Kind == ((NU8) 1)))) goto LA84;
			localerror_197955((*(*n).kindU.S6.Sons->data[(NI32)(length - 1)]).Info, ((NU16) 175), ((NimStringDesc*) &TMP2888));
		}
		LA84: ;
		typ = 0;
		{
			if (!((*(*n).kindU.S6.Sons->data[(NI32)(length - 2)]).Kind == ((NU8) 1))) goto LA88;
			localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
			typ = errortype_291319(c);
		}
		goto LA86;
		LA88: ;
		{
			typ = semtypenode_487269(c, (*n).kindU.S6.Sons->data[(NI32)(length - 2)], NIM_NIL);
			propagatetoowner_230318(rectype, typ);
		}
		LA86: ;
		rec = (*rectype).Sym;
		{
			NI i_499240;
			NI HEX3Atmp_499627;
			NI LOC92;
			NI res_499630;
			i_499240 = 0;
			HEX3Atmp_499627 = 0;
			LOC92 = 0;
			LOC92 = sonslen_226249(n);
			HEX3Atmp_499627 = (NI32)(LOC92 - 3);
			res_499630 = 0;
			{
				while (1) {
					tsym225846* f;
					if (!(res_499630 <= HEX3Atmp_499627)) goto LA94;
					i_499240 = res_499630;
					f = semidentwithpragma_487999(c, ((NU8) 19), (*n).kindU.S6.Sons->data[i_499240], 2);
					suggestsym_420882((*(*n).kindU.S6.Sons->data[i_499240]).Info, f);
					asgnRefNoCycle((void**) (&(*f).Typ), typ);
					(*f).Position = (*pos);
					{
						NIM_BOOL LOC97;
						NIM_BOOL LOC98;
						LOC97 = 0;
						LOC98 = 0;
						LOC98 = !((rec == NIM_NIL));
						if (!(LOC98)) goto LA99;
						LOC98 = !(((96 & (*rec).Flags) == 0));
						LA99: ;
						LOC97 = LOC98;
						if (!(LOC97)) goto LA100;
						LOC97 = ((*f).Loc.R == NIM_NIL);
						LA100: ;
						if (!LOC97) goto LA101;
						asgnRefNoCycle((void**) (&(*f).Loc.R), torope_177076((*(*f).Name).S));
						(*f).Flags = ((*f).Flags | (96 & (*rec).Flags));
					}
					LA101: ;
					(*pos) += 1;
					{
						NIM_BOOL LOC105;
						LOC105 = 0;
						LOC105 = containsorincl_222916(check, (*(*f).Name).Sup.Id);
						if (!LOC105) goto LA106;
						localerror_197955((*(*n).kindU.S6.Sons->data[i_499240]).Info, ((NU16) 40), (*(*f).Name).S);
					}
					LA106: ;
					{
						tnode225816* LOC112;
						if (!((*a).Kind == ((NU8) 1))) goto LA110;
						LOC112 = 0;
						LOC112 = newsymnode_226132(f);
						addson_226287(father, LOC112);
					}
					goto LA108;
					LA110: ;
					{
						tnode225816* LOC114;
						LOC114 = 0;
						LOC114 = newsymnode_226132(f);
						addson_226287(a, LOC114);
					}
					LA108: ;
					res_499630 += 1;
				} LA94: ;
			}
		}
		{
			if (!!(((*a).Kind == ((NU8) 1)))) goto LA117;
			addson_226287(father, a);
		}
		LA117: ;
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	default:
	{
		illformedast_291406(n);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(ttype225852*, semobjectnode_499888)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	intset222056 check;
	NI pos;
	ttype225852* base;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_495165(c, ((NU8) 17));
		goto BeforeRet;
	}
	LA4: ;
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_222950((&check));
	pos = 0;
	base = NIM_NIL;
	checksonslen_291416(n, 3);
	{
		ttype225852* LOC10;
		ttype225852* concretebase;
		ttype225852* LOC11;
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA8;
		LOC10 = 0;
		LOC10 = semtypenode_487269(c, (*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[0], NIM_NIL);
		base = skiptypes_230245(LOC10, IL64(211106247215360));
		LOC11 = 0;
		LOC11 = skipgenericinvokation_499863(base);
		concretebase = skiptypes_230245(LOC11, IL64(211106247215360));
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = ((*concretebase).Kind == ((NU8) 17));
			if (!(LOC14)) goto LA15;
			LOC14 = !((((*concretebase).Flags &(1<<((((NU8) 2))&31)))!=0));
			LA15: ;
			if (!LOC14) goto LA16;
			addinheritedfields_499834(c, (&check), (&pos), concretebase);
		}
		goto LA12;
		LA16: ;
		{
			{
				if (!!(((*concretebase).Kind == ((NU8) 50)))) goto LA21;
				localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 121), ((NimStringDesc*) &TMP2888));
			}
			LA21: ;
			base = NIM_NIL;
		}
		LA12: ;
	}
	LA8: ;
	{
		if (!!(((*n).Kind == ((NU8) 133)))) goto LA25;
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP2916));
	}
	LA25: ;
	result = neworprevtype_495130(((NU8) 17), prev, c);
	rawaddson_230562(result, base);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 137), (*n).Info));
	semrecordnodeaux_498537(c, (*n).kindU.S6.Sons->data[2], (&check), (&pos), (*result).N, result);
	{
		tsym225846* s;
		tident200021* LOC31;
		tnode225816* LOC32;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA29;
		LOC31 = 0;
		LOC31 = getident_200472(((NimStringDesc*) &TMP3248));
		LOC32 = 0;
		LOC32 = newidentnode_226125(LOC31, (*n).Info);
		s = newsyms_487918(((NU8) 7), LOC32, c);
		asgnRefNoCycle((void**) (&(*s).Typ), result);
		pragma_310079(c, s, (*n).kindU.S6.Sons->data[0], TMP3249);
	}
	LA29: ;
	{
		NIM_BOOL LOC35;
		LOC35 = 0;
		LOC35 = (base == NIM_NIL);
		if (!(LOC35)) goto LA36;
		LOC35 = !((((*result).Flags &(1<<((((NU8) 3))&31)))!=0));
		LA36: ;
		if (!LOC35) goto LA37;
		(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	}
	LA37: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semtuple_497228)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	ttype225852* typ;
	intset222056 check;
	NI counter;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_495165(c, ((NU8) 18));
		goto BeforeRet;
	}
	LA4: ;
	typ = 0;
	result = neworprevtype_495130(((NU8) 18), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 137), (*n).Info));
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_222950((&check));
	counter = 0;
	{
		NI i_497249;
		NI HEX3Atmp_497609;
		NI LOC7;
		NI res_497612;
		i_497249 = 0;
		HEX3Atmp_497609 = 0;
		LOC7 = 0;
		LOC7 = sonslen_226249(n);
		HEX3Atmp_497609 = (NI32)(LOC7 - 1);
		res_497612 = 0;
		{
			while (1) {
				tnode225816* a;
				NI length;
				if (!(res_497612 <= HEX3Atmp_497609)) goto LA9;
				i_497249 = res_497612;
				a = (*n).kindU.S6.Sons->data[i_497249];
				{
					if (!!(((*a).Kind == ((NU8) 35)))) goto LA12;
					illformedast_291406(a);
				}
				LA12: ;
				checkminsonslen_291426(a, 3);
				length = sonslen_226249(a);
				{
					if (!!(((*(*a).kindU.S6.Sons->data[(NI32)(length - 2)]).Kind == ((NU8) 1)))) goto LA16;
					typ = semtypenode_487269(c, (*a).kindU.S6.Sons->data[(NI32)(length - 2)], NIM_NIL);
				}
				goto LA14;
				LA16: ;
				{
					localerror_197955((*a).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					typ = errortype_291319(c);
				}
				LA14: ;
				{
					if (!!(((*(*a).kindU.S6.Sons->data[(NI32)(length - 1)]).Kind == ((NU8) 1)))) goto LA21;
					localerror_197955((*(*a).kindU.S6.Sons->data[(NI32)(length - 1)]).Info, ((NU16) 175), ((NimStringDesc*) &TMP2888));
				}
				LA21: ;
				{
					NI j_497361;
					NI HEX3Atmp_497604;
					NI res_497607;
					j_497361 = 0;
					HEX3Atmp_497604 = 0;
					HEX3Atmp_497604 = (NI32)(length - 3);
					res_497607 = 0;
					{
						while (1) {
							tsym225846* field;
							if (!(res_497607 <= HEX3Atmp_497604)) goto LA25;
							j_497361 = res_497607;
							field = newsymg_487930(((NU8) 19), (*a).kindU.S6.Sons->data[j_497361], c);
							asgnRefNoCycle((void**) (&(*field).Typ), typ);
							(*field).Position = counter;
							counter += 1;
							{
								NIM_BOOL LOC28;
								LOC28 = 0;
								LOC28 = containsorincl_222916((&check), (*(*field).Name).Sup.Id);
								if (!LOC28) goto LA29;
								localerror_197955((*(*a).kindU.S6.Sons->data[j_497361]).Info, ((NU16) 40), (*(*field).Name).S);
							}
							goto LA26;
							LA29: ;
							{
								tnode225816* LOC32;
								LOC32 = 0;
								LOC32 = newsymnode_226132(field);
								addson_226287((*result).N, LOC32);
								addsonskipintlit_282572(result, typ);
							}
							LA26: ;
							{
								if (!(gcmd_169120 == ((NU8) 7))) goto LA35;
							}
							LA35: ;
							res_497607 += 1;
						} LA25: ;
					}
				}
				res_497612 += 1;
			} LA9: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semtypeclass_502824)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	tnode225816* pragmas;
	tnode225816* inherited;
	result = 0;
	result = neworprevtype_495130(((NU8) 52), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), n);
	pragmas = HEX5BHEX5D_226698(n, 1);
	inherited = HEX5BHEX5D_226698(n, 2);
	{
		if (!!(((*inherited).Kind == ((NU8) 1)))) goto LA3;
		{
			tnode225816* n_502867;
			tnodeseq225810* HEX3Atmp_502887;
			NI i_502890;
			NI l_502892;
			n_502867 = 0;
			HEX3Atmp_502887 = 0;
			HEX3Atmp_502887 = (*inherited).kindU.S6.Sons;
			i_502890 = 0;
			l_502892 = HEX3Atmp_502887->Sup.len;
			{
				while (1) {
					ttype225852* typ;
					if (!(i_502890 < l_502892)) goto LA7;
					n_502867 = HEX3Atmp_502887->data[i_502890];
					typ = semtypenode_487269(c, n_502867, NIM_NIL);
					safeadd_317709((&(*result).Sons), typ);
					i_502890 += 1;
				} LA7: ;
			}
		}
	}
	LA3: ;
	return result;
}

N_NIMCALL(ttype225852*, semvartype_495897)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	{
		NI LOC3;
		ttype225852* base;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 1)) goto LA4;
		result = neworprevtype_495130(((NU8) 23), prev, c);
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		{
			if (!((*base).Kind == ((NU8) 23))) goto LA8;
			localerror_197955((*n).Info, ((NU16) 197), ((NimStringDesc*) &TMP2888));
			base = (*base).Sons->data[0];
		}
		LA8: ;
		addsonskipintlit_282572(result, base);
	}
	goto LA1;
	LA4: ;
	{
		result = newconstraint_495165(c, ((NU8) 23));
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype225852*, semdistinct_495930)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	ttype225852* LOC6;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_226364(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_495165(c, ((NU8) 13));
		goto BeforeRet;
	}
	LA4: ;
	result = neworprevtype_495130(((NU8) 13), prev, c);
	LOC6 = 0;
	LOC6 = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	addsonskipintlit_282572(result, LOC6);
	{
		NI LOC9;
		LOC9 = 0;
		LOC9 = len_226364(n);
		if (!(1 < LOC9)) goto LA10;
		asgnRefNoCycle((void**) (&(*result).N), HEX5BHEX5D_226698(n, 1));
	}
	LA10: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semproctypewithscope_502905)(tcontext290021* c, tnode225816* n, ttype225852* prev, NU8 kind) {
	ttype225852* result;
	tscope225840* LOC1;
	tsym225846* s;
	tident200021* LOC2;
	tnode225816* LOC3;
	result = 0;
	checksonslen_291416(n, 2);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	result = semproctypenode_501546(c, (*n).kindU.S6.Sons->data[0], NIM_NIL, prev, kind, NIM_TRUE);
	LOC2 = 0;
	LOC2 = getident_200472(((NimStringDesc*) &TMP3248));
	LOC3 = 0;
	LOC3 = newidentnode_226125(LOC2, (*n).Info);
	s = newsyms_487918(kind, LOC3, c);
	asgnRefNoCycle((void**) (&(*s).Typ), result);
	{
		NIM_BOOL LOC6;
		NI LOC8;
		LOC6 = 0;
		LOC6 = ((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1));
		if (LOC6) goto LA7;
		LOC8 = 0;
		LOC8 = len_226364((*n).kindU.S6.Sons->data[1]);
		LOC6 = (LOC8 == 0);
		LA7: ;
		if (!LOC6) goto LA9;
		{
			if (!((*result).Callconv == ((NU8) 0))) goto LA13;
			(*result).Callconv = ((NU8) 8);
		}
		LA13: ;
	}
	goto LA4;
	LA9: ;
	{
		pragma_310079(c, s, (*n).kindU.S6.Sons->data[1], TMP3250);
		seteffectsforproctype_383811(result, (*n).kindU.S6.Sons->data[1]);
	}
	LA4: ;
	closescope_295211(c);
	return result;
}

N_NIMCALL(ttype225852*, semenum_495173)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	NI64 counter;
	NI64 x;
	tsym225846* e;
	ttype225852* base;
	NIM_BOOL ispure;
	NIM_BOOL LOC15;
	NIM_BOOL hasnull;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_495165(c, ((NU8) 14));
		goto BeforeRet;
	}
	LA4: ;
	counter = 0;
	x = 0;
	e = 0;
	base = 0;
	counter = IL64(0);
	base = NIM_NIL;
	result = neworprevtype_495130(((NU8) 14), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_226138(((NU8) 149), (*n).Info));
	checkminsonslen_291426(n, 1);
	{
		NI64 LOC14;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA8;
		base = semtypenode_487269(c, (*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[0], NIM_NIL);
		{
			if (!!(((*base).Kind == ((NU8) 14)))) goto LA12;
			localerror_197955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 122), ((NimStringDesc*) &TMP2888));
		}
		LA12: ;
		LOC14 = 0;
		LOC14 = lastord_263010(base);
		counter = (NI64)(LOC14 + IL64(1));
	}
	LA8: ;
	rawaddson_230562(result, base);
	LOC15 = 0;
	LOC15 = !(((*result).Sym == NIM_NIL));
	if (!(LOC15)) goto LA16;
	LOC15 = (((*(*result).Sym).Flags &(1<<((((NU8) 9))&31)))!=0);
	LA16: ;
	ispure = LOC15;
	hasnull = NIM_FALSE;
	{
		NI i_495301;
		NI HEX3Atmp_495648;
		NI LOC18;
		NI res_495651;
		i_495301 = 0;
		HEX3Atmp_495648 = 0;
		LOC18 = 0;
		LOC18 = sonslen_226249(n);
		HEX3Atmp_495648 = (NI32)(LOC18 - 1);
		res_495651 = 1;
		{
			while (1) {
				tnode225816* LOC68;
				if (!(res_495651 <= HEX3Atmp_495648)) goto LA20;
				i_495301 = res_495651;
				switch ((*(*n).kindU.S6.Sons->data[i_495301]).Kind) {
				case ((NU8) 150):
				{
					tnode225816* v;
					tnode225816* strval;
					ttype225852* LOC22;
					e = newsyms_487918(((NU8) 20), (*(*n).kindU.S6.Sons->data[i_495301]).kindU.S6.Sons->data[0], c);
					v = semconstexpr_488503(c, (*(*n).kindU.S6.Sons->data[i_495301]).kindU.S6.Sons->data[1]);
					strval = NIM_NIL;
					LOC22 = 0;
					LOC22 = skiptypes_230245((*v).Typ, IL64(211106232576000));
					switch ((*LOC22).Kind) {
					case ((NU8) 18):
					{
						{
							NI LOC26;
							LOC26 = 0;
							LOC26 = sonslen_226249(v);
							if (!(LOC26 == 2)) goto LA27;
							strval = (*v).kindU.S6.Sons->data[1];
							{
								ttype225852* LOC31;
								LOC31 = 0;
								LOC31 = skiptypes_230245((*strval).Typ, IL64(211106232576256));
								if (!((*LOC31).Kind == ((NU8) 28) || (*LOC31).Kind == ((NU8) 29))) goto LA32;
								x = getordvalue_263187((*v).kindU.S6.Sons->data[0]);
							}
							goto LA29;
							LA32: ;
							{
								localerror_197955((*strval).Info, ((NU16) 6), ((NimStringDesc*) &TMP2888));
							}
							LA29: ;
						}
						goto LA24;
						LA27: ;
						{
							localerror_197955((*v).Info, ((NU16) 111), ((NimStringDesc*) &TMP2888));
						}
						LA24: ;
					}
					break;
					case ((NU8) 28):
					case ((NU8) 29):
					{
						strval = v;
						x = counter;
					}
					break;
					default:
					{
						x = getordvalue_263187(v);
					}
					break;
					}
					{
						if (!!((i_495301 == 1))) goto LA40;
						{
							if (!!((x == counter))) goto LA44;
							(*result).Flags |= ((NI32)1)<<((((NU8) 5))%(sizeof(NI32)*8));
						}
						LA44: ;
						{
							if (!(x < counter)) goto LA48;
							localerror_197955((*(*n).kindU.S6.Sons->data[i_495301]).Info, ((NU16) 145), (*(*e).Name).S);
							x = counter;
						}
						LA48: ;
					}
					LA40: ;
					asgnRefNoCycle((void**) (&(*e).Ast), strval);
					counter = x;
				}
				break;
				case ((NU8) 3):
				{
					e = (*(*n).kindU.S6.Sons->data[i_495301]).kindU.S4.Sym;
				}
				break;
				case ((NU8) 2):
				case ((NU8) 53):
				{
					e = newsyms_487918(((NU8) 20), (*n).kindU.S6.Sons->data[i_495301], c);
				}
				break;
				default:
				{
					tnode225816* LOC53;
					LOC53 = 0;
					LOC53 = HEX5BHEX5D_226698(n, i_495301);
					illformedast_291406(LOC53);
				}
				break;
				}
				asgnRefNoCycle((void**) (&(*e).Typ), result);
				(*e).Position = ((NI) (counter));
				{
					if (!((*e).Position == 0)) goto LA56;
					hasnull = NIM_TRUE;
				}
				LA56: ;
				{
					NIM_BOOL LOC60;
					LOC60 = 0;
					LOC60 = !(((*result).Sym == NIM_NIL));
					if (!(LOC60)) goto LA61;
					LOC60 = (((*(*result).Sym).Flags &(1<<((((NU8) 1))&31)))!=0);
					LA61: ;
					if (!LOC60) goto LA62;
					(*e).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
					(*e).Flags |= ((NI32)1)<<((((NU8) 1))%(sizeof(NI32)*8));
					{
						if (!!(ispure)) goto LA66;
						strtableadd_235103((&(*(*c).Module).kindU.S3.Tab), e);
					}
					LA66: ;
				}
				LA62: ;
				LOC68 = 0;
				LOC68 = newsymnode_226132(e);
				addson_226287((*result).N, LOC68);
				{
					NIM_BOOL LOC71;
					LOC71 = 0;
					LOC71 = !((((*e).Flags &(1<<((((NU8) 31))&31)))!=0));
					if (!(LOC71)) goto LA72;
					LOC71 = !(ispure);
					LA72: ;
					if (!LOC71) goto LA73;
					adddecl_295694(c, e);
				}
				LA73: ;
				counter += 1;
				res_495651 += 1;
			} LA20: ;
		}
	}
	{
		if (!!(hasnull)) goto LA77;
		(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
	}
	LA77: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, semstmtlisttype_502342)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	NI length;
	result = 0;
	checkminsonslen_291426(n, 1);
	length = sonslen_226249(n);
	{
		NI i_502361;
		NI HEX3Atmp_502420;
		NI res_502423;
		i_502361 = 0;
		HEX3Atmp_502420 = 0;
		HEX3Atmp_502420 = (NI32)(length - 2);
		res_502423 = 0;
		{
			while (1) {
				if (!(res_502423 <= HEX3Atmp_502420)) goto LA3;
				i_502361 = res_502423;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_502361]), semstmt_487277(c, (*n).kindU.S6.Sons->data[i_502361]));
				res_502423 += 1;
			} LA3: ;
		}
	}
	{
		if (!(0 < length)) goto LA6;
		result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[(NI32)(length - 1)], prev);
		asgnRefNoCycle((void**) (&(*n).Typ), result);
		asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[(NI32)(length - 1)]).Typ), result);
	}
	goto LA4;
	LA6: ;
	{
		result = NIM_NIL;
	}
	LA4: ;
	return result;
}

N_NIMCALL(ttype225852*, semblocktype_502437)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	tscope225840* LOC1;
	result = 0;
	(*(*c).P).Nestedblockcounter += 1;
	checksonslen_291416(n, 2);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	{
		tsym225846* LOC6;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1) || (*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA4;
		LOC6 = 0;
		LOC6 = newsyms_487918(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
		adddecl_295694(c, LOC6);
	}
	LA4: ;
	result = semstmtlisttype_502342(c, (*n).kindU.S6.Sons->data[1], prev);
	asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[1]).Typ), result);
	asgnRefNoCycle((void**) (&(*n).Typ), result);
	closescope_295211(c);
	(*(*c).P).Nestedblockcounter -= 1;
	return result;
}

N_NIMCALL(ttype225852*, semtypenode_487269)(tcontext290021* c, tnode225816* n, ttype225852* prev) {
	ttype225852* result;
	result = 0;
	result = NIM_NIL;
	{
		if (!(gcmd_169120 == ((NU8) 14))) goto LA3;
		suggestexpr_421008(c, n);
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 1):
	{
	}
	break;
	case ((NU8) 132):
	{
		tnode225816* typexpr;
		checksonslen_291416(n, 1);
		typexpr = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 4);
		result = skiptypes_230245((*typexpr).Typ, IL64(562949953421312));
	}
	break;
	case ((NU8) 37):
	{
		{
			NI LOC10;
			LOC10 = 0;
			LOC10 = sonslen_226249(n);
			if (!(LOC10 == 1)) goto LA11;
			result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], prev);
		}
		goto LA8;
		LA11: ;
		{
			localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
			result = neworprevtype_495130(((NU8) 50), prev, c);
		}
		LA8: ;
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		{
			NIM_BOOL LOC17;
			LOC17 = 0;
			LOC17 = isrange_262216(n);
			if (!LOC17) goto LA18;
			result = semrangeaux_495954(c, n, prev);
		}
		goto LA15;
		LA18: ;
		{
			tnode225816* LOC21;
			LOC21 = 0;
			LOC21 = HEX5BHEX5D_226698(n, 0);
			if (!!(((*LOC21).Kind == ((NU8) 2) || (*LOC21).Kind == ((NU8) 3) || (*LOC21).Kind == ((NU8) 53) || (*LOC21).Kind == ((NU8) 57) || (*LOC21).Kind == ((NU8) 56)))) goto LA22;
			result = semtypeexpr_502786(c, n);
		}
		goto LA15;
		LA22: ;
		{
			tident200021* op;
			op = considerquotedident_295010((*n).kindU.S6.Sons->data[0]);
			{
				NIM_BOOL LOC27;
				ttype225852* t1;
				ttype225852* t2;
				LOC27 = 0;
				LOC27 = ((*op).Sup.Id == 2 || (*op).Sup.Id == 48);
				if (LOC27) goto LA28;
				LOC27 = eqStrings((*op).S, ((NimStringDesc*) &TMP2890));
				LA28: ;
				if (!LOC27) goto LA29;
				checksonslen_291416(n, 3);
				t1 = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
				t2 = semtypenode_487269(c, (*n).kindU.S6.Sons->data[2], NIM_NIL);
				{
					if (!(t1 == NIM_NIL)) goto LA33;
					localerror_197955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					result = neworprevtype_495130(((NU8) 50), prev, c);
				}
				goto LA31;
				LA33: ;
				{
					if (!(t2 == NIM_NIL)) goto LA36;
					localerror_197955((*(*n).kindU.S6.Sons->data[2]).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
					result = neworprevtype_495130(((NU8) 50), prev, c);
				}
				goto LA31;
				LA36: ;
				{
					{
						if (!((*op).Sup.Id == 2)) goto LA41;
						result = makeandtype_290897(c, t1, t2);
					}
					goto LA39;
					LA41: ;
					{
						result = makeortype_291016(c, t1, t2);
					}
					LA39: ;
				}
				LA31: ;
			}
			goto LA25;
			LA29: ;
			{
				NI LOC47;
				if (!((*op).Sup.Id == 44)) goto LA45;
				LOC47 = 0;
				LOC47 = len_226364(n);
				switch (LOC47) {
				case 3:
				{
					result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], prev);
					{
						NIM_BOOL LOC51;
						LOC51 = 0;
						LOC51 = ((*result).Kind == ((NU8) 26) || (*result).Kind == ((NU8) 29) || (*result).Kind == ((NU8) 22) || (*result).Kind == ((NU8) 21) || (*result).Kind == ((NU8) 24) || (*result).Kind == ((NU8) 25) || (*result).Kind == ((NU8) 28) || (*result).Kind == ((NU8) 50));
						if (!(LOC51)) goto LA52;
						LOC51 = ((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 23));
						LA52: ;
						if (!LOC51) goto LA53;
						result = freshtype_502805(result, prev);
						(*result).Flags |= ((NI32)1)<<((((NU8) 16))%(sizeof(NI32)*8));
					}
					goto LA49;
					LA53: ;
					{
						localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP2891));
					}
					LA49: ;
				}
				break;
				case 2:
				{
					ttype225852* negated;
					negated = semtypenode_487269(c, (*n).kindU.S6.Sons->data[1], prev);
					result = makenottype_291135(c, negated);
				}
				break;
				default:
				{
					localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP2891));
				}
				break;
				}
			}
			goto LA25;
			LA45: ;
			{
				if (!((*op).Sup.Id == 51)) goto LA59;
				result = semanyref_495786(c, n, ((NU8) 21), prev);
			}
			goto LA25;
			LA59: ;
			{
				if (!((*op).Sup.Id == 53)) goto LA62;
				result = semanyref_495786(c, n, ((NU8) 22), prev);
			}
			goto LA25;
			LA62: ;
			{
				result = semtypeexpr_502786(c, n);
			}
			LA25: ;
		}
		LA15: ;
	}
	break;
	case ((NU8) 93):
	{
		tnode225816* whenresult;
		whenresult = semwhen_488040(c, n, NIM_FALSE);
		{
			if (!((*whenresult).Kind == ((NU8) 115))) goto LA68;
			(*whenresult).Kind = ((NU8) 128);
		}
		LA68: ;
		result = semtypenode_487269(c, whenresult, prev);
	}
	break;
	case ((NU8) 42):
	{
		tsym225846* s;
		checkminsonslen_291426(n, 2);
		s = semtypeident_496731(c, (*n).kindU.S6.Sons->data[0]);
		switch ((*s).Magic) {
		case ((NU16) 176):
		{
			result = semarray_496411(c, n, prev);
		}
		break;
		case ((NU16) 177):
		{
			result = semcontainer_495708(c, n, ((NU8) 27), ((NimStringDesc*) &TMP2896), prev);
		}
		break;
		case ((NU16) 178):
		{
			result = semrange_496094(c, n, prev);
		}
		break;
		case ((NU16) 179):
		{
			result = semset_495665(c, n, prev);
		}
		break;
		case ((NU16) 182):
		{
			result = semordinal_496684(c, n, prev);
		}
		break;
		case ((NU16) 180):
		{
			result = semcontainer_495708(c, n, ((NU8) 24), ((NimStringDesc*) &TMP2900), prev);
		}
		break;
		case ((NU16) 181):
		{
			result = semvarargs_495734(c, n, prev);
		}
		break;
		case ((NU16) 207):
		{
			tnode225816* LOC79;
			ttype225852* LOC80;
			LOC79 = 0;
			LOC79 = HEX5BHEX5D_226698(n, 1);
			LOC80 = 0;
			LOC80 = semtypenode_487269(c, LOC79, NIM_NIL);
			result = maketypedesc_290763(c, LOC80);
		}
		break;
		case ((NU16) 205):
		{
			result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
			{
				tsym225846* LOC86;
				if (!!((result == NIM_NIL))) goto LA84;
				LOC86 = 0;
				LOC86 = getcurrowner_290256();
				result = copytype_226195(result, LOC86, NIM_FALSE);
				{
					NI i_503398;
					NI HEX3Atmp_503911;
					NI LOC88;
					NI res_503914;
					i_503398 = 0;
					HEX3Atmp_503911 = 0;
					LOC88 = 0;
					LOC88 = len_226364(n);
					HEX3Atmp_503911 = (NI32)(LOC88 - 1);
					res_503914 = 1;
					{
						while (1) {
							ttype225852* LOC91;
							if (!(res_503914 <= HEX3Atmp_503911)) goto LA90;
							i_503398 = res_503914;
							LOC91 = 0;
							LOC91 = semtypenode_487269(c, (*n).kindU.S6.Sons->data[i_503398], NIM_NIL);
							rawaddson_230562(result, LOC91);
							res_503914 += 1;
						} LA90: ;
					}
				}
			}
			LA84: ;
		}
		break;
		default:
		{
			result = semgeneric_502548(c, n, s, prev);
		}
		break;
		}
	}
	break;
	case ((NU8) 45):
	{
		tnode225816* typeexpr;
		typeexpr = semexpr_487201(c, n, 0);
		{
			if (!!(((*(*typeexpr).Typ).Kind == ((NU8) 8)))) goto LA96;
			localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
			result = errortype_291319(c);
			goto BeforeRet;
		}
		LA96: ;
		result = base_263038((*typeexpr).Typ);
		{
			NIM_BOOL LOC100;
			intset222056 tobind;
			tnode225816* preprocessed;
			LOC100 = 0;
			LOC100 = ismetatype_226752(result);
			if (!LOC100) goto LA101;
			memset((void*)(&tobind), 0, sizeof(tobind));
			chckNil((void*)(&tobind));
			memset((void*)(&tobind), 0, sizeof(tobind));
			initintset_222950((&tobind));
			preprocessed = semgenericstmt_495120(c, n, 0, (&tobind));
			result = maketypefromexpr_290812(c, preprocessed);
			goto BeforeRet;
		}
		LA101: ;
	}
	break;
	case ((NU8) 2):
	case ((NU8) 53):
	{
		tsym225846* s;
		s = semtypeident_496731(c, n);
		{
			if (!((*s).Typ == NIM_NIL)) goto LA106;
			{
				if (!!(((*s).Kind == ((NU8) 0)))) goto LA110;
				localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
			}
			LA110: ;
			result = neworprevtype_495130(((NU8) 50), prev, c);
		}
		goto LA104;
		LA106: ;
		{
			NIM_BOOL LOC113;
			LOC113 = 0;
			LOC113 = ((*s).Kind == ((NU8) 3));
			if (!(LOC113)) goto LA114;
			LOC113 = ((*(*s).Typ).Kind == ((NU8) 8));
			LA114: ;
			if (!LOC113) goto LA115;
			{
				NIM_BOOL LOC119;
				ttype225852* LOC120;
				NimStringDesc* LOC124;
				LOC119 = 0;
				LOC120 = 0;
				LOC120 = base_263038((*s).Typ);
				LOC119 = !(((*LOC120).Kind == ((NU8) 0)));
				if (!(LOC119)) goto LA121;
				LOC119 = (prev == NIM_NIL);
				LA121: ;
				if (!!(LOC119)) goto LA122;
				LOC124 = 0;
				LOC124 = HEX24_198126(TMP2912);
				internalerror_198006(LOC124);
			}
			LA122: ;
			result = base_263038((*s).Typ);
		}
		goto LA104;
		LA115: ;
		{
			if (!(prev == NIM_NIL)) goto LA126;
			result = (*s).Typ;
		}
		goto LA104;
		LA126: ;
		{
			assigntype_226210(prev, (*s).Typ);
			{
				if (!!(((*(*s).Typ).Kind == ((NU8) 1) || (*(*s).Typ).Kind == ((NU8) 2) || (*(*s).Typ).Kind >= ((NU8) 31) && (*(*s).Typ).Kind <= ((NU8) 35) || (*(*s).Typ).Kind >= ((NU8) 36) && (*(*s).Typ).Kind <= ((NU8) 39) || (*(*s).Typ).Kind >= ((NU8) 40) && (*(*s).Typ).Kind <= ((NU8) 44)))) goto LA131;
				(*prev).Sup.Id = (*(*s).Typ).Sup.Id;
			}
			LA131: ;
			result = prev;
		}
		LA104: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			NIM_BOOL LOC136;
			ttype225852* t;
			LOC136 = 0;
			LOC136 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 7));
			if (!(LOC136)) goto LA137;
			LOC136 = !(((*(*n).kindU.S4.Sym).Typ == NIM_NIL));
			LA137: ;
			if (!LOC136) goto LA138;
			t = (*(*n).kindU.S4.Sym).Typ;
			{
				if (!(prev == NIM_NIL)) goto LA142;
				result = t;
			}
			goto LA140;
			LA142: ;
			{
				assigntype_226210(prev, t);
				result = prev;
			}
			LA140: ;
			markused_405251((*n).Info, (*n).kindU.S4.Sym);
		}
		goto LA134;
		LA138: ;
		{
			{
				if (!!(((*(*n).kindU.S4.Sym).Kind == ((NU8) 0)))) goto LA148;
				localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
			}
			LA148: ;
			result = neworprevtype_495130(((NU8) 50), prev, c);
		}
		LA134: ;
	}
	break;
	case ((NU8) 133):
	{
		result = semobjectnode_499888(c, n, prev);
	}
	break;
	case ((NU8) 134):
	{
		result = semtuple_497228(c, n, prev);
	}
	break;
	case ((NU8) 135):
	{
		result = semtypeclass_502824(c, n, prev);
	}
	break;
	case ((NU8) 140):
	{
		result = semanyref_495786(c, n, ((NU8) 22), prev);
	}
	break;
	case ((NU8) 141):
	{
		result = semanyref_495786(c, n, ((NU8) 21), prev);
	}
	break;
	case ((NU8) 142):
	{
		result = semvartype_495897(c, n, prev);
	}
	break;
	case ((NU8) 145):
	{
		result = semdistinct_495930(c, n, prev);
	}
	break;
	case ((NU8) 136):
	{
		ttype225852* base;
		result = neworprevtype_495130(((NU8) 59), prev, c);
		base = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		rawaddson_230562(result, base);
		(*result).Flags |= ((NI32)1)<<((((NU8) 22))%(sizeof(NI32)*8));
	}
	break;
	case ((NU8) 147):
	{
		{
			NI LOC161;
			LOC161 = 0;
			LOC161 = sonslen_226249(n);
			if (!(LOC161 == 0)) goto LA162;
			result = newconstraint_495165(c, ((NU8) 49));
		}
		goto LA159;
		LA162: ;
		{
			result = semproctypewithscope_502905(c, n, prev, ((NU8) 15));
			{
				NIM_BOOL LOC167;
				tnode225816* LOC168;
				tnode225816* LOC170;
				LOC167 = 0;
				LOC168 = 0;
				LOC168 = lastson_226261(n);
				LOC167 = ((*LOC168).Kind == ((NU8) 90));
				if (!(LOC167)) goto LA169;
				LOC170 = 0;
				LOC170 = lastson_226261(n);
				LOC167 = haspragma_315628(LOC170, ((NU8) 132));
				LA169: ;
				if (!LOC167) goto LA171;
				(*result).Kind = ((NU8) 49);
				(*result).Callconv = ((NU8) 5);
			}
			goto LA165;
			LA171: ;
			{
				(*result).Flags |= ((NI32)1)<<((((NU8) 14))%(sizeof(NI32)*8));
				(*result).Callconv = ((NU8) 8);
			}
			LA165: ;
		}
		LA159: ;
	}
	break;
	case ((NU8) 146):
	{
		{
			NI LOC177;
			LOC177 = 0;
			LOC177 = sonslen_226249(n);
			if (!(LOC177 == 0)) goto LA178;
			result = newconstraint_495165(c, ((NU8) 25));
		}
		goto LA175;
		LA178: ;
		{
			result = semproctypewithscope_502905(c, n, prev, ((NU8) 12));
		}
		LA175: ;
	}
	break;
	case ((NU8) 149):
	{
		result = semenum_495173(c, n, prev);
	}
	break;
	case ((NU8) 4):
	{
		result = (*n).Typ;
	}
	break;
	case ((NU8) 128):
	{
		result = semstmtlisttype_502342(c, n, prev);
	}
	break;
	case ((NU8) 129):
	{
		result = semblocktype_502437(c, n, prev);
	}
	break;
	case ((NU8) 148):
	{
		checksonslen_291416(n, 1);
		result = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], prev);
		result = freshtype_502805(result, prev);
		(*result).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
	}
	break;
	default:
	{
		localerror_197955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
		result = neworprevtype_495130(((NU8) 50), prev, c);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semaftermacrocall_494770)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags) {
	tnode225816* result;
	tsym225846* LOC5;
	tsym225846* LOC19;
	result = 0;
	evaltemplatecounter_455330 += 1;
	{
		if (!(100 < evaltemplatecounter_455330)) goto LA3;
		globalerror_197934((*s).Info, ((NU16) 183), ((NimStringDesc*) &TMP2888));
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getmodule_235243((*s).Owner);
	(*c).Friendmodules = (tsymseq225818*) incrSeq(&((*c).Friendmodules)->Sup, sizeof(tsym225846*));
	asgnRefNoCycle((void**) (&(*c).Friendmodules->data[(*c).Friendmodules->Sup.len-1]), LOC5);
	result = n;
	{
		if (!((*(*s).Typ).Sons->data[0] == NIM_NIL)) goto LA8;
		result = semstmt_487277(c, result);
	}
	goto LA6;
	LA8: ;
	{
		switch ((*(*(*s).Typ).Sons->data[0]).Kind) {
		case ((NU8) 6):
		{
			result = semexpr_487201(c, result, flags);
		}
		break;
		case ((NU8) 7):
		{
			result = semstmt_487277(c, result);
		}
		break;
		case ((NU8) 8):
		{
			ttype225852* typ;
			{
				if (!((*n).Kind == ((NU8) 115))) goto LA16;
				(*result).Kind = ((NU8) 128);
			}
			LA16: ;
			typ = semtypenode_487269(c, result, NIM_NIL);
			asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_290763(c, typ));
		}
		break;
		default:
		{
			result = semexpr_487201(c, result, flags);
			result = fitnode_487245(c, (*(*s).Typ).Sons->data[0], result);
		}
		break;
		}
	}
	LA6: ;
	evaltemplatecounter_455330 -= 1;
	LOC19 = 0;
	LOC19 = pop_437736((&(*c).Friendmodules));
	return result;
}

N_NIMCALL(tnode225816*, semmacroexpr_488066)(tcontext290021* c, tnode225816* n, tnode225816* norig, tsym225846* sym, NU16 flags) {
	tnode225816* result;
	result = 0;
	pushinfocontext_196930((*norig).Info);
	markused_405251((*n).Info, sym);
	{
		if (!(sym == (*(*c).P).Owner)) goto LA3;
		globalerror_197934((*n).Info, ((NU16) 25), (*(*sym).Name).S);
	}
	LA3: ;
	result = evalmacrocall_477329((*c).Module, n, norig, sym);
	{
		if (!!(((flags &(1<<((((NU8) 8))&15)))!=0))) goto LA7;
		result = semaftermacrocall_494770(c, result, sym, flags);
	}
	LA7: ;
	popinfocontext_196957();
	return result;
}

N_NIMCALL(tnode225816*, semsym_528849)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags) {
	tnode225816* result;
	result = 0;
	switch ((*s).Kind) {
	case ((NU8) 10):
	{
		ttype225852* LOC2;
		markused_405251((*n).Info, s);
		LOC2 = 0;
		LOC2 = skiptypes_230245((*s).Typ, IL64(211106232576000));
		switch ((*LOC2).Kind) {
		case ((NU8) 5):
		case ((NU8) 2):
		case ((NU8) 31) ... ((NU8) 35):
		case ((NU8) 36) ... ((NU8) 39):
		case ((NU8) 18):
		case ((NU8) 19):
		case ((NU8) 40) ... ((NU8) 44):
		{
			{
				if (!((*s).Magic == ((NU16) 0))) goto LA6;
				result = inlineconst_528841(n, s);
			}
			goto LA4;
			LA6: ;
			{
				result = newsymnode_227755(s, (*n).Info);
			}
			LA4: ;
		}
		break;
		case ((NU8) 4):
		case ((NU8) 24):
		{
			{
				NI LOC12;
				LOC12 = 0;
				LOC12 = len_226364((*s).Ast);
				if (!(LOC12 == 0)) goto LA13;
				result = inlineconst_528841(n, s);
			}
			goto LA10;
			LA13: ;
			{
				result = newsymnode_227755(s, (*n).Info);
			}
			LA10: ;
		}
		break;
		default:
		{
			result = newsymnode_227755(s, (*n).Info);
		}
		break;
		}
	}
	break;
	case ((NU8) 17):
	{
		result = semmacroexpr_488066(c, n, n, s, flags);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_488055(c, n, s, flags);
	}
	break;
	case ((NU8) 8):
	case ((NU8) 9):
	case ((NU8) 11):
	case ((NU8) 3):
	case ((NU8) 21):
	{
		markused_405251((*n).Info, s);
		{
			if (!(((*s).Flags &(1<<((((NU8) 3))&31)))!=0)) goto LA22;
			(*(*(*c).P).Owner).Flags |= ((NI32)1)<<((((NU8) 11))%(sizeof(NI32)*8));
		}
		goto LA20;
		LA22: ;
		{
			NIM_BOOL LOC25;
			NIM_BOOL LOC26;
			LOC25 = 0;
			LOC26 = 0;
			LOC26 = ((*s).Kind == ((NU8) 3));
			if (!(LOC26)) goto LA27;
			LOC26 = ((*(*s).Typ).Kind == ((NU8) 59));
			LA27: ;
			LOC25 = LOC26;
			if (!(LOC25)) goto LA28;
			LOC25 = !(((*(*s).Typ).N == NIM_NIL));
			LA28: ;
			if (!LOC25) goto LA29;
			result = (*(*s).Typ).N;
			goto BeforeRet;
		}
		goto LA20;
		LA29: ;
		LA20: ;
		result = newsymnode_227755(s, (*n).Info);
	}
	break;
	case ((NU8) 4):
	{
		{
			if (!((*(*s).Typ).Kind == ((NU8) 59))) goto LA34;
			result = newsymnode_227755(s, (*n).Info);
			asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
		}
		goto LA32;
		LA34: ;
		{
			if (!!(((*s).Ast == NIM_NIL))) goto LA37;
			result = semexpr_487201(c, (*s).Ast, 0);
		}
		goto LA32;
		LA37: ;
		{
			asgnRefNoCycle((void**) (&(*n).Typ), (*s).Typ);
			result = n;
			goto BeforeRet;
		}
		LA32: ;
	}
	break;
	case ((NU8) 7):
	{
		markused_405251((*n).Info, s);
		{
			NIM_BOOL LOC43;
			LOC43 = 0;
			LOC43 = ((*(*s).Typ).Kind == ((NU8) 59));
			if (!(LOC43)) goto LA44;
			LOC43 = !(((*(*s).Typ).N == NIM_NIL));
			LA44: ;
			if (!LOC43) goto LA45;
			result = (*(*s).Typ).N;
			goto BeforeRet;
		}
		LA45: ;
		result = newsymnode_227755(s, (*n).Info);
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_290763(c, (*s).Typ));
	}
	break;
	default:
	{
		markused_405251((*n).Info, s);
		result = newsymnode_227755(s, (*n).Info);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(void, markindirect_291366)(tcontext290021* c, tsym225846* s) {
	{
		if (!((126976 &(1<<(((*s).Kind)&31)))!=0)) goto LA3;
		(*s).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, semfieldaccess_528617)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = builtinfieldaccess_535726(c, n, flags);
	{
		if (!(result == NIM_NIL)) goto LA3;
		result = dottransformation_536736(c, n);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, maybelifttype_530141)(ttype225852** t, tcontext290021* c, tlineinfo195539 info) {
	tscope225840* LOC1;
	ttype225852* lifted;
	tnode225816* LOC2;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	LOC2 = 0;
	LOC2 = newnodei_226138(((NU8) 151), info);
	lifted = liftparamtype_500291(c, ((NU8) 7), LOC2, (*t), ((NimStringDesc*) &TMP3255), info, NIM_FALSE);
	closescope_295211(c);
	{
		if (!!((lifted == NIM_NIL))) goto LA5;
		unsureAsgnRef((void**) (&(*t)), lifted);
	}
	LA5: ;
}

N_NIMCALL(tnode225816*, inferwithmetatype_487450)(tcontext290021* c, ttype225852* formal, tnode225816* arg, NIM_BOOL coercedistincts) {
	tnode225816* result;
	tcandidate405209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405270(c, (&m), formal);
	m.Coercedistincts = coercedistincts;
	result = paramtypesmatch_412263((&m), formal, (*arg).Typ, arg, NIM_NIL);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = m.Genericconverter;
		if (!(LOC3)) goto LA4;
		LOC3 = !((result == NIM_NIL));
		LA4: ;
		if (!LOC3) goto LA5;
		instgenericconvertersarg_493289(c, result, (&m));
	}
	LA5: ;
	{
		ttype225852* LOC11;
		if (!!((result == NIM_NIL))) goto LA9;
		LOC11 = 0;
		LOC11 = skiptypes_230245(formal, IL64(18014398509481984));
		asgnRefNoCycle((void**) (&(*result).Typ), generatetypeinstance_320503(c, m.Bindings, (*arg).Info, LOC11));
	}
	goto LA7;
	LA9: ;
	{
		typemismatch_487357(arg, formal, (*arg).Typ);
		result = copytree_226329(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), formal);
	}
	LA7: ;
	return result;
}

N_NIMCALL(NU8, checkconversionbetweenobjects_529809)(ttype225852* castdest, ttype225852* src) {
	NU8 result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = inheritancediff_270588(castdest, src);
		if (!(LOC3 == 2147483647)) goto LA4;
		result = ((NU8) 2);
	}
	goto LA1;
	LA4: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, checkconvertible_529823)(tcontext290021* c, ttype225852* castdest, ttype225852* src) {
	NU8 result;
	ttype225852* d;
	ttype225852* s;
	result = 0;
	result = ((NU8) 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametype_268351(castdest, src, 0);
		if (!(LOC3)) goto LA4;
		LOC3 = ((*castdest).Sym == (*src).Sym);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			if (!!(((*castdest).Kind >= ((NU8) 1) && (*castdest).Kind <= ((NU8) 2) || (*castdest).Kind == ((NU8) 14) || (*castdest).Kind == ((NU8) 20) || (*castdest).Kind >= ((NU8) 31) && (*castdest).Kind <= ((NU8) 44)))) goto LA9;
			result = ((NU8) 1);
		}
		LA9: ;
		goto BeforeRet;
	}
	LA5: ;
	d = skiptypes_230245(castdest, IL64(211106240964864));
	s = skiptypes_230245(src, IL64(211106240964608));
	{
		while (1) {
			NIM_BOOL LOC13;
			NIM_BOOL LOC14;
			LOC13 = 0;
			LOC14 = 0;
			LOC14 = !((d == NIM_NIL));
			if (!(LOC14)) goto LA15;
			LOC14 = ((*d).Kind == ((NU8) 21) || (*d).Kind == ((NU8) 22));
			LA15: ;
			LOC13 = LOC14;
			if (!(LOC13)) goto LA16;
			LOC13 = ((*d).Kind == (*s).Kind);
			LA16: ;
			if (!LOC13) goto LA12;
			d = lastson_226267(d);
			s = lastson_226267(s);
		} LA12: ;
	}
	{
		if (!(d == NIM_NIL)) goto LA19;
		result = ((NU8) 2);
	}
	goto LA17;
	LA19: ;
	{
		NIM_BOOL LOC22;
		LOC22 = 0;
		LOC22 = ((*d).Kind == ((NU8) 17));
		if (!(LOC22)) goto LA23;
		LOC22 = ((*s).Kind == ((NU8) 17));
		LA23: ;
		if (!LOC22) goto LA24;
		result = checkconversionbetweenobjects_529809(d, s);
	}
	goto LA17;
	LA24: ;
	{
		NIM_BOOL LOC27;
		ttype225852* LOC28;
		ttype225852* LOC30;
		LOC27 = 0;
		LOC28 = 0;
		LOC28 = skiptypes_230245(castdest, IL64(211106242013440));
		LOC27 = ((*LOC28).Kind == ((NU8) 1) || (*LOC28).Kind == ((NU8) 14) || (*LOC28).Kind == ((NU8) 2) || (*LOC28).Kind >= ((NU8) 31) && (*LOC28).Kind <= ((NU8) 44));
		if (!(LOC27)) goto LA29;
		LOC30 = 0;
		LOC30 = skiptypes_230245(src, IL64(211106242013184));
		LOC27 = ((*LOC30).Kind == ((NU8) 1) || (*LOC30).Kind == ((NU8) 14) || (*LOC30).Kind == ((NU8) 2) || (*LOC30).Kind >= ((NU8) 31) && (*LOC30).Kind <= ((NU8) 44));
		LA29: ;
		if (!LOC27) goto LA31;
	}
	goto LA17;
	LA31: ;
	{
		NU8 LOC34;
		LOC34 = 0;
		LOC34 = cmptypes_411293(c, d, s);
		switch (LOC34) {
		case ((NU8) 0):
		case ((NU8) 7):
		{
			{
				NIM_BOOL LOC38;
				LOC38 = 0;
				LOC38 = comparetypes_270571(castdest, src, ((NU8) 1), 0);
				if (!!(LOC38)) goto LA39;
				result = ((NU8) 2);
			}
			LA39: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA17: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semconv_530168)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* targettype;
	tnode225816* LOC6;
	tnode225816* LOC7;
	tnode225816* op;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_197955((*n).Info, ((NU16) 161), ((NimStringDesc*) &TMP2888));
		result = n;
		goto BeforeRet;
	}
	LA4: ;
	result = newnodei_226138(((NU8) 60), (*n).Info);
	targettype = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_226698(n, 0);
	maybelifttype_530141(&targettype, c, (*LOC6).Info);
	LOC7 = 0;
	LOC7 = copytree_226329((*n).kindU.S6.Sons->data[0]);
	addson_226287(result, LOC7);
	op = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 0);
	{
		NIM_BOOL LOC10;
		tnode225816* final;
		LOC10 = 0;
		LOC10 = ismetatype_226752(targettype);
		if (!LOC10) goto LA11;
		final = inferwithmetatype_487450(c, targettype, op, NIM_TRUE);
		addson_226287(result, final);
		asgnRefNoCycle((void**) (&(*result).Typ), (*final).Typ);
		goto BeforeRet;
	}
	LA11: ;
	asgnRefNoCycle((void**) (&(*result).Typ), targettype);
	addson_226287(result, op);
	{
		NIM_BOOL LOC15;
		NU8 status;
		LOC15 = 0;
		LOC15 = issymchoice_530121(op);
		if (!!(LOC15)) goto LA16;
		status = checkconvertible_529823(c, (*result).Typ, (*op).Typ);
		switch (status) {
		case ((NU8) 0):
		{
			{
				NIM_BOOL LOC21;
				LOC21 = 0;
				LOC21 = ((*op).Kind == ((NU8) 3));
				if (!(LOC21)) goto LA22;
				LOC21 = isgenericroutine_232649((*op).kindU.S4.Sym);
				LA22: ;
				if (!LOC21) goto LA23;
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), fitnode_487245(c, (*result).Typ, (*result).kindU.S6.Sons->data[1]));
			}
			LA23: ;
		}
		break;
		case ((NU8) 1):
		{
			NimStringDesc* LOC26;
			LOC26 = 0;
			LOC26 = typetostring_263031((*result).Typ, ((NU8) 0));
			message_197976((*n).Info, ((NU16) 264), LOC26);
		}
		break;
		case ((NU8) 2):
		{
			NimStringDesc* LOC28;
			TY169969 LOC29;
			NimStringDesc* LOC30;
			LOC28 = 0;
			LOC28 = msgkindtostring_197378(((NU16) 142));
			memset((void*)LOC29, 0, sizeof(LOC29));
			LOC29[0] = typetostring_263031((*op).Typ, ((NU8) 0));
			LOC29[1] = typetostring_263031((*result).Typ, ((NU8) 0));
			LOC30 = 0;
			LOC30 = nsuFormatOpenArray(LOC28, LOC29, 2);
			localerror_197955((*n).Info, ((NU16) 4), LOC30);
		}
		break;
		}
	}
	goto LA13;
	LA16: ;
	{
		{
			NI i_530287;
			NI HEX3Atmp_530444;
			NI LOC33;
			NI res_530447;
			i_530287 = 0;
			HEX3Atmp_530444 = 0;
			LOC33 = 0;
			LOC33 = sonslen_226249(op);
			HEX3Atmp_530444 = (NI32)(LOC33 - 1);
			res_530447 = 0;
			{
				while (1) {
					tnode225816* it;
					NU8 status;
					if (!(res_530447 <= HEX3Atmp_530444)) goto LA35;
					i_530287 = res_530447;
					it = (*op).kindU.S6.Sons->data[i_530287];
					status = checkconvertible_529823(c, (*result).Typ, (*it).Typ);
					{
						if (!((3 &(1<<((status)&7)))!=0)) goto LA38;
						markused_405251((*n).Info, (*it).kindU.S4.Sym);
						markindirect_291366(c, (*it).kindU.S4.Sym);
						result = it;
						goto BeforeRet;
					}
					LA38: ;
					res_530447 += 1;
				} LA35: ;
			}
		}
		localerror_197955((*n).Info, ((NU16) 62), (*(*(*(*op).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	LA13: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, checkinitialized_541997)(tnode225816* n, intset222056 ids, tlineinfo195539 info) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_542014;
			NI HEX3Atmp_542257;
			NI LOC3;
			NI res_542260;
			i_542014 = 0;
			HEX3Atmp_542257 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226249(n);
			HEX3Atmp_542257 = (NI32)(LOC3 - 1);
			res_542260 = 0;
			{
				while (1) {
					if (!(res_542260 <= HEX3Atmp_542257)) goto LA5;
					i_542014 = res_542260;
					checkinitialized_541997((*n).kindU.S6.Sons->data[i_542014], ids, info);
					res_542260 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA9;
			internalerror_197987(info, ((NimStringDesc*) &TMP3257));
		}
		LA9: ;
		checkinitialized_541997((*n).kindU.S6.Sons->data[0], ids, info);
	}
	break;
	case ((NU8) 3):
	{
		{
			NIM_BOOL LOC14;
			NIM_BOOL LOC16;
			NimStringDesc* LOC19;
			LOC14 = 0;
			LOC14 = (((*(*(*n).kindU.S4.Sym).Typ).Flags &(1<<((((NU8) 17))&31)))!=0);
			if (!(LOC14)) goto LA15;
			LOC16 = 0;
			LOC16 = contains_222837(ids, (*(*(*n).kindU.S4.Sym).Name).Sup.Id);
			LOC14 = !(LOC16);
			LA15: ;
			if (!LOC14) goto LA17;
			LOC19 = 0;
			LOC19 = rawNewString((*(*(*n).kindU.S4.Sym).Name).S->Sup.len + 23);
appendString(LOC19, ((NimStringDesc*) &TMP3258));
appendString(LOC19, (*(*(*n).kindU.S4.Sym).Name).S);
			message_197976(info, ((NU16) 4), LOC19);
		}
		LA17: ;
	}
	break;
	default:
	{
		internalerror_197987(info, ((NimStringDesc*) &TMP3257));
	}
	break;
	}
}

N_NIMCALL(tnode225816*, semobjconstr_534462)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	ttype225852* t;
	ttype225852* objtype;
	intset222056 ids;
	result = 0;
	t = semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	result = n;
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	(*result).Kind = ((NU8) 38);
	t = skiptypes_230245(t, 2048);
	{
		if (!((*t).Kind == ((NU8) 22))) goto LA3;
		t = skiptypes_230245((*t).Sons->data[0], 2048);
	}
	LA3: ;
	{
		if (!!(((*t).Kind == ((NU8) 17)))) goto LA7;
		localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3256));
		goto BeforeRet;
	}
	LA7: ;
	objtype = t;
	memset((void*)(&ids), 0, sizeof(ids));
	chckNil((void*)(&ids));
	memset((void*)(&ids), 0, sizeof(ids));
	initintset_222950((&ids));
	{
		NI i_542338;
		NI HEX3Atmp_542669;
		NI LOC10;
		NI res_542672;
		i_542338 = 0;
		HEX3Atmp_542669 = 0;
		LOC10 = 0;
		LOC10 = len_226364(n);
		HEX3Atmp_542669 = (LOC10 - 1);
		res_542672 = 1;
		{
			while (1) {
				tnode225816* it;
				tident200021* id;
				tnode225816* e;
				tnode225816* check;
				tsym225846* f;
				if (!(res_542672 <= HEX3Atmp_542669)) goto LA12;
				i_542338 = res_542672;
				it = (*n).kindU.S6.Sons->data[i_542338];
				{
					NIM_BOOL LOC15;
					LOC15 = 0;
					LOC15 = !(((*it).Kind == ((NU8) 34)));
					if (LOC15) goto LA16;
					LOC15 = !(((*(*it).kindU.S6.Sons->data[0]).Kind == ((NU8) 3) || (*(*it).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)));
					LA16: ;
					if (!LOC15) goto LA17;
					localerror_197955((*n).Info, ((NU16) 170), ((NimStringDesc*) &TMP2888));
					goto LA9;
				}
				LA17: ;
				id = 0;
				{
					if (!((*(*it).kindU.S6.Sons->data[0]).Kind == ((NU8) 2))) goto LA21;
					id = (*(*it).kindU.S6.Sons->data[0]).kindU.S5.Ident;
				}
				goto LA19;
				LA21: ;
				{
					id = (*(*(*it).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name;
				}
				LA19: ;
				{
					NIM_BOOL LOC26;
					LOC26 = 0;
					LOC26 = containsorincl_222916((&ids), (*id).Sup.Id);
					if (!LOC26) goto LA27;
					localerror_197955((*it).Info, ((NU16) 86), (*id).S);
				}
				LA27: ;
				e = semexprwithtype_487211(c, (*it).kindU.S6.Sons->data[1], (flags & 32));
				check = NIM_NIL;
				f = 0;
				t = objtype;
				{
					while (1) {
						check = NIM_NIL;
						f = lookupinrecordandbuildcheck_535216(c, it, (*t).N, id, &check);
						{
							if (!!((f == NIM_NIL))) goto LA33;
							goto LA29;
						}
						LA33: ;
						{
							if (!((*t).Sons->data[0] == NIM_NIL)) goto LA37;
							goto LA29;
						}
						LA37: ;
						t = skiptypes_230245((*t).Sons->data[0], 2048);
					}
				} LA29: ;
				{
					NIM_BOOL LOC41;
					LOC41 = 0;
					LOC41 = !((f == NIM_NIL));
					if (!(LOC41)) goto LA42;
					LOC41 = fieldvisible_414842(c, f);
					LA42: ;
					if (!LOC41) goto LA43;
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), newsymnode_226132(f));
					e = fitnode_487245(c, (*f).Typ, e);
					{
						if (!!((check == NIM_NIL))) goto LA47;
						asgnRefNoCycle((void**) (&(*check).kindU.S6.Sons->data[0]), (*it).kindU.S6.Sons->data[0]);
						add_226498(it, check);
					}
					LA47: ;
				}
				goto LA39;
				LA43: ;
				{
					localerror_197955((*it).Info, ((NU16) 80), (*id).S);
				}
				LA39: ;
				asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), e);
				res_542672 += 1;
			} LA12: ;
		}
	} LA9: ;
	{
		if (!(((*objtype).Flags &(1<<((((NU8) 17))&31)))!=0)) goto LA52;
		{
			while (1) {
				checkinitialized_541997((*objtype).N, ids, (*n).Info);
				{
					if (!((*objtype).Sons->data[0] == NIM_NIL)) goto LA58;
					goto LA54;
				}
				LA58: ;
				objtype = skiptypes_230245((*objtype).Sons->data[0], 2048);
			}
		} LA54: ;
	}
	LA52: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym225846*, lookupfordefined_538750)(tcontext290021* c, tident200021* i, NIM_BOOL onlycurrentscope) {
	tsym225846* result;
	result = 0;
	{
		if (!onlycurrentscope) goto LA3;
		result = localsearchinscope_295301(c, i);
	}
	goto LA1;
	LA3: ;
	{
		result = searchinscopes_295312(c, i);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym225846*, lookupfordefined_538759)(tcontext290021* c, tnode225816* n, NIM_BOOL onlycurrentscope) {
	tsym225846* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		result = lookupfordefined_538750(c, (*n).kindU.S5.Ident, onlycurrentscope);
	}
	break;
	case ((NU8) 45):
	{
		tsym225846* m;
		result = NIM_NIL;
		{
			if (!onlycurrentscope) goto LA5;
			goto BeforeRet;
		}
		LA5: ;
		checksonslen_291416(n, 2);
		m = lookupfordefined_538759(c, (*n).kindU.S6.Sons->data[0], onlycurrentscope);
		{
			NIM_BOOL LOC9;
			tident200021* ident;
			tnode225816* LOC13;
			LOC9 = 0;
			LOC9 = !((m == NIM_NIL));
			if (!(LOC9)) goto LA10;
			LOC9 = ((*m).Kind == ((NU8) 6));
			LA10: ;
			if (!LOC9) goto LA11;
			LOC13 = 0;
			LOC13 = HEX5BHEX5D_226698(n, 1);
			ident = considerquotedident_295010(LOC13);
			{
				if (!(m == (*c).Module)) goto LA16;
				result = strtableget_235111((*(*c).Toplevelscope).Symbols, ident);
			}
			goto LA14;
			LA16: ;
			{
				result = strtableget_235111((*m).kindU.S3.Tab, ident);
			}
			LA14: ;
		}
		LA11: ;
	}
	break;
	case ((NU8) 53):
	{
		tident200021* LOC20;
		LOC20 = 0;
		LOC20 = considerquotedident_295010(n);
		result = lookupfordefined_538750(c, LOC20, onlycurrentscope);
	}
	break;
	case ((NU8) 3):
	{
		result = (*n).kindU.S4.Sym;
	}
	break;
	case ((NU8) 57):
	case ((NU8) 56):
	{
		result = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	}
	break;
	default:
	{
		NimStringDesc* LOC24;
		LOC24 = 0;
		LOC24 = rendertree_250058(n, 0);
		localerror_197955((*n).Info, ((NU16) 19), LOC24);
		result = NIM_NIL;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semdefined_538896)(tcontext290021* c, tnode225816* n, NIM_BOOL onlycurrentscope) {
	tnode225816* result;
	result = 0;
	checksonslen_291416(n, 2);
	result = newintnode_226096(((NU8) 6), IL64(0));
	{
		NIM_BOOL LOC3;
		tnode225816* LOC5;
		tident200021* LOC6;
		LOC3 = 0;
		LOC3 = !(onlycurrentscope);
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_226698(n, 0);
		LOC6 = 0;
		LOC6 = considerquotedident_295010(LOC5);
		LOC3 = eqStrings((*LOC6).S, ((NimStringDesc*) &TMP3259));
		LA4: ;
		if (!LOC3) goto LA7;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 2)))) goto LA11;
			localerror_197966((*n).Info, ((NimStringDesc*) &TMP3260));
		}
		goto LA9;
		LA11: ;
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = isdefined_201046((*(*n).kindU.S6.Sons->data[1]).kindU.S5.Ident);
			if (!LOC14) goto LA15;
			(*result).kindU.S1.Intval = IL64(1);
		}
		goto LA9;
		LA15: ;
		{
			NIM_BOOL LOC18;
			NimStringDesc* LOC21;
			tnode225816* LOC22;
			LOC18 = 0;
			LOC18 = isdeclared_201056((*(*n).kindU.S6.Sons->data[1]).kindU.S5.Ident);
			if (!!(LOC18)) goto LA19;
			LOC21 = 0;
			LOC22 = 0;
			LOC22 = HEX5BHEX5D_226698(n, 1);
			LOC21 = rawNewString((*(*LOC22).kindU.S5.Ident).S->Sup.len + 59);
appendString(LOC21, ((NimStringDesc*) &TMP3261));
appendString(LOC21, (*(*LOC22).kindU.S5.Ident).S);
			message_197976((*n).Info, ((NU16) 258), LOC21);
		}
		goto LA9;
		LA19: ;
		LA9: ;
	}
	goto LA1;
	LA7: ;
	{
		tsym225846* LOC24;
		LOC24 = 0;
		LOC24 = lookupfordefined_538759(c, (*n).kindU.S6.Sons->data[1], onlycurrentscope);
		if (!!((LOC24 == NIM_NIL))) goto LA25;
		(*result).kindU.S1.Intval = IL64(1);
	}
	goto LA1;
	LA25: ;
	LA1: ;
	(*result).Info = (*n).Info;
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 1)));
	return result;
}

N_NIMCALL(tnode225816*, setms_540228)(tnode225816* n, tsym225846* s) {
	tnode225816* result;
	result = 0;
	result = n;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_226132(s));
	(*(*n).kindU.S6.Sons->data[0]).Info = (*n).Info;
	return result;
}

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

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

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

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

N_NIMCALL(tnode225816*, tryexpr_487317)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* volatile result;
	NI olderrorcount;
	NI olderrormax;
	tscope225840* oldscope;
	tscope225840* LOC1;
	NI oldownerlen;
	TY290133* oldgenerics;
	NU8 olderroroutputs;
	NI oldcontextlen;
	NI oldingenericcontext;
	NI oldinunrolledcontext;
	NI oldingenericinst;
	tproccon290011* oldproccon;
	TSafePoint TMP3262;
	result = 0;
	olderrorcount = gerrorcounter_196306;
	olderrormax = gerrormax_196309;
	(*c).Incompilescontext += 1;
	gerrormax_196309 = 2147483647;
	oldscope = (*c).Currentscope;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	oldownerlen = gowners_290293->Sup.len;
	oldgenerics = (*c).Generics;
	olderroroutputs = erroroutputs_196440;
	erroroutputs_196440 = 0;
	oldcontextlen = getinfocontextlen_196885();
	oldingenericcontext = (*c).Ingenericcontext;
	oldinunrolledcontext = (*c).Inunrolledcontext;
	oldingenericinst = (*c).Ingenericinst;
	oldproccon = (*c).P;
	if ((*c).Generics) nimGCunrefNoCycle((*c).Generics);
	(*c).Generics = (TY290133*) newSeqRC1((&NTI290133), 0);
	pushSafePoint(&TMP3262);
	TMP3262.status = _setjmp(TMP3262.context);
	if (TMP3262.status == 0) {
		result = semexpr_487201(c, n, flags);
		{
			if (!!((gerrorcounter_196306 == olderrorcount))) goto LA5;
			result = NIM_NIL;
		}
		LA5: ;
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI195545))) {
			TMP3262.status = 0;
			popCurrentException();
		}
	}
	if (TMP3262.status != 0) reraiseException();
	genericSeqAssign((&(*c).Generics), oldgenerics, (&NTI290133));
	(*c).Ingenericcontext = oldingenericcontext;
	(*c).Inunrolledcontext = oldinunrolledcontext;
	(*c).Ingenericinst = oldingenericinst;
	asgnRef((void**) (&(*c).P), oldproccon);
	setinfocontextlen_196905(oldcontextlen);
	gowners_290293 = (tsymseq225818*) setLengthSeq(&(gowners_290293)->Sup, sizeof(tsym225846*), oldownerlen);
	asgnRef((void**) (&(*c).Currentscope), oldscope);
	(*c).Incompilescontext -= 1;
	erroroutputs_196440 = olderroroutputs;
	gerrorcounter_196306 = olderrorcount;
	gerrormax_196309 = olderrormax;
	return result;
}

N_NIMCALL(tnode225816*, semcompiles_540100)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tnode225816* LOC6;
	tnode225816* LOC7;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!!((LOC3 == 2))) goto LA4;
		result = semdirectop_488032(c, n, flags);
		goto BeforeRet;
	}
	LA4: ;
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_226698(n, 1);
	LOC7 = 0;
	LOC7 = tryexpr_487317(c, LOC6, flags);
	result = newintnode_226096(((NU8) 6), ((NI64) (!((LOC7 == NIM_NIL)))));
	(*result).Info = (*n).Info;
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 1)));
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semsizeof_530646)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_197955((*n).Info, ((NU16) 69), ((NimStringDesc*) &TMP3263));
	}
	goto LA1;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 16));
	}
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_282030(((NU8) 31)));
	result = n;
	return result;
}

N_NIMCALL(tnode225816*, isopimpl_488048)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* t1;
	tnode225816* LOC16;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NI LOC6;
		tnode225816* LOC8;
		tnode225816* LOC10;
		tnode225816* LOC12;
		NimStringDesc* LOC15;
		LOC3 = 0;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = sonslen_226249(n);
		LOC5 = (LOC6 == 3);
		if (!(LOC5)) goto LA7;
		LOC8 = 0;
		LOC8 = HEX5BHEX5D_226698(n, 1);
		LOC5 = !(((*LOC8).Typ == NIM_NIL));
		LA7: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA9;
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_226698(n, 1);
		LOC4 = ((*(*LOC10).Typ).Kind == ((NU8) 8));
		LA9: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA11;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(n, 2);
		LOC3 = ((*LOC12).Kind >= ((NU8) 20) && (*LOC12).Kind <= ((NU8) 22) || (*LOC12).Kind == ((NU8) 4));
		LA11: ;
		if (!!(LOC3)) goto LA13;
		LOC15 = 0;
		LOC15 = HEX24_198126(TMP3265);
		internalerror_198006(LOC15);
	}
	LA13: ;
	LOC16 = 0;
	LOC16 = HEX5BHEX5D_226698(n, 1);
	t1 = skiptypes_230245((*LOC16).Typ, IL64(2305843009213694208));
	{
		tnode225816* LOC19;
		tnode225816* LOC22;
		NimStringDesc* LOC23;
		LOC19 = 0;
		LOC19 = HEX5BHEX5D_226698(n, 2);
		if (!((*LOC19).Kind >= ((NU8) 20) && (*LOC19).Kind <= ((NU8) 22))) goto LA20;
		LOC22 = 0;
		LOC22 = HEX5BHEX5D_226698(n, 2);
		LOC23 = 0;
		LOC23 = nsuNormalize((*LOC22).kindU.S3.Strval);
		if (eqStrings(LOC23, ((NimStringDesc*) &TMP3266))) goto LA24;
		goto LA25;
		LA24: ;
		{
			ttype225852* t;
			NIM_BOOL LOC28;
			NIM_BOOL LOC29;
			t = skiptypes_230245(t1, IL64(211106233624832));
			LOC28 = 0;
			LOC29 = 0;
			LOC29 = ((*t).Kind == ((NU8) 25));
			if (!(LOC29)) goto LA30;
			LOC29 = ((*t).Callconv == ((NU8) 8));
			LA30: ;
			LOC28 = LOC29;
			if (!(LOC28)) goto LA31;
			LOC28 = !((((*t).Flags &(1<<((((NU8) 14))&31)))!=0));
			LA31: ;
			result = newintnode_226096(((NU8) 6), ((NI64) (LOC28)));
		}
		goto LA26;
		LA25: ;
		{
		}
		LA26: ;
	}
	goto LA17;
	LA20: ;
	{
		ttype225852* t2;
		tnode225816* LOC34;
		tcandidate405209 m;
		NIM_BOOL match;
		NU8 LOC35;
		LOC34 = 0;
		LOC34 = HEX5BHEX5D_226698(n, 2);
		t2 = skiptypes_230245((*LOC34).Typ, 256);
		maybelifttype_530141(&t2, c, (*n).Info);
		memset((void*)(&m), 0, sizeof(m));
		initcandidate_405270(c, (&m), t2);
		LOC35 = 0;
		LOC35 = typerel_406436((&m), t2, t1, NIM_TRUE);
		match = !((LOC35 == ((NU8) 0)));
		result = newintnode_226096(((NU8) 6), ((NI64) (match)));
	}
	LA17: ;
	asgnRefNoCycle((void**) (&(*result).Typ), (*n).Typ);
	return result;
}

N_NIMCALL(tnode225816*, semis_531075)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* LOC6;
	ttype225852* lhstype;
	tnode225816* LOC14;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!!((LOC3 == 3))) goto LA4;
		localerror_197955((*n).Info, ((NU16) 204), ((NimStringDesc*) &TMP3264));
	}
	LA4: ;
	result = n;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_282030(((NU8) 1)));
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_226698(n, 1);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, LOC6, 18));
	{
		tnode225816* LOC9;
		ttype225852* t2;
		tnode225816* LOC12;
		tnode225816* LOC13;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_226698(n, 2);
		if (!!(((*LOC9).Kind >= ((NU8) 20) && (*LOC9).Kind <= ((NU8) 22)))) goto LA10;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(n, 2);
		t2 = semtypenode_487269(c, LOC12, NIM_NIL);
		LOC13 = 0;
		LOC13 = HEX5BHEX5D_226698(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), newnodeit_226145(((NU8) 4), (*LOC13).Info, t2));
	}
	LA10: ;
	LOC14 = 0;
	LOC14 = HEX5BHEX5D_226698(n, 1);
	lhstype = (*LOC14).Typ;
	{
		tnode225816* LOC19;
		if (!!(((*lhstype).Kind == ((NU8) 8)))) goto LA17;
		LOC19 = 0;
		LOC19 = HEX5BHEX5D_226698(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), maketypesymnode_290798(c, lhstype, (*LOC19).Info));
	}
	goto LA15;
	LA17: ;
	{
		ttype225852* LOC21;
		LOC21 = 0;
		LOC21 = base_263038(lhstype);
		if (!((*LOC21).Kind == ((NU8) 0))) goto LA22;
		goto BeforeRet;
	}
	goto LA15;
	LA22: ;
	LA15: ;
	{
		tnode225816* LOC26;
		ttype225852* LOC27;
		NIM_BOOL LOC28;
		LOC26 = 0;
		LOC26 = HEX5BHEX5D_226698(n, 1);
		LOC27 = 0;
		LOC27 = base_263038((*LOC26).Typ);
		LOC28 = 0;
		LOC28 = containsgenerictype_272929(LOC27);
		if (!!(LOC28)) goto LA29;
		result = isopimpl_488048(c, n);
	}
	LA29: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semof_530683)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NI LOC3;
		ttype225852* a;
		ttype225852* b;
		ttype225852* x;
		ttype225852* y;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 3)) goto LA4;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 0));
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[2], 16));
		a = skiptypes_230245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(211106247256320));
		b = skiptypes_230245((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106247256320));
		x = skiptypes_230245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(211106247256064));
		y = skiptypes_230245((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106247256064));
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = ((*x).Kind == ((NU8) 8));
			if (LOC8) goto LA9;
			LOC8 = !(((*y).Kind == ((NU8) 8)));
			LA9: ;
			if (!LOC8) goto LA10;
			localerror_197955((*n).Info, ((NU16) 205), ((NimStringDesc*) &TMP3267));
		}
		goto LA6;
		LA10: ;
		{
			NIM_BOOL LOC13;
			LOC13 = 0;
			LOC13 = !(((*b).Kind == ((NU8) 17)));
			if (LOC13) goto LA14;
			LOC13 = !(((*a).Kind == ((NU8) 17)));
			LA14: ;
			if (!LOC13) goto LA15;
			localerror_197955((*n).Info, ((NU16) 205), ((NimStringDesc*) &TMP3267));
		}
		goto LA6;
		LA15: ;
		{
			NI diff;
			diff = inheritancediff_270588(a, b);
			{
				NimStringDesc* LOC22;
				if (!(diff <= 0)) goto LA20;
				LOC22 = 0;
				LOC22 = rendertree_250058(n, 0);
				message_197976((*n).Info, ((NU16) 272), LOC22);
				result = newintnode_226096(((NU8) 6), IL64(1));
				(*result).Info = (*n).Info;
				asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 1)));
				goto BeforeRet;
			}
			goto LA18;
			LA20: ;
			{
				NimStringDesc* LOC26;
				if (!(diff == 2147483647)) goto LA24;
				LOC26 = 0;
				LOC26 = typetostring_263031(a, ((NU8) 0));
				localerror_197955((*n).Info, ((NU16) 206), LOC26);
			}
			goto LA18;
			LA24: ;
			LA18: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		localerror_197955((*n).Info, ((NU16) 204), ((NimStringDesc*) &TMP3267));
	}
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_282030(((NU8) 1)));
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym225846*, expectmacroortemplatecall_488025)(tcontext290021* c, tnode225816* n) {
	tsym225846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tsym225846* expandedsym;
		tnode225816* LOC6;
		LOC3 = 0;
		LOC3 = iscallexpr_226335(n);
		if (!LOC3) goto LA4;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_226698(n, 0);
		expandedsym = qualifiedlookup_296122(c, LOC6, 2);
		{
			tnode225816* LOC11;
			NimStringDesc* LOC12;
			tnode225816* LOC13;
			if (!(expandedsym == NIM_NIL)) goto LA9;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_226698(n, 0);
			LOC12 = 0;
			LOC12 = rendertree_250058(LOC11, 0);
			localerror_197955((*n).Info, ((NU16) 61), LOC12);
			LOC13 = 0;
			LOC13 = HEX5BHEX5D_226698(n, 0);
			result = errorsym_295412(c, LOC13);
			goto BeforeRet;
		}
		LA9: ;
		{
			tnode225816* LOC18;
			if (!!(((393216 &(1<<(((*expandedsym).Kind)&31)))!=0))) goto LA16;
			localerror_197955((*n).Info, ((NU16) 216), (*(*expandedsym).Name).S);
			LOC18 = 0;
			LOC18 = HEX5BHEX5D_226698(n, 0);
			result = errorsym_295412(c, LOC18);
			goto BeforeRet;
		}
		LA16: ;
		result = expandedsym;
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* LOC20;
		LOC20 = 0;
		LOC20 = rendertree_250058(n, 0);
		localerror_197955((*n).Info, ((NU16) 216), LOC20);
		result = errorsym_295412(c, n);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semexpandtoast_539286)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* macrocall;
	tsym225846* expandedsym;
	tsym225846* LOC15;
	result = 0;
	macrocall = HEX5BHEX5D_226698(n, 1);
	expandedsym = expectmacroortemplatecall_488025(c, macrocall);
	{
		if (!((*expandedsym).Kind == ((NU8) 0))) goto LA3;
		result = n;
		goto BeforeRet;
	}
	LA3: ;
	asgnRefNoCycle((void**) (&(*macrocall).kindU.S6.Sons->data[0]), newsymnode_227755(expandedsym, (*macrocall).Info));
	markused_405251((*n).Info, expandedsym);
	{
		NI i_539413;
		NI HEX3Atmp_539512;
		NI LOC6;
		NI res_539515;
		i_539413 = 0;
		HEX3Atmp_539512 = 0;
		LOC6 = 0;
		LOC6 = len_226364(macrocall);
		HEX3Atmp_539512 = (NI32)(LOC6 - 1);
		res_539515 = 1;
		{
			while (1) {
				tnode225816* LOC9;
				if (!(res_539515 <= HEX3Atmp_539512)) goto LA8;
				i_539413 = res_539515;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_226698(macrocall, i_539413);
				asgnRefNoCycle((void**) (&(*macrocall).kindU.S6.Sons->data[i_539413]), semexprwithtype_487211(c, LOC9, 0));
				res_539515 += 1;
			} LA8: ;
		}
	}
	{
		NimStringDesc* LOC14;
		if (!!(((*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic == ((NU16) 16)))) goto LA12;
		LOC14 = 0;
		LOC14 = HEX24_198126(TMP3268);
		internalerror_198006(LOC14);
	}
	LA12: ;
	LOC15 = 0;
	LOC15 = getsyssym_282054(((NimStringDesc*) &TMP3269));
	asgnRefNoCycle((void**) (&(*n).Typ), (*LOC15).Typ);
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semexpandtoast_539529)(tcontext290021* c, tnode225816* n, tsym225846* magicsym, NU16 flags) {
	tnode225816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 2)) goto LA4;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227755(magicsym, (*n).Info));
		result = semexpandtoast_539286(c, n);
	}
	goto LA1;
	LA4: ;
	{
		result = semdirectop_488032(c, n, flags);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, expectstring_539098)(tcontext290021* c, tnode225816* n_539101) {
	NimStringDesc* result;
	tnode225816* n;
	result = 0;
	n = semconstexpr_488503(c, n_539101);
	{
		if (!((*n).Kind >= ((NU8) 20) && (*n).Kind <= ((NU8) 22))) goto LA3;
		result = copyString((*n).kindU.S3.Strval);
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		localerror_197955((*n).Info, ((NU16) 6), ((NimStringDesc*) &TMP2888));
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, processquotations_539555)(tnode225816** n, NimStringDesc* op, tnodeseq225810** quotes, tnodeseq225810** ids) {
	{
		if (!((*(*n)).Kind == ((NU8) 30))) goto LA3;
		checksonslen_291416((*n), 2);
		{
			tnode225816* LOC7;
			NimStringDesc* examinedop;
			tnode225816* LOC10;
			LOC7 = 0;
			LOC7 = HEX5BHEX5D_226698((*n), 0);
			if (!((*LOC7).Kind == ((NU8) 2))) goto LA8;
			LOC10 = 0;
			LOC10 = HEX5BHEX5D_226698((*n), 0);
			examinedop = copyString((*(*LOC10).kindU.S5.Ident).S);
			{
				tnode225816* LOC15;
				NimStringDesc* LOC16;
				tident200021* LOC17;
				if (!eqStrings(examinedop, op)) goto LA13;
				LOC15 = 0;
				LOC15 = HEX5BHEX5D_226698((*n), 1);
				(*quotes) = (tnodeseq225810*) incrSeq(&((*quotes))->Sup, sizeof(tnode225816*));
				asgnRefNoCycle((void**) (&(*quotes)->data[(*quotes)->Sup.len-1]), LOC15);
				LOC16 = 0;
				LOC16 = nimIntToStr((*quotes)->Sup.len);
				LOC17 = 0;
				LOC17 = getident_200472(LOC16);
				unsureAsgnRef((void**) (&(*n)), newidentnode_226125(LOC17, (*(*n)).Info));
				(*ids) = (tnodeseq225810*) incrSeq(&((*ids))->Sup, sizeof(tnode225816*));
				asgnRefNoCycle((void**) (&(*ids)->data[(*ids)->Sup.len-1]), (*n));
				goto BeforeRet;
			}
			goto LA11;
			LA13: ;
			{
				NIM_BOOL LOC19;
				NimStringDesc* LOC22;
				tident200021* LOC23;
				LOC19 = 0;
				LOC19 = nsuStartsWith(examinedop, op);
				if (!LOC19) goto LA20;
				LOC22 = 0;
				LOC22 = copyStr(examinedop, op->Sup.len);
				LOC23 = 0;
				LOC23 = getident_200472(LOC22);
				asgnRefNoCycle((void**) (&(*(*n)).kindU.S6.Sons->data[0]), newidentnode_226125(LOC23, (*(*n)).Info));
			}
			goto LA11;
			LA20: ;
			LA11: ;
		}
		LA8: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC25;
		tnode225816* LOC29;
		NimStringDesc* LOC30;
		tident200021* LOC31;
		LOC25 = 0;
		LOC25 = ((*(*n)).Kind == ((NU8) 53));
		if (!(LOC25)) goto LA26;
		LOC25 = eqStrings(op, ((NimStringDesc*) &TMP3271));
		LA26: ;
		if (!LOC25) goto LA27;
		LOC29 = 0;
		LOC29 = HEX5BHEX5D_226698((*n), 0);
		(*quotes) = (tnodeseq225810*) incrSeq(&((*quotes))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*quotes)->data[(*quotes)->Sup.len-1]), LOC29);
		LOC30 = 0;
		LOC30 = nimIntToStr((*quotes)->Sup.len);
		LOC31 = 0;
		LOC31 = getident_200472(LOC30);
		unsureAsgnRef((void**) (&(*n)), newidentnode_226125(LOC31, (*(*n)).Info));
		(*ids) = (tnodeseq225810*) incrSeq(&((*ids))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*ids)->data[(*ids)->Sup.len-1]), (*n));
		goto BeforeRet;
	}
	goto LA1;
	LA27: ;
	LA1: ;
	{
		NI i_539747;
		NI HEX3Atmp_539764;
		NI LOC33;
		NI res_539767;
		i_539747 = 0;
		HEX3Atmp_539764 = 0;
		LOC33 = 0;
		LOC33 = safelen_226424((*n));
		HEX3Atmp_539764 = (LOC33 - 1);
		res_539767 = 0;
		{
			while (1) {
				if (!(res_539767 <= HEX3Atmp_539764)) goto LA35;
				i_539747 = res_539767;
				processquotations_539555(&(*(*n)).kindU.S6.Sons->data[i_539747], op, quotes, ids);
				res_539767 += 1;
			} LA35: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tsym225846*, newanonsym_539148)(NU8 kind, tlineinfo195539 info, tsym225846* owner) {
	tsym225846* result;
	result = 0;
	result = newsym_226074(kind, idanon_200504, owner, info);
	(*result).Flags = IL64(2147483648);
	return result;
}

N_NIMCALL(tnode225816*, semtemplbodydirty_508030)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym225846* s;
		s = qualifiedlookup_296122((*c).C, n, 0);
		{
			if (!!((s == NIM_NIL))) goto LA4;
			{
				NIM_BOOL LOC8;
				LOC8 = 0;
				LOC8 = ((*s).Owner == (*c).Owner);
				if (!(LOC8)) goto LA9;
				LOC8 = ((*s).Kind == ((NU8) 3));
				LA9: ;
				if (!LOC8) goto LA10;
				result = newsymnode_227755(s, (*n).Info);
			}
			goto LA6;
			LA10: ;
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = contains_222837((*c).Tobind, (*s).Sup.Id);
				if (!LOC13) goto LA14;
				result = symchoice_504476((*c).C, n, s, ((NU8) 0));
			}
			goto LA6;
			LA14: ;
			LA6: ;
		}
		LA4: ;
	}
	break;
	case ((NU8) 55):
	{
		result = semtemplbodydirty_508030(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_504600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC22;
			tsym225846* s;
			LOC22 = 0;
			LOC22 = ((*n).Kind == ((NU8) 45));
			if (LOC22) goto LA23;
			LOC22 = ((*n).Kind == ((NU8) 53));
			LA23: ;
			if (!LOC22) goto LA24;
			s = qualifiedlookup_296122((*c).C, n, 0);
			{
				NIM_BOOL LOC28;
				LOC28 = 0;
				LOC28 = !((s == NIM_NIL));
				if (!(LOC28)) goto LA29;
				LOC28 = contains_222837((*c).Tobind, (*s).Sup.Id);
				LA29: ;
				if (!LOC28) goto LA30;
				result = symchoice_504476((*c).C, n, s, ((NU8) 0));
				goto BeforeRet;
			}
			LA30: ;
		}
		LA24: ;
		result = n;
		{
			NI i_508146;
			NI HEX3Atmp_508176;
			NI LOC33;
			NI res_508179;
			i_508146 = 0;
			HEX3Atmp_508176 = 0;
			LOC33 = 0;
			LOC33 = sonslen_226249(n);
			HEX3Atmp_508176 = (NI32)(LOC33 - 1);
			res_508179 = 0;
			{
				while (1) {
					if (!(res_508179 <= HEX3Atmp_508176)) goto LA35;
					i_508146 = res_508179;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_508146]), semtemplbodydirty_508030(c, (*n).kindU.S6.Sons->data[i_508146]));
					res_508179 += 1;
				} LA35: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semtemplsymbol_505411)(tcontext290021* c, tnode225816* n, tsym225846* s) {
	tnode225816* result;
	result = 0;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
	switch ((*s).Kind) {
	case ((NU8) 0):
	{
		result = n;
	}
	break;
	case ((NU8) 12):
	case ((NU8) 13):
	case ((NU8) 14):
	case ((NU8) 15):
	case ((NU8) 16):
	case ((NU8) 6):
	case ((NU8) 18):
	case ((NU8) 17):
	{
		result = symchoice_504476(c, n, s, ((NU8) 1));
	}
	break;
	case ((NU8) 4):
	{
		result = newsymnodetypedesc_307153(s, (*n).Info);
	}
	break;
	case ((NU8) 3):
	{
		result = n;
	}
	break;
	case ((NU8) 7):
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = !(((*s).Typ == NIM_NIL));
			if (!(LOC8)) goto LA9;
			LOC8 = !(((*(*s).Typ).Kind == ((NU8) 12)));
			LA9: ;
			if (!LOC8) goto LA10;
			result = newsymnodetypedesc_307153(s, (*n).Info);
		}
		goto LA6;
		LA10: ;
		{
			result = n;
		}
		LA6: ;
	}
	break;
	default:
	{
		result = newsymnode_227755(s, (*n).Info);
	}
	break;
	}
	return result;
}

N_NIMCALL(void, openscope_505003)(templctx504840* c) {
	tscope225840* LOC1;
	LOC1 = 0;
	LOC1 = openscope_295191((*c).C);
}

N_NIMCALL(void, closescope_505010)(templctx504840* c) {
	closescope_295211((*c).C);
}

N_NIMCALL(tnode225816*, semtemplbodyscope_505017)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	openscope_505003(c);
	result = semtemplbody_504998(c, n);
	closescope_505010(c);
	return result;
}

N_NIMCALL(NU8, symbinding_504374)(tnode225816* n) {
	NU8 result;
	result = 0;
	{
		NI i_504390;
		NI HEX3Atmp_504454;
		NI LOC2;
		NI res_504457;
		i_504390 = 0;
		HEX3Atmp_504454 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_504454 = (NI32)(LOC2 - 1);
		res_504457 = 0;
		{
			while (1) {
				tnode225816* it;
				tnode225816* key;
				if (!(res_504457 <= HEX3Atmp_504454)) goto LA4;
				i_504390 = res_504457;
				it = (*n).kindU.S6.Sons->data[i_504390];
				{
					if (!((*it).Kind == ((NU8) 34))) goto LA7;
					key = (*it).kindU.S6.Sons->data[0];
				}
				goto LA5;
				LA7: ;
				{
					key = it;
				}
				LA5: ;
				{
					NU8 LOC14;
					if (!((*key).Kind == ((NU8) 2))) goto LA12;
					LOC14 = 0;
					LOC14 = whichkeyword_204382((*key).kindU.S5.Ident);
					switch (LOC14) {
					case ((NU8) 179):
					{
						result = ((NU8) 1);
						goto BeforeRet;
					}
					break;
					case ((NU8) 180):
					{
						result = ((NU8) 2);
						goto BeforeRet;
					}
					break;
					default:
					{
					}
					break;
					}
				}
				LA12: ;
				res_504457 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, onlyreplaceparams_505026)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		tsym225846* s;
		if (!((*n).Kind == ((NU8) 2))) goto LA3;
		s = qualifiedlookup_296122((*c).C, n, 0);
		{
			if (!!((s == NIM_NIL))) goto LA7;
			{
				NIM_BOOL LOC11;
				LOC11 = 0;
				LOC11 = ((*s).Owner == (*c).Owner);
				if (!(LOC11)) goto LA12;
				LOC11 = ((*s).Kind == ((NU8) 3));
				LA12: ;
				if (!LOC11) goto LA13;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				result = newsymnode_227755(s, (*n).Info);
			}
			LA13: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_505222;
			NI HEX3Atmp_505252;
			NI LOC17;
			NI res_505255;
			i_505222 = 0;
			HEX3Atmp_505252 = 0;
			LOC17 = 0;
			LOC17 = safelen_226424(n);
			HEX3Atmp_505252 = (LOC17 - 1);
			res_505255 = 0;
			{
				while (1) {
					if (!(res_505255 <= HEX3Atmp_505252)) goto LA19;
					i_505222 = res_505255;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_505222]), onlyreplaceparams_505026(c, (*n).kindU.S6.Sons->data[i_505222]));
					res_505255 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, getidentnode_504846)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 31):
	{
		result = getidentnode_504846(c, (*n).kindU.S6.Sons->data[1]);
	}
	break;
	case ((NU8) 43):
	{
		result = getidentnode_504846(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 2):
	{
		tsym225846* s;
		result = n;
		s = qualifiedlookup_296122((*c).C, n, 0);
		{
			if (!!((s == NIM_NIL))) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = ((*s).Owner == (*c).Owner);
				if (!(LOC10)) goto LA11;
				LOC10 = ((*s).Kind == ((NU8) 3));
				LA11: ;
				if (!LOC10) goto LA12;
				result = newsymnode_227755(s, (*n).Info);
			}
			LA12: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 53):
	case ((NU8) 3):
	{
		result = n;
	}
	break;
	default:
	{
		illformedast_291406(n);
		result = n;
	}
	break;
	}
	return result;
}

static N_INLINE(NIM_BOOL, istemplparam_504928)(templctx504840* c, tnode225816* n) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*n).Kind == ((NU8) 3));
	if (!(LOC2)) goto LA3;
	LOC2 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 3));
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = ((*(*n).kindU.S4.Sym).Owner == (*c).Owner);
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, replaceidentbysym_504801)(tnode225816** n, tnode225816* s) {
	switch ((*(*n)).Kind) {
	case ((NU8) 31):
	{
		replaceidentbysym_504801(&(*(*n)).kindU.S6.Sons->data[1], s);
	}
	break;
	case ((NU8) 43):
	{
		replaceidentbysym_504801(&(*(*n)).kindU.S6.Sons->data[0], s);
	}
	break;
	case ((NU8) 2):
	case ((NU8) 53):
	case ((NU8) 3):
	{
		unsureAsgnRef((void**) (&(*n)), s);
	}
	break;
	default:
	{
		illformedast_291406((*n));
	}
	break;
	}
}

N_NIMCALL(tsym225846*, newgensym_505269)(NU8 kind, tnode225816* n, templctx504840* c) {
	tsym225846* result;
	tident200021* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = considerquotedident_295010(n);
	result = newsym_226074(kind, LOC1, (*c).Owner, (*n).Info);
	(*result).Flags |= ((NI32)1)<<((((NU8) 31))%(sizeof(NI32)*8));
	(*result).Flags |= ((NI32)1)<<((((NU8) 21))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(void, addlocaldecl_505311)(templctx504840* c, tnode225816** n, NU8 k) {
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		tnode225816* x;
		tnode225816* ident;
		LOC3 = 0;
		LOC3 = ((*(*n)).Kind == ((NU8) 43));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = symbinding_504374((*(*n)).kindU.S6.Sons->data[1]);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		x = HEX5BHEX5D_226698((*n), 0);
		{
			while (1) {
				switch ((*x).Kind) {
				case ((NU8) 31):
				{
					x = HEX5BHEX5D_226698(x, 1);
				}
				break;
				case ((NU8) 43):
				{
					x = HEX5BHEX5D_226698(x, 0);
				}
				break;
				case ((NU8) 2):
				{
					goto LA8;
				}
				break;
				case ((NU8) 53):
				{
					unsureAsgnRef((void**) (&(*n)), onlyreplaceparams_505026(c, (*n)));
					goto BeforeRet;
				}
				break;
				default:
				{
					illformedast_291406(x);
				}
				break;
				}
			}
		} LA8: ;
		ident = getidentnode_504846(c, x);
		{
			NIM_BOOL LOC17;
			LOC17 = 0;
			LOC17 = istemplparam_504928((&(*c)), ident);
			if (!!(LOC17)) goto LA18;
			incl_222869((&(*c).Toinject), (*(*x).kindU.S5.Ident).Sup.Id);
		}
		goto LA15;
		LA18: ;
		{
			replaceidentbysym_504801(n, ident);
		}
		LA15: ;
	}
	goto LA1;
	LA6: ;
	{
		tnode225816* ident;
		ident = getidentnode_504846(c, (*n));
		{
			NIM_BOOL LOC24;
			tsym225846* local;
			tnode225816* LOC27;
			LOC24 = 0;
			LOC24 = istemplparam_504928((&(*c)), ident);
			if (!!(LOC24)) goto LA25;
			local = newgensym_505269(k, ident, c);
			addprelimdecl_295704((*c).C, local);
			LOC27 = 0;
			LOC27 = newsymnode_227755(local, (*(*n)).Info);
			replaceidentbysym_504801(n, LOC27);
		}
		goto LA22;
		LA25: ;
		{
			replaceidentbysym_504801(n, ident);
		}
		LA22: ;
	}
	LA1: ;
	BeforeRet: ;
}

N_NIMCALL(void, semtemplsomedecl_505927)(templctx504840* c, tnode225816* n, NU8 symkind) {
	{
		NI i_505945;
		NI HEX3Atmp_506081;
		NI LOC2;
		NI res_506084;
		i_505945 = 0;
		HEX3Atmp_506081 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_506081 = (NI32)(LOC2 - 1);
		res_506084 = 0;
		{
			while (1) {
				if (!(res_506084 <= HEX3Atmp_506081)) goto LA4;
				i_505945 = res_506084;
				{
					tnode225816* a;
					NI l;
					a = (*n).kindU.S6.Sons->data[i_505945];
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA8;
						goto LA5;
					}
					LA8: ;
					{
						NIM_BOOL LOC12;
						LOC12 = 0;
						LOC12 = !(((*a).Kind == ((NU8) 35)));
						if (!(LOC12)) goto LA13;
						LOC12 = !(((*a).Kind == ((NU8) 36)));
						LA13: ;
						if (!LOC12) goto LA14;
						illformedast_291406(a);
					}
					LA14: ;
					checkminsonslen_291426(a, 3);
					l = sonslen_226249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 2)]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[(NI32)(l - 2)]));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)]));
					{
						NI j_506057;
						NI HEX3Atmp_506076;
						NI res_506079;
						j_506057 = 0;
						HEX3Atmp_506076 = 0;
						HEX3Atmp_506076 = (NI32)(l - 3);
						res_506079 = 0;
						{
							while (1) {
								if (!(res_506079 <= HEX3Atmp_506076)) goto LA18;
								j_506057 = res_506079;
								addlocaldecl_505311(c, &(*a).kindU.S6.Sons->data[j_506057], symkind);
								res_506079 += 1;
							} LA18: ;
						}
					}
				} LA5: ;
				res_506084 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode225816*, semroutineintemplname_505462)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		tsym225846* s;
		if (!((*n).Kind == ((NU8) 2))) goto LA3;
		s = qualifiedlookup_296122((*c).C, n, 0);
		{
			if (!!((s == NIM_NIL))) goto LA7;
			{
				NIM_BOOL LOC11;
				NIM_BOOL LOC13;
				LOC11 = 0;
				LOC11 = ((*s).Owner == (*c).Owner);
				if (!(LOC11)) goto LA12;
				LOC13 = 0;
				LOC13 = ((*s).Kind == ((NU8) 3));
				if (LOC13) goto LA14;
				LOC13 = (((*s).Flags &(1<<((((NU8) 31))&31)))!=0);
				LA14: ;
				LOC11 = LOC13;
				LA12: ;
				if (!LOC11) goto LA15;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				result = newsymnode_227755(s, (*n).Info);
			}
			LA15: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_505613;
			NI HEX3Atmp_505643;
			NI LOC19;
			NI res_505646;
			i_505613 = 0;
			HEX3Atmp_505643 = 0;
			LOC19 = 0;
			LOC19 = safelen_226424(n);
			HEX3Atmp_505643 = (NI32)(LOC19 - 1);
			res_505646 = 0;
			{
				while (1) {
					if (!(res_505646 <= HEX3Atmp_505643)) goto LA21;
					i_505613 = res_505646;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_505613]), semroutineintemplname_505462(c, (*n).kindU.S6.Sons->data[i_505613]));
					res_505646 += 1;
				} LA21: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semroutineintemplbody_505660)(templctx504840* c, tnode225816* n, NU8 k) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 7);
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		tnode225816* ident;
		LOC3 = 0;
		LOC3 = !(((*n).Kind == ((NU8) 51) || (*n).Kind == ((NU8) 52)));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = symbinding_504374((*n).kindU.S6.Sons->data[4]);
		LOC3 = (LOC5 == ((NU8) 1));
		LA4: ;
		if (!LOC3) goto LA6;
		ident = getidentnode_504846(c, (*n).kindU.S6.Sons->data[0]);
		{
			NIM_BOOL LOC10;
			tsym225846* s;
			LOC10 = 0;
			LOC10 = istemplparam_504928((&(*c)), ident);
			if (!!(LOC10)) goto LA11;
			s = newgensym_505269(k, ident, c);
			asgnRefNoCycle((void**) (&(*s).Ast), n);
			addprelimdecl_295704((*c).C, s);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227755(s, (*(*n).kindU.S6.Sons->data[0]).Info));
		}
		goto LA8;
		LA11: ;
		{
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), ident);
		}
		LA8: ;
	}
	goto LA1;
	LA6: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semroutineintemplname_505462(c, (*n).kindU.S6.Sons->data[0]));
	}
	LA1: ;
	openscope_505003(c);
	{
		NI i_505881;
		NI res_505913;
		i_505881 = 0;
		res_505913 = 1;
		{
			while (1) {
				if (!(res_505913 <= 6)) goto LA17;
				i_505881 = res_505913;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_505881]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[i_505881]));
				res_505913 += 1;
			} LA17: ;
		}
	}
	closescope_505010(c);
	return result;
}

N_NIMCALL(tnode225816*, semtemplbody_504998)(templctx504840* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym225846* s;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = contains_222837((*c).Toinject, (*(*n).kindU.S5.Ident).Sup.Id);
			if (!LOC4) goto LA5;
			result = n;
			goto BeforeRet;
		}
		LA5: ;
		s = qualifiedlookup_296122((*c).C, n, 0);
		{
			if (!!((s == NIM_NIL))) goto LA9;
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = ((*s).Owner == (*c).Owner);
				if (!(LOC13)) goto LA14;
				LOC13 = ((*s).Kind == ((NU8) 3));
				LA14: ;
				if (!LOC13) goto LA15;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				result = newsymnode_227755(s, (*n).Info);
			}
			goto LA11;
			LA15: ;
			{
				NIM_BOOL LOC18;
				LOC18 = 0;
				LOC18 = contains_222837((*c).Tobind, (*s).Sup.Id);
				if (!LOC18) goto LA19;
				result = symchoice_504476((*c).C, n, s, ((NU8) 0));
			}
			goto LA11;
			LA19: ;
			{
				NIM_BOOL LOC22;
				LOC22 = 0;
				LOC22 = contains_222837((*c).Tomixin, (*(*s).Name).Sup.Id);
				if (!LOC22) goto LA23;
				result = symchoice_504476((*c).C, n, s, ((NU8) 2));
			}
			goto LA11;
			LA23: ;
			{
				NIM_BOOL LOC26;
				LOC26 = 0;
				LOC26 = ((*s).Owner == (*c).Owner);
				if (!(LOC26)) goto LA27;
				LOC26 = (((*s).Flags &(1<<((((NU8) 31))&31)))!=0);
				LA27: ;
				if (!LOC26) goto LA28;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				result = newsymnode_227755(s, (*n).Info);
			}
			goto LA11;
			LA28: ;
			{
				result = semtemplsymbol_505411((*c).C, n, s);
			}
			LA11: ;
		}
		LA9: ;
	}
	break;
	case ((NU8) 55):
	{
		result = semtemplbody_504998(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_504600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 123):
	{
		result = semmixinstmt_504740((*c).C, n, (&(*c).Tomixin));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 92):
	{
		{
			NI i_506429;
			NI HEX3Atmp_507851;
			NI LOC37;
			NI res_507854;
			i_506429 = 0;
			HEX3Atmp_507851 = 0;
			LOC37 = 0;
			LOC37 = sonslen_226249(n);
			HEX3Atmp_507851 = (NI32)(LOC37 - 1);
			res_507854 = 0;
			{
				while (1) {
					tnode225816* it;
					if (!(res_507854 <= HEX3Atmp_507851)) goto LA39;
					i_506429 = res_507854;
					it = (*n).kindU.S6.Sons->data[i_506429];
					{
						NI LOC42;
						LOC42 = 0;
						LOC42 = len_226364(it);
						if (!(LOC42 == 2)) goto LA43;
						openscope_505003(c);
						asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), semtemplbody_504998(c, (*it).kindU.S6.Sons->data[0]));
						asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), semtemplbody_504998(c, (*it).kindU.S6.Sons->data[1]));
						closescope_505010(c);
					}
					goto LA40;
					LA43: ;
					{
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_506429]), semtemplbodyscope_505017(c, it));
					}
					LA40: ;
					res_507854 += 1;
				} LA39: ;
			}
		}
	}
	break;
	case ((NU8) 96):
	{
		openscope_505003(c);
		{
			NI i_506855;
			NI HEX3Atmp_507857;
			NI LOC48;
			NI res_507860;
			i_506855 = 0;
			HEX3Atmp_507857 = 0;
			LOC48 = 0;
			LOC48 = sonslen_226249(n);
			HEX3Atmp_507857 = (NI32)(LOC48 - 1);
			res_507860 = 0;
			{
				while (1) {
					if (!(res_507860 <= HEX3Atmp_507857)) goto LA50;
					i_506855 = res_507860;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_506855]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[i_506855]));
					res_507860 += 1;
				} LA50: ;
			}
		}
		closescope_505010(c);
	}
	break;
	case ((NU8) 97):
	{
		openscope_505003(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_506924;
			NI HEX3Atmp_507869;
			NI LOC53;
			NI res_507872;
			i_506924 = 0;
			HEX3Atmp_507869 = 0;
			LOC53 = 0;
			LOC53 = sonslen_226249(n);
			HEX3Atmp_507869 = (NI32)(LOC53 - 1);
			res_507872 = 1;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_507872 <= HEX3Atmp_507869)) goto LA55;
					i_506924 = res_507872;
					a = (*n).kindU.S6.Sons->data[i_506924];
					checkminsonslen_291426(a, 1);
					l = sonslen_226249(a);
					{
						NI j_506953;
						NI HEX3Atmp_507864;
						NI res_507867;
						j_506953 = 0;
						HEX3Atmp_507864 = 0;
						HEX3Atmp_507864 = (NI32)(l - 2);
						res_507867 = 0;
						{
							while (1) {
								if (!(res_507867 <= HEX3Atmp_507864)) goto LA58;
								j_506953 = res_507867;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_506953]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[j_506953]));
								res_507867 += 1;
							} LA58: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semtemplbodyscope_505017(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)]));
					res_507872 += 1;
				} LA55: ;
			}
		}
		closescope_505010(c);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		NI l;
		l = sonslen_226249(n);
		openscope_505003(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(l - 2)]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[(NI32)(l - 2)]));
		{
			NI i_507051;
			NI HEX3Atmp_507875;
			NI res_507878;
			i_507051 = 0;
			HEX3Atmp_507875 = 0;
			HEX3Atmp_507875 = (NI32)(l - 3);
			res_507878 = 0;
			{
				while (1) {
					if (!(res_507878 <= HEX3Atmp_507875)) goto LA62;
					i_507051 = res_507878;
					addlocaldecl_505311(c, &(*n).kindU.S6.Sons->data[i_507051], ((NU8) 21));
					res_507878 += 1;
				} LA62: ;
			}
		}
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(l - 1)]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[(NI32)(l - 1)]));
		closescope_505010(c);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	case ((NU8) 129):
	{
		checksonslen_291416(n, 2);
		openscope_505003(c);
		{
			tsym225846* s;
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA66;
			s = newgensym_505269(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
			addprelimdecl_295704((*c).C, s);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227755(s, (*(*n).kindU.S6.Sons->data[0]).Info));
		}
		LA66: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[1]));
		closescope_505010(c);
	}
	break;
	case ((NU8) 106):
	{
		checkminsonslen_291426(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semtemplbodyscope_505017(c, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_507297;
			NI HEX3Atmp_507887;
			NI LOC70;
			NI res_507890;
			i_507297 = 0;
			HEX3Atmp_507887 = 0;
			LOC70 = 0;
			LOC70 = sonslen_226249(n);
			HEX3Atmp_507887 = (NI32)(LOC70 - 1);
			res_507890 = 1;
			{
				while (1) {
					tnode225816* a;
					NI l;
					if (!(res_507890 <= HEX3Atmp_507887)) goto LA72;
					i_507297 = res_507890;
					a = (*n).kindU.S6.Sons->data[i_507297];
					checkminsonslen_291426(a, 1);
					l = sonslen_226249(a);
					{
						NI j_507326;
						NI HEX3Atmp_507882;
						NI res_507885;
						j_507326 = 0;
						HEX3Atmp_507882 = 0;
						HEX3Atmp_507882 = (NI32)(l - 2);
						res_507885 = 0;
						{
							while (1) {
								if (!(res_507885 <= HEX3Atmp_507882)) goto LA75;
								j_507326 = res_507885;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_507326]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[j_507326]));
								res_507885 += 1;
							} LA75: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(l - 1)]), semtemplbodyscope_505017(c, (*a).kindU.S6.Sons->data[(NI32)(l - 1)]));
					res_507890 += 1;
				} LA72: ;
			}
		}
	}
	break;
	case ((NU8) 99):
	{
		semtemplsomedecl_505927(c, n, ((NU8) 8));
	}
	break;
	case ((NU8) 100):
	{
		semtemplsomedecl_505927(c, n, ((NU8) 9));
	}
	break;
	case ((NU8) 101):
	{
		{
			NI i_507395;
			NI HEX3Atmp_507894;
			NI LOC80;
			NI res_507897;
			i_507395 = 0;
			HEX3Atmp_507894 = 0;
			LOC80 = 0;
			LOC80 = sonslen_226249(n);
			HEX3Atmp_507894 = (NI32)(LOC80 - 1);
			res_507897 = 0;
			{
				while (1) {
					if (!(res_507897 <= HEX3Atmp_507894)) goto LA82;
					i_507395 = res_507897;
					{
						tnode225816* a;
						a = (*n).kindU.S6.Sons->data[i_507395];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA86;
							goto LA83;
						}
						LA86: ;
						{
							if (!!(((*a).Kind == ((NU8) 102)))) goto LA90;
							illformedast_291406(a);
						}
						LA90: ;
						checksonslen_291416(a, 3);
						addlocaldecl_505311(c, &(*a).kindU.S6.Sons->data[0], ((NU8) 10));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[1]));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[2]));
					} LA83: ;
					res_507897 += 1;
				} LA82: ;
			}
		}
	}
	break;
	case ((NU8) 98):
	{
		{
			NI i_507512;
			NI HEX3Atmp_507901;
			NI LOC94;
			NI res_507904;
			i_507512 = 0;
			HEX3Atmp_507901 = 0;
			LOC94 = 0;
			LOC94 = sonslen_226249(n);
			HEX3Atmp_507901 = (NI32)(LOC94 - 1);
			res_507904 = 0;
			{
				while (1) {
					if (!(res_507904 <= HEX3Atmp_507901)) goto LA96;
					i_507512 = res_507904;
					{
						tnode225816* a;
						a = (*n).kindU.S6.Sons->data[i_507512];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA100;
							goto LA97;
						}
						LA100: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA104;
							illformedast_291406(a);
						}
						LA104: ;
						checksonslen_291416(a, 3);
						addlocaldecl_505311(c, &(*a).kindU.S6.Sons->data[0], ((NU8) 7));
					} LA97: ;
					res_507904 += 1;
				} LA96: ;
			}
		}
		{
			NI i_507573;
			NI HEX3Atmp_507908;
			NI LOC107;
			NI res_507911;
			i_507573 = 0;
			HEX3Atmp_507908 = 0;
			LOC107 = 0;
			LOC107 = sonslen_226249(n);
			HEX3Atmp_507908 = (NI32)(LOC107 - 1);
			res_507911 = 0;
			{
				while (1) {
					if (!(res_507911 <= HEX3Atmp_507908)) goto LA109;
					i_507573 = res_507911;
					{
						tnode225816* a;
						a = (*n).kindU.S6.Sons->data[i_507573];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA113;
							goto LA110;
						}
						LA113: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA117;
							illformedast_291406(a);
						}
						LA117: ;
						checksonslen_291416(a, 3);
						{
							if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA121;
							openscope_505003(c);
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[1]));
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[2]));
							closescope_505010(c);
						}
						goto LA119;
						LA121: ;
						{
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_504998(c, (*a).kindU.S6.Sons->data[2]));
						}
						LA119: ;
					} LA110: ;
					res_507911 += 1;
				} LA109: ;
			}
		}
	}
	break;
	case ((NU8) 79):
	case ((NU8) 51):
	case ((NU8) 52):
	{
		result = semroutineintemplbody_505660(c, n, ((NU8) 12));
	}
	break;
	case ((NU8) 80):
	{
		result = semroutineintemplbody_505660(c, n, ((NU8) 13));
	}
	break;
	case ((NU8) 84):
	{
		NU8 kind;
		{
			tnode225816* LOC129;
			NIM_BOOL LOC130;
			LOC129 = 0;
			LOC129 = HEX5BHEX5D_226698(n, 4);
			LOC130 = 0;
			LOC130 = haspragma_315628(LOC129, ((NU8) 135));
			if (!LOC130) goto LA131;
			kind = ((NU8) 15);
		}
		goto LA127;
		LA131: ;
		{
			kind = ((NU8) 14);
		}
		LA127: ;
		result = semroutineintemplbody_505660(c, n, kind);
	}
	break;
	case ((NU8) 83):
	{
		result = semroutineintemplbody_505660(c, n, ((NU8) 18));
	}
	break;
	case ((NU8) 82):
	{
		result = semroutineintemplbody_505660(c, n, ((NU8) 17));
	}
	break;
	case ((NU8) 81):
	{
		result = semroutineintemplbody_505660(c, n, ((NU8) 16));
	}
	break;
	case ((NU8) 43):
	{
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[0]));
	}
	break;
	case ((NU8) 31):
	{
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[1]));
	}
	break;
	case ((NU8) 90):
	{
		result = onlyreplaceparams_505026(c, n);
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC143;
			tsym225846* s;
			LOC143 = 0;
			LOC143 = ((*n).Kind == ((NU8) 45));
			if (LOC143) goto LA144;
			LOC143 = ((*n).Kind == ((NU8) 53));
			LA144: ;
			if (!LOC143) goto LA145;
			s = qualifiedlookup_296122((*c).C, n, 0);
			{
				if (!!((s == NIM_NIL))) goto LA149;
				{
					NIM_BOOL LOC153;
					LOC153 = 0;
					LOC153 = contains_222837((*c).Tobind, (*s).Sup.Id);
					if (!LOC153) goto LA154;
					result = symchoice_504476((*c).C, n, s, ((NU8) 0));
					goto BeforeRet;
				}
				goto LA151;
				LA154: ;
				{
					NIM_BOOL LOC157;
					LOC157 = 0;
					LOC157 = contains_222837((*c).Tomixin, (*(*s).Name).Sup.Id);
					if (!LOC157) goto LA158;
					result = symchoice_504476((*c).C, n, s, ((NU8) 2));
					goto BeforeRet;
				}
				goto LA151;
				LA158: ;
				{
					result = symchoice_504476((*c).C, n, s, ((NU8) 1));
					goto BeforeRet;
				}
				LA151: ;
			}
			LA149: ;
		}
		LA145: ;
		result = n;
		{
			NI i_507821;
			NI HEX3Atmp_507914;
			NI LOC162;
			NI res_507917;
			i_507821 = 0;
			HEX3Atmp_507914 = 0;
			LOC162 = 0;
			LOC162 = sonslen_226249(n);
			HEX3Atmp_507914 = (NI32)(LOC162 - 1);
			res_507917 = 0;
			{
				while (1) {
					if (!(res_507917 <= HEX3Atmp_507914)) goto LA164;
					i_507821 = res_507917;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_507821]), semtemplbody_504998(c, (*n).kindU.S6.Sons->data[i_507821]));
					res_507917 += 1;
				} LA164: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, transformtoexpr_508193)(tnode225816* n) {
	tnode225816* result;
	NI realstmt;
	result = 0;
	realstmt = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 115):
	{
		realstmt = -1;
		{
			NI i_508210;
			NI HEX3Atmp_508241;
			NI LOC3;
			NI res_508244;
			i_508210 = 0;
			HEX3Atmp_508241 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226249(n);
			HEX3Atmp_508241 = (NI32)(LOC3 - 1);
			res_508244 = 0;
			{
				while (1) {
					if (!(res_508244 <= HEX3Atmp_508241)) goto LA5;
					i_508210 = res_508244;
					switch ((*(*n).kindU.S6.Sons->data[i_508210]).Kind) {
					case ((NU8) 125):
					case ((NU8) 1):
					case ((NU8) 23):
					{
					}
					break;
					default:
					{
						{
							if (!(realstmt == -1)) goto LA10;
							realstmt = i_508210;
						}
						goto LA8;
						LA10: ;
						{
							realstmt = -2;
						}
						LA8: ;
					}
					break;
					}
					res_508244 += 1;
				} LA5: ;
			}
		}
		{
			if (!(0 <= realstmt)) goto LA15;
			result = transformtoexpr_508193((*n).kindU.S6.Sons->data[realstmt]);
		}
		goto LA13;
		LA15: ;
		{
			(*n).Kind = ((NU8) 126);
		}
		LA13: ;
	}
	break;
	case ((NU8) 112):
	{
		(*n).Kind = ((NU8) 127);
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode225816*, semtemplatedef_508258)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* s;
	tscope225840* LOC6;
	tnode225816* gp;
	templctx504840 ctx;
	tsym225846* proto;
	result = 0;
	s = 0;
	{
		if (!((*(*(*c).P).Owner).Kind == ((NU8) 6))) goto LA3;
		s = semidentvis_487990(c, ((NU8) 18), (*n).kindU.S6.Sons->data[0], 2);
		(*s).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
	}
	goto LA1;
	LA3: ;
	{
		s = semidentvis_487990(c, ((NU8) 18), (*n).kindU.S6.Sons->data[0], 0);
	}
	LA1: ;
	asgnRef((void**) (&(*s).kindU.S2.Scope), (*c).Currentscope);
	pushowner_290261(s);
	LOC6 = 0;
	LOC6 = openscope_295191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227755(s, (*(*n).kindU.S6.Sons->data[0]).Info));
	{
		if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA9;
		pragma_310079(c, s, (*n).kindU.S6.Sons->data[4], TMP3275);
	}
	LA9: ;
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA13;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_504001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA11;
	LA13: ;
	{
		gp = newnodei_226138(((NU8) 75), (*n).Info);
	}
	LA11: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA18;
		semparamlist_487284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NI LOC22;
			LOC22 = 0;
			LOC22 = sonslen_226249(gp);
			if (!(0 < LOC22)) goto LA23;
			{
				if (!((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1))) goto LA27;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), gp);
			}
			LA27: ;
		}
		LA23: ;
		{
			if (!((*(*(*n).kindU.S6.Sons->data[3]).kindU.S6.Sons->data[0]).Kind == ((NU8) 1))) goto LA31;
			asgnRefNoCycle((void**) (&(*(*s).Typ).Sons->data[0]), newtypes_290214(((NU8) 7), c));
			asgnRefNoCycle((void**) (&(*(*(*s).Typ).N).kindU.S6.Sons->data[0]), newnodeit_226145(((NU8) 4), (*n).Info, (*(*s).Typ).Sons->data[0]));
		}
		LA31: ;
	}
	goto LA16;
	LA18: ;
	{
		ttype225852* LOC34;
		tnode225816* LOC35;
		asgnRefNoCycle((void**) (&(*s).Typ), newtypes_290214(((NU8) 25), c));
		asgnRefNoCycle((void**) (&(*(*s).Typ).N), newnodei_226138(((NU8) 76), (*n).Info));
		LOC34 = 0;
		LOC34 = newtypes_290214(((NU8) 7), c);
		rawaddson_230562((*s).Typ, LOC34);
		LOC35 = 0;
		LOC35 = newnodeit_226145(((NU8) 4), (*n).Info, (*(*s).Typ).Sons->data[0]);
		addson_226287((*(*s).Typ).N, LOC35);
	}
	LA16: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA38;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), sempattern_506110(c, (*n).kindU.S6.Sons->data[1]));
	}
	LA38: ;
	memset((void*)(&ctx), 0, sizeof(ctx));
	initintset_222950((&ctx.Tobind));
	initintset_222950((&ctx.Tomixin));
	initintset_222950((&ctx.Toinject));
	ctx.C = c;
	ctx.Owner = s;
	{
		if (!(((*s).Flags &(1<<((((NU8) 9))&31)))!=0)) goto LA42;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semtemplbodydirty_508030((&ctx), (*n).kindU.S6.Sons->data[6]));
	}
	goto LA40;
	LA42: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semtemplbody_504998((&ctx), (*n).kindU.S6.Sons->data[6]));
	}
	LA40: ;
	{
		if (!!(((*(*(*s).Typ).Sons->data[0]).Kind == ((NU8) 7) || (*(*(*s).Typ).Sons->data[0]).Kind == ((NU8) 8)))) goto LA47;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformtoexpr_508193((*n).kindU.S6.Sons->data[6]));
	}
	LA47: ;
	closescope_295211(c);
	popowner_290267();
	asgnRefNoCycle((void**) (&(*s).Ast), n);
	result = n;
	{
		if (!((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1))) goto LA51;
		localerror_197955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA51: ;
	proto = searchforproc_309414(c, (*c).Currentscope, s);
	{
		if (!(proto == NIM_NIL)) goto LA55;
		addinterfaceoverloadablesymat_295855(c, (*c).Currentscope, s);
	}
	goto LA53;
	LA55: ;
	{
		symtabreplace_240615((&(*(*c).Currentscope).Symbols), proto, s);
	}
	LA53: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA60;
		(*c).Patterns = (tsymseq225818*) incrSeq(&((*c).Patterns)->Sup, sizeof(tsym225846*));
		asgnRefNoCycle((void**) (&(*c).Patterns->data[(*c).Patterns->Sup.len-1]), s);
	}
	LA60: ;
	return result;
}

N_NIMCALL(tsym225846*, getmagicsym_539134)(NU16 magic) {
	tsym225846* result;
	tident200021* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_200472(reprEnum(magic, (&NTI225532)));
	result = newsym_226074(((NU8) 12), LOC1, systemmodule_282019, gcodegenlineinfo_196239);
	(*result).Magic = magic;
	return result;
}

N_NIMCALL(tnode225816*, semquoteast_487334)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* doblk;
	NI LOC10;
	NimStringDesc* op;
	tnodeseq225810* quotes;
	tnodeseq225810* ids;
	tsym225846* LOC28;
	tsym225846* LOC29;
	tnode225816* tmpl;
	tnodeseq225810* LOC41;
	TY291287 LOC42;
	tsym225846* LOC43;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC4;
		NI LOC6;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = len_226364(n);
		LOC3 = (LOC4 == 2);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = len_226364(n);
		LOC3 = (LOC6 == 3);
		LA5: ;
		if (!!(LOC3)) goto LA7;
		LOC9 = 0;
		LOC9 = HEX24_198126(TMP3270);
		internalerror_198006(LOC9);
	}
	LA7: ;
	LOC10 = 0;
	{
		if (!NIM_FALSE) goto LA13;
		LOC10 = -1;
	}
	goto LA11;
	LA13: ;
	{
		NI LOC16;
		LOC16 = 0;
		LOC16 = len_226364(n);
		LOC10 = (NI32)(LOC16 + -1);
	}
	LA11: ;
	doblk = HEX5BHEX5D_226698(n, LOC10);
	{
		NI LOC19;
		tnode225816* LOC22;
		LOC19 = 0;
		LOC19 = len_226364(n);
		if (!(LOC19 == 3)) goto LA20;
		LOC22 = 0;
		LOC22 = HEX5BHEX5D_226698(n, 1);
		op = expectstring_539098(c, LOC22);
	}
	goto LA17;
	LA20: ;
	{
		op = copyString(((NimStringDesc*) &TMP3271));
	}
	LA17: ;
	quotes = newseq_539811(1);
	ids = newseq_539811(0);
	{
		if (!!(((*doblk).Kind == ((NU8) 52)))) goto LA26;
		localerror_197955((*n).Info, ((NU16) 188), ((NimStringDesc*) &TMP3272));
	}
	LA26: ;
	processquotations_539555(&(*doblk).kindU.S6.Sons->data[6], op, (&quotes), (&ids));
	LOC28 = 0;
	LOC28 = getcurrowner_290256();
	LOC29 = 0;
	LOC29 = newanonsym_539148(((NU8) 18), (*n).Info, LOC28);
	asgnRefNoCycle((void**) (&(*doblk).kindU.S6.Sons->data[0]), newsymnode_226132(LOC29));
	{
		tnode225816* LOC34;
		tsym225846* LOC35;
		tnode225816* LOC36;
		tsym225846* LOC37;
		tnode225816* LOC38;
		tnode225816* LOC39;
		tnode225816* LOC40;
		if (!(0 < ids->Sup.len)) goto LA32;
		asgnRefNoCycle((void**) (&(*doblk).kindU.S6.Sons->data[3]), newnodei_226138(((NU8) 76), (*n).Info));
		LOC34 = 0;
		LOC34 = HEX5BHEX5D_226698(doblk, 3);
		LOC35 = 0;
		LOC35 = getsyssym_282054(((NimStringDesc*) &TMP3273));
		LOC36 = 0;
		LOC36 = newsymnode_226132(LOC35);
		add_226498(LOC34, LOC36);
		LOC37 = 0;
		LOC37 = getsyssym_282054(((NimStringDesc*) &TMP3274));
		LOC38 = 0;
		LOC38 = newsymnode_226132(LOC37);
		ids = (tnodeseq225810*) incrSeq(&(ids)->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&ids->data[ids->Sup.len-1]), LOC38);
		ids = (tnodeseq225810*) incrSeq(&(ids)->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&ids->data[ids->Sup.len-1]), emptynode_226738);
		LOC39 = 0;
		LOC39 = HEX5BHEX5D_226698(doblk, 3);
		LOC40 = 0;
		LOC40 = newnode_228207(((NU8) 35), (*n).Info, ids, NIM_NIL);
		add_226498(LOC39, LOC40);
	}
	LA32: ;
	tmpl = semtemplatedef_508258(c, doblk);
	asgnRefNoCycle((void**) (&quotes->data[0]), HEX5BHEX5D_226698(tmpl, 0));
	LOC41 = 0;
	LOC41 = (tnodeseq225810*) newSeq((&NTI225810), 2);
	memset((void*)LOC42, 0, sizeof(LOC42));
	LOC43 = 0;
	LOC43 = getmagicsym_539134(((NU16) 16));
	LOC42[0] = newsymnode_226132(LOC43);
	LOC42[1] = newnode_228207(((NU8) 27), (*n).Info, quotes, NIM_NIL);
	asgnRefNoCycle((void**) (&LOC41->data[0]), LOC42[0]);
	asgnRefNoCycle((void**) (&LOC41->data[1]), LOC42[1]);
	result = newnode_228207(((NU8) 27), (*n).Info, LOC41, NIM_NIL);
	result = semexpandtoast_539286(c, result);
	return result;
}

N_NIMCALL(ttype225852*, createflowvar_540143)(tcontext290021* c, ttype225852* t, tlineinfo195539 info) {
	ttype225852* result;
	tsym225846* LOC1;
	result = 0;
	result = newtype_226083(((NU8) 9), (*c).Module);
	LOC1 = 0;
	LOC1 = getcompilerproc_282036(((NimStringDesc*) &TMP3278));
	addsonskipintlit_282572(result, (*LOC1).Typ);
	addsonskipintlit_282572(result, t);
	result = instgenericcontainer_490657(c, info, result, NIM_FALSE);
	return result;
}

N_NIMCALL(tsym225846*, instantiatecreateflowvarcall_540152)(tcontext290021* c, ttype225852* t, tlineinfo195539 info) {
	tsym225846* result;
	tsym225846* sym;
	tidtable225864 bindings;
	tnode225816* LOC5;
	tidobj200015* LOC6;
	TNimObject* LOC7;
	result = 0;
	sym = getcompilerproc_282036(((NimStringDesc*) &TMP3279));
	{
		if (!(sym == NIM_NIL)) goto LA3;
		localerror_197955(info, ((NU16) 64), ((NimStringDesc*) &TMP3279));
	}
	LA3: ;
	memset((void*)(&bindings), 0, sizeof(bindings));
	initidtable_226167((&bindings));
	LOC5 = 0;
	LOC5 = HEX5BHEX5D_226698((*sym).Ast, 2);
	LOC6 = 0;
	LOC6 = &(*(*LOC5).kindU.S6.Sons->data[0]).Typ->Sup;
	LOC7 = 0;
	LOC7 = &t->Sup.Sup;
	idtableput_235196((&bindings), LOC6, LOC7);
	result = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, sym, bindings, info, (*c).Semgenerateinstance.ClEnv):((TMP3280)((*c).Semgenerateinstance.ClPrc))(c, sym, bindings, info);
	{
		if (!(((*result).Flags &(1<<((((NU8) 16))&31)))!=0)) goto LA10;
		(*result).Flags = ((*result).Flags & ~ 65632);
		asgnRefNoCycle((void**) (&(*result).Loc.R), NIM_NIL);
	}
	LA10: ;
	return result;
}

N_NIMCALL(tnode225816*, semmagic_540264)(tcontext290021* c, tnode225816* n, tsym225846* s, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = n;
	switch ((*s).Magic) {
	case ((NU16) 1):
	{
		tnode225816* LOC2;
		LOC2 = 0;
		LOC2 = setms_540228(n, s);
		result = semdefined_538896(c, LOC2, NIM_FALSE);
	}
	break;
	case ((NU16) 2):
	{
		tnode225816* LOC4;
		LOC4 = 0;
		LOC4 = setms_540228(n, s);
		result = semdefined_538896(c, LOC4, NIM_TRUE);
	}
	break;
	case ((NU16) 3):
	{
		tnode225816* LOC6;
		LOC6 = 0;
		LOC6 = setms_540228(n, s);
		result = semcompiles_540100(c, LOC6, flags);
	}
	break;
	case ((NU16) 4):
	{
		tnode225816* LOC8;
		LOC8 = 0;
		LOC8 = setms_540228(n, s);
		result = semlowhigh_530538(c, LOC8, ((NU16) 4));
	}
	break;
	case ((NU16) 5):
	{
		tnode225816* LOC10;
		LOC10 = 0;
		LOC10 = setms_540228(n, s);
		result = semlowhigh_530538(c, LOC10, ((NU16) 5));
	}
	break;
	case ((NU16) 6):
	{
		tnode225816* LOC12;
		LOC12 = 0;
		LOC12 = setms_540228(n, s);
		result = semsizeof_530646(c, LOC12);
	}
	break;
	case ((NU16) 8):
	{
		tnode225816* LOC14;
		LOC14 = 0;
		LOC14 = setms_540228(n, s);
		result = semis_531075(c, LOC14);
	}
	break;
	case ((NU16) 9):
	{
		tnode225816* LOC16;
		LOC16 = 0;
		LOC16 = setms_540228(n, s);
		result = semof_530683(c, LOC16);
	}
	break;
	case ((NU16) 11):
	{
		result = semshallowcopy_533548(c, n, flags);
	}
	break;
	case ((NU16) 16):
	{
		result = semexpandtoast_539529(c, n, s, flags);
	}
	break;
	case ((NU16) 17):
	{
		result = semquoteast_487334(c, n);
	}
	break;
	case ((NU16) 165):
	{
		tnode225816* LOC21;
		NimStringDesc* LOC22;
		checksonslen_291416(n, 2);
		LOC21 = 0;
		LOC21 = HEX5BHEX5D_226698(n, 1);
		LOC22 = 0;
		LOC22 = rendertree_250058(LOC21, 4);
		result = newstrnodet_304042(LOC22, n);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 28)));
	}
	break;
	case ((NU16) 166):
	{
		tnode225816* x;
		result = setms_540228(n, s);
		x = lastson_226261(n);
		{
			if (!((*x).Kind == ((NU8) 52))) goto LA26;
			x = (*x).kindU.S6.Sons->data[6];
		}
		LA26: ;
		(*c).Inparallelstmt += 1;
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semstmt_487277(c, x));
		(*c).Inparallelstmt -= 1;
	}
	break;
	case ((NU16) 213):
	{
		result = setms_540228(n, s);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semexpr_487201(c, (*n).kindU.S6.Sons->data[1], 0));
		{
			tnode225816* LOC31;
			NIM_BOOL LOC32;
			tnode225816* LOC44;
			tsym225846* LOC45;
			tnode225816* LOC46;
			LOC31 = 0;
			LOC31 = HEX5BHEX5D_226698(result, 1);
			LOC32 = 0;
			LOC32 = isemptytype_232990((*LOC31).Typ);
			if (!!(LOC32)) goto LA33;
			{
				tnode225816* LOC37;
				NU8 LOC38;
				tnode225816* LOC41;
				LOC37 = 0;
				LOC37 = HEX5BHEX5D_226698(result, 1);
				LOC38 = 0;
				LOC38 = spawnresult_425994((*LOC37).Typ, (0 < (*c).Inparallelstmt));
				if (!(LOC38 == ((NU8) 1))) goto LA39;
				LOC41 = 0;
				LOC41 = HEX5BHEX5D_226698(result, 1);
				asgnRefNoCycle((void**) (&(*result).Typ), createflowvar_540143(c, (*LOC41).Typ, (*n).Info));
			}
			goto LA35;
			LA39: ;
			{
				tnode225816* LOC43;
				LOC43 = 0;
				LOC43 = HEX5BHEX5D_226698(result, 1);
				asgnRefNoCycle((void**) (&(*result).Typ), (*LOC43).Typ);
			}
			LA35: ;
			LOC44 = 0;
			LOC44 = HEX5BHEX5D_226698(result, 1);
			LOC45 = 0;
			LOC45 = instantiatecreateflowvarcall_540152(c, (*LOC44).Typ, (*n).Info);
			LOC46 = 0;
			LOC46 = newsymnode_226132(LOC45);
			add_226498(result, LOC46);
		}
		LA33: ;
	}
	break;
	case ((NU16) 218):
	{
		tnode225816* LOC48;
		result = setms_540228(n, s);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semexpr_487201(c, (*n).kindU.S6.Sons->data[1], 0));
		LOC48 = 0;
		LOC48 = HEX5BHEX5D_226698(n, 1);
		asgnRefNoCycle((void**) (&(*result).Typ), (*LOC48).Typ);
	}
	break;
	default:
	{
		result = semdirectop_488032(c, n, flags);
	}
	break;
	}
	return result;
}

N_NIMCALL(void, semopaux_531160)(tcontext290021* c, tnode225816* n) {
	{
		NI i_531178;
		NI HEX3Atmp_531303;
		NI LOC2;
		NI res_531306;
		i_531178 = 0;
		HEX3Atmp_531303 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_531303 = (NI32)(LOC2 - 1);
		res_531306 = 1;
		{
			while (1) {
				tnode225816* a;
				if (!(res_531306 <= HEX3Atmp_531303)) goto LA4;
				i_531178 = res_531306;
				a = (*n).kindU.S6.Sons->data[i_531178];
				{
					NIM_BOOL LOC7;
					NI LOC9;
					tlineinfo195539 info;
					tident200021* LOC12;
					LOC7 = 0;
					LOC7 = ((*a).Kind == ((NU8) 33));
					if (!(LOC7)) goto LA8;
					LOC9 = 0;
					LOC9 = sonslen_226249(a);
					LOC7 = (LOC9 == 2);
					LA8: ;
					if (!LOC7) goto LA10;
					info = (*(*a).kindU.S6.Sons->data[0]).Info;
					LOC12 = 0;
					LOC12 = considerquotedident_295010((*a).kindU.S6.Sons->data[0]);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newidentnode_226125(LOC12, info));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*a).kindU.S6.Sons->data[1], 16));
					asgnRefNoCycle((void**) (&(*a).Typ), (*(*a).kindU.S6.Sons->data[1]).Typ);
				}
				goto LA5;
				LA10: ;
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_531178]), semexprwithtype_487211(c, a, 16));
				}
				LA5: ;
				res_531306 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode225816*, overloadedcallopr_531320)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tident200021* par;
	result = 0;
	par = getident_200472(((NimStringDesc*) &TMP2998));
	{
		tsym225846* LOC3;
		LOC3 = 0;
		LOC3 = searchinscopes_295312(c, par);
		if (!(LOC3 == NIM_NIL)) goto LA4;
		result = NIM_NIL;
	}
	goto LA1;
	LA4: ;
	{
		tnode225816* LOC7;
		result = newnodei_226138(((NU8) 27), (*n).Info);
		LOC7 = 0;
		LOC7 = newidentnode_226125(par, (*n).Info);
		addson_226287(result, LOC7);
		{
			NI i_531355;
			NI HEX3Atmp_531371;
			NI LOC9;
			NI res_531374;
			i_531355 = 0;
			HEX3Atmp_531371 = 0;
			LOC9 = 0;
			LOC9 = sonslen_226249(n);
			HEX3Atmp_531371 = (NI32)(LOC9 - 1);
			res_531374 = 0;
			{
				while (1) {
					if (!(res_531374 <= HEX3Atmp_531371)) goto LA11;
					i_531355 = res_531374;
					addson_226287(result, (*n).kindU.S6.Sons->data[i_531355]);
					res_531374 += 1;
				} LA11: ;
			}
		}
		result = semexpr_487201(c, result, 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semindirectop_534467)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tnode225816* prc;
	tnode225816* norig;
	ttype225852* t;
	result = 0;
	result = NIM_NIL;
	checkminsonslen_291426(n, 1);
	prc = (*n).kindU.S6.Sons->data[0];
	{
		if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 45))) goto LA3;
		checksonslen_291416((*n).kindU.S6.Sons->data[0], 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semfieldaccess_528617(c, (*n).kindU.S6.Sons->data[0], 0));
		{
			if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 25))) goto LA7;
			result = (*n).kindU.S6.Sons->data[0];
			(*result).Kind = ((NU8) 27);
			(*result).Flags |= ((NI16)1)<<((((NU8) 10))%(sizeof(NI16)*8));
			{
				NI i_534618;
				NI HEX3Atmp_535028;
				NI LOC10;
				NI res_535031;
				i_534618 = 0;
				HEX3Atmp_535028 = 0;
				LOC10 = 0;
				LOC10 = sonslen_226249(n);
				HEX3Atmp_535028 = (NI32)(LOC10 - 1);
				res_535031 = 1;
				{
					while (1) {
						if (!(res_535031 <= HEX3Atmp_535028)) goto LA12;
						i_534618 = res_535031;
						addson_226287(result, (*n).kindU.S6.Sons->data[i_534618]);
						res_535031 += 1;
					} LA12: ;
				}
			}
			result = semexpr_487201(c, result, flags);
			goto BeforeRet;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexpr_487201(c, (*n).kindU.S6.Sons->data[0], 0));
	}
	LA1: ;
	norig = copytree_226329(n);
	semopaux_531160(c, n);
	t = NIM_NIL;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Typ == NIM_NIL))) goto LA16;
		t = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, IL64(211106232576000));
	}
	LA16: ;
	{
		NIM_BOOL LOC20;
		tcandidate405209 m;
		LOC20 = 0;
		LOC20 = !((t == NIM_NIL));
		if (!(LOC20)) goto LA21;
		LOC20 = ((*t).Kind == ((NU8) 25));
		LA21: ;
		if (!LOC20) goto LA22;
		memset((void*)(&m), 0, sizeof(m));
		initcandidate_405270(c, (&m), t);
		matches_414382(c, n, norig, (&m));
		{
			if (!!((m.State == ((NU8) 1)))) goto LA26;
			{
				if (!(0 < (*c).Incompilescontext)) goto LA30;
				globalerror_197934((*n).Info, ((NU16) 129), ((NimStringDesc*) &TMP2888));
				result = emptynode_226738;
				goto BeforeRet;
			}
			goto LA28;
			LA30: ;
			{
				NIM_BOOL haserrortype;
				NimStringDesc* msg;
				haserrortype = NIM_FALSE;
				msg = msgkindtostring_197378(((NU16) 129));
				{
					NI i_534779;
					NI HEX3Atmp_535036;
					NI LOC34;
					NI res_535039;
					i_534779 = 0;
					HEX3Atmp_535036 = 0;
					LOC34 = 0;
					LOC34 = sonslen_226249(n);
					HEX3Atmp_535036 = (NI32)(LOC34 - 1);
					res_535039 = 1;
					{
						while (1) {
							ttype225852* nt;
							NimStringDesc* LOC41;
							if (!(res_535039 <= HEX3Atmp_535036)) goto LA36;
							i_534779 = res_535039;
							{
								if (!(1 < i_534779)) goto LA39;
								msg = resizeString(msg, 2);
appendString(msg, ((NimStringDesc*) &TMP3234));
							}
							LA39: ;
							nt = (*(*n).kindU.S6.Sons->data[i_534779]).Typ;
							LOC41 = 0;
							LOC41 = typetostring_263031(nt, ((NU8) 0));
							msg = resizeString(msg, LOC41->Sup.len + 0);
appendString(msg, LOC41);
							{
								if (!((*nt).Kind == ((NU8) 50))) goto LA44;
								haserrortype = NIM_TRUE;
								goto LA33;
							}
							LA44: ;
							res_535039 += 1;
						} LA36: ;
					}
				} LA33: ;
				{
					NimStringDesc* LOC50;
					NimStringDesc* LOC51;
					NimStringDesc* LOC52;
					if (!!(haserrortype)) goto LA48;
					LOC50 = 0;
					LOC51 = 0;
					LOC51 = msgkindtostring_197378(((NU16) 130));
					LOC52 = 0;
					LOC52 = typetostring_263031((*(*n).kindU.S6.Sons->data[0]).Typ, ((NU8) 0));
					LOC50 = rawNewString(LOC51->Sup.len + LOC52->Sup.len + 3);
appendString(LOC50, ((NimStringDesc*) &TMP3281));
appendString(LOC50, LOC51);
appendString(LOC50, ((NimStringDesc*) &TMP3235));
appendString(LOC50, LOC52);
					msg = resizeString(msg, LOC50->Sup.len + 0);
appendString(msg, LOC50);
					localerror_197955((*n).Info, ((NU16) 4), msg);
				}
				LA48: ;
				result = errornode_291329(c, n);
				goto BeforeRet;
			}
			LA28: ;
			result = NIM_NIL;
		}
		goto LA24;
		LA26: ;
		{
			result = m.Call;
			instgenericconverterssons_493428(c, result, (&m));
		}
		LA24: ;
		{
			if (!!((((*t).Flags &(1<<((((NU8) 1))&31)))!=0))) goto LA56;
			(*(*(*c).P).Owner).Flags |= ((NI32)1)<<((((NU8) 11))%(sizeof(NI32)*8));
		}
		LA56: ;
	}
	goto LA18;
	LA22: ;
	{
		NIM_BOOL LOC59;
		ttype225852* desttype;
		LOC59 = 0;
		LOC59 = !((t == NIM_NIL));
		if (!(LOC59)) goto LA60;
		LOC59 = ((*t).Kind == ((NU8) 8));
		LA60: ;
		if (!LOC59) goto LA61;
		{
			NI LOC65;
			LOC65 = 0;
			LOC65 = len_226364(n);
			if (!(LOC65 == 1)) goto LA66;
			result = semobjconstr_534462(c, n, flags);
			goto BeforeRet;
		}
		LA66: ;
		desttype = skiptypes_230245(t, 2304);
		result = semconv_530168(c, n);
		goto BeforeRet;
	}
	goto LA18;
	LA61: ;
	{
		result = overloadedcallopr_531320(c, n);
		{
			if (!(result == NIM_NIL)) goto LA71;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), prc);
			asgnRefNoCycle((void**) (&(*norig).kindU.S6.Sons->data[0]), prc);
			(*n).Flags |= ((NI16)1)<<((((NU8) 11))%(sizeof(NI16)*8));
			result = semoverloadedcallanalyseeffects_534248(c, n, norig, flags);
			{
				if (!(result == NIM_NIL)) goto LA75;
				result = errornode_291329(c, n);
				goto BeforeRet;
			}
			LA75: ;
		}
		goto LA69;
		LA71: ;
		{
			if (!!(((*result).Kind == ((NU8) 27) || (*result).Kind == ((NU8) 29) || (*result).Kind == ((NU8) 30) || (*result).Kind == ((NU8) 31) || (*result).Kind == ((NU8) 26) || (*result).Kind == ((NU8) 28) || (*result).Kind == ((NU8) 32)))) goto LA78;
			goto BeforeRet;
		}
		goto LA69;
		LA78: ;
		LA69: ;
	}
	LA18: ;
	fixabstracttype_531831(c, result);
	analyseifaddresstakenincall_532577(c, result);
	{
		NIM_BOOL LOC82;
		LOC82 = 0;
		LOC82 = ((*(*result).kindU.S6.Sons->data[0]).Kind == ((NU8) 3));
		if (!(LOC82)) goto LA83;
		LOC82 = !(((*(*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic == ((NU16) 0)));
		LA83: ;
		if (!LOC82) goto LA84;
		result = magicsafteroverloadresolution_533553(c, result, flags);
	}
	LA84: ;
	result = evalatcompiletime_533591(c, result);
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, setgenericparams_543435)(tcontext290021* c, tnode225816* n) {
	{
		NI i_543460;
		NI HEX3Atmp_543462;
		NI LOC2;
		NI res_543465;
		i_543460 = 0;
		HEX3Atmp_543462 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_543462 = (LOC2 - 1);
		res_543465 = 1;
		{
			while (1) {
				tnode225816* LOC5;
				tnode225816* LOC6;
				if (!(res_543465 <= HEX3Atmp_543462)) goto LA4;
				i_543460 = res_543465;
				LOC5 = 0;
				LOC5 = HEX5BHEX5D_226698(n, i_543460);
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_226698(n, i_543460);
				asgnRefNoCycle((void**) (&(*LOC5).Typ), semtypenode_487269(c, LOC6, NIM_NIL));
				res_543465 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode225816*, semsymgenericinstantiation_528832)(tcontext290021* c, tnode225816* n, tsym225846* s) {
	tnode225816* result;
	result = 0;
	result = symchoice_504476(c, n, s, ((NU8) 0));
	return result;
}

N_NIMCALL(tnode225816*, explicitgenericsym_494127)(tcontext290021* c, tnode225816* n, tsym225846* s) {
	tnode225816* result;
	tcandidate405209 m;
	tsym225846* newinst;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405295(c, (&m), s, n, -1);
	newinst = generateinstance_490802(c, s, m.Bindings, (*n).Info);
	markused_405251((*n).Info, s);
	result = newsymnode_227755(newinst, (*n).Info);
	return result;
}

N_NIMCALL(tnode225816*, explicitgenericinsterror_494120)(tnode225816* n) {
	tnode225816* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = rendertree_250058(n, 0);
	localerror_197955((*n).Info, ((NU16) 124), LOC1);
	result = n;
	return result;
}

N_NIMCALL(tnode225816*, explicitgenericinstantiation_494205)(tcontext290021* c, tnode225816* n, tsym225846* s_494209) {
	tnode225816* result;
	tsym225846* s;
	tnode225816* a;
	result = 0;
	{
		NI i_494411;
		NI HEX3Atmp_494588;
		NI LOC2;
		NI res_494591;
		i_494411 = 0;
		HEX3Atmp_494588 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_494588 = (NI32)(LOC2 - 1);
		res_494591 = 1;
		{
			while (1) {
				if (!(res_494591 <= HEX3Atmp_494588)) goto LA4;
				i_494411 = res_494591;
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_494411]).Typ), semtypenode_487269(c, (*n).kindU.S6.Sons->data[i_494411], NIM_NIL));
				res_494591 += 1;
			} LA4: ;
		}
	}
	s = s_494209;
	a = (*n).kindU.S6.Sons->data[0];
	{
		if (!((*a).Kind == ((NU8) 3))) goto LA7;
		{
			NI LOC11;
			NI LOC12;
			NI expected;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			NI LOC17;
			NimStringDesc* LOC18;
			NimStringDesc* LOC19;
			LOC11 = 0;
			LOC11 = safelen_226424((*(*s).Ast).kindU.S6.Sons->data[2]);
			LOC12 = 0;
			LOC12 = len_226364(n);
			if (!!((LOC11 == (NI32)(LOC12 - 1)))) goto LA13;
			expected = safelen_226424((*(*s).Ast).kindU.S6.Sons->data[2]);
			LOC15 = 0;
			LOC16 = 0;
			LOC16 = rendertree_250058(n, 0);
			LOC17 = 0;
			LOC17 = len_226364(n);
			LOC18 = 0;
			LOC18 = nimIntToStr((NI32)(LOC17 - 1));
			LOC19 = 0;
			LOC19 = nimIntToStr(expected);
			LOC15 = rawNewString(LOC16->Sup.len + LOC18->Sup.len + LOC19->Sup.len + 48);
appendString(LOC15, ((NimStringDesc*) &TMP3282));
appendString(LOC15, LOC16);
appendString(LOC15, ((NimStringDesc*) &TMP3283));
appendString(LOC15, LOC18);
appendString(LOC15, ((NimStringDesc*) &TMP3284));
appendString(LOC15, LOC19);
			localerror_197955((*n).Info, ((NU16) 4), LOC15);
			result = n;
			goto BeforeRet;
		}
		LA13: ;
		result = explicitgenericsym_494127(c, n, s);
	}
	goto LA5;
	LA7: ;
	{
		if (!((*a).Kind == ((NU8) 56) || (*a).Kind == ((NU8) 57))) goto LA21;
		result = newnodei_226138((*a).Kind, (*n).Info);
		{
			NI i_494520;
			NI HEX3Atmp_494594;
			NI LOC24;
			NI res_494597;
			i_494520 = 0;
			HEX3Atmp_494594 = 0;
			LOC24 = 0;
			LOC24 = len_226364(a);
			HEX3Atmp_494594 = (NI32)(LOC24 - 1);
			res_494597 = 0;
			{
				while (1) {
					tsym225846* candidate;
					if (!(res_494597 <= HEX3Atmp_494594)) goto LA26;
					i_494520 = res_494597;
					candidate = (*(*a).kindU.S6.Sons->data[i_494520]).kindU.S4.Sym;
					{
						if (!((126976 &(1<<(((*candidate).Kind)&31)))!=0)) goto LA29;
						{
							NI LOC33;
							NI LOC34;
							tnode225816* LOC37;
							LOC33 = 0;
							LOC33 = safelen_226424((*(*candidate).Ast).kindU.S6.Sons->data[2]);
							LOC34 = 0;
							LOC34 = len_226364(n);
							if (!(LOC33 == (NI32)(LOC34 - 1))) goto LA35;
							LOC37 = 0;
							LOC37 = explicitgenericsym_494127(c, n, candidate);
							add_226498(result, LOC37);
						}
						LA35: ;
					}
					LA29: ;
					res_494597 += 1;
				} LA26: ;
			}
		}
		{
			NIM_BOOL LOC40;
			NI LOC41;
			LOC40 = 0;
			LOC41 = 0;
			LOC41 = len_226364(result);
			LOC40 = (LOC41 == 1);
			if (!(LOC40)) goto LA42;
			LOC40 = ((*a).Kind == ((NU8) 56));
			LA42: ;
			if (!LOC40) goto LA43;
			result = HEX5BHEX5D_226698(result, 0);
		}
		LA43: ;
	}
	goto LA5;
	LA21: ;
	{
		result = explicitgenericinsterror_494120(n);
	}
	LA5: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semarrayaccess_537259)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = semsubscript_536915(c, n, flags);
	{
		tident200021* LOC5;
		tnode225816* LOC6;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = getident_200472(((NimStringDesc*) &TMP3285));
		LOC6 = 0;
		LOC6 = buildoverloadedsubscripts_536829(n, LOC5);
		result = semexpr_487201(c, LOC6, 0);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, checkpar_541305)(tnode225816* n) {
	NU8 result;
	NI length;
	result = 0;
	length = sonslen_226249(n);
	{
		if (!(length == 0)) goto LA3;
		result = ((NU8) 3);
	}
	goto LA1;
	LA3: ;
	{
		if (!(length == 1)) goto LA6;
		{
			if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 34))) goto LA10;
			result = ((NU8) 2);
		}
		goto LA8;
		LA10: ;
		{
			result = ((NU8) 1);
		}
		LA8: ;
	}
	goto LA1;
	LA6: ;
	{
		{
			if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 34))) goto LA16;
			result = ((NU8) 2);
		}
		goto LA14;
		LA16: ;
		{
			result = ((NU8) 3);
		}
		LA14: ;
		{
			NI i_541368;
			NI HEX3Atmp_541495;
			NI res_541498;
			i_541368 = 0;
			HEX3Atmp_541495 = 0;
			HEX3Atmp_541495 = (NI32)(length - 1);
			res_541498 = 0;
			{
				while (1) {
					if (!(res_541498 <= HEX3Atmp_541495)) goto LA21;
					i_541368 = res_541498;
					{
						if (!(result == ((NU8) 2))) goto LA24;
						{
							NIM_BOOL LOC28;
							LOC28 = 0;
							LOC28 = !(((*(*n).kindU.S6.Sons->data[i_541368]).Kind == ((NU8) 34)));
							if (LOC28) goto LA29;
							LOC28 = !(((*(*(*n).kindU.S6.Sons->data[i_541368]).kindU.S6.Sons->data[0]).Kind == ((NU8) 3) || (*(*(*n).kindU.S6.Sons->data[i_541368]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)));
							LA29: ;
							if (!LOC28) goto LA30;
							localerror_197955((*(*n).kindU.S6.Sons->data[i_541368]).Info, ((NU16) 170), ((NimStringDesc*) &TMP2888));
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA30: ;
					}
					goto LA22;
					LA24: ;
					{
						{
							if (!((*(*n).kindU.S6.Sons->data[i_541368]).Kind == ((NU8) 34))) goto LA35;
							localerror_197955((*(*n).kindU.S6.Sons->data[i_541368]).Info, ((NU16) 171), ((NimStringDesc*) &TMP2888));
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA35: ;
					}
					LA22: ;
					res_541498 += 1;
				} LA21: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semtuplepositionsconstr_541899)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	ttype225852* typ;
	result = 0;
	result = n;
	typ = newtypes_290214(((NU8) 18), c);
	{
		NI i_541918;
		NI HEX3Atmp_541980;
		NI LOC2;
		NI res_541983;
		i_541918 = 0;
		HEX3Atmp_541980 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_541980 = (NI32)(LOC2 - 1);
		res_541983 = 0;
		{
			while (1) {
				if (!(res_541983 <= HEX3Atmp_541980)) goto LA4;
				i_541918 = res_541983;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_541918]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[i_541918], (flags & 32)));
				addsonskipintlit_282572(typ, (*(*n).kindU.S6.Sons->data[i_541918]).Typ);
				res_541983 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	return result;
}

N_NIMCALL(tnode225816*, semtuplefieldsconstr_541512)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	ttype225852* typ;
	intset222056 ids;
	result = 0;
	result = newnodei_226138(((NU8) 37), (*n).Info);
	typ = newtypes_290214(((NU8) 18), c);
	asgnRefNoCycle((void**) (&(*typ).N), newnodei_226138(((NU8) 137), (*n).Info));
	memset((void*)(&ids), 0, sizeof(ids));
	chckNil((void*)(&ids));
	memset((void*)(&ids), 0, sizeof(ids));
	initintset_222950((&ids));
	{
		NI i_541532;
		NI HEX3Atmp_541882;
		NI LOC2;
		NI res_541885;
		i_541532 = 0;
		HEX3Atmp_541882 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_541882 = (NI32)(LOC2 - 1);
		res_541885 = 0;
		{
			while (1) {
				tident200021* id;
				tsym225846* f;
				tnode225816* LOC24;
				if (!(res_541885 <= HEX3Atmp_541882)) goto LA4;
				i_541532 = res_541885;
				{
					NIM_BOOL LOC7;
					tnode225816* LOC8;
					tnode225816* LOC10;
					tnode225816* LOC11;
					LOC7 = 0;
					LOC8 = 0;
					LOC8 = HEX5BHEX5D_226698(n, i_541532);
					LOC7 = !(((*LOC8).Kind == ((NU8) 34)));
					if (LOC7) goto LA9;
					LOC10 = 0;
					LOC10 = HEX5BHEX5D_226698(n, i_541532);
					LOC11 = 0;
					LOC11 = HEX5BHEX5D_226698(LOC10, 0);
					LOC7 = !(((*LOC11).Kind == ((NU8) 3) || (*LOC11).Kind == ((NU8) 2)));
					LA9: ;
					if (!LOC7) goto LA12;
					illformedast_291406((*n).kindU.S6.Sons->data[i_541532]);
				}
				LA12: ;
				id = 0;
				{
					if (!((*(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2))) goto LA16;
					id = (*(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[0]).kindU.S5.Ident;
				}
				goto LA14;
				LA16: ;
				{
					id = (*(*(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name;
				}
				LA14: ;
				{
					NIM_BOOL LOC21;
					LOC21 = 0;
					LOC21 = containsorincl_222916((&ids), (*id).Sup.Id);
					if (!LOC21) goto LA22;
					localerror_197955((*(*n).kindU.S6.Sons->data[i_541532]).Info, ((NU16) 86), (*id).S);
				}
				LA22: ;
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[1], (flags & 32)));
				f = newsyms_487918(((NU8) 19), (*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[0], c);
				asgnRefNoCycle((void**) (&(*f).Typ), skipintlit_282531((*(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[1]).Typ));
				(*f).Position = i_541532;
				rawaddson_230562(typ, (*f).Typ);
				LOC24 = 0;
				LOC24 = newsymnode_226132(f);
				addson_226287((*typ).N, LOC24);
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_541532]).kindU.S6.Sons->data[0]), newsymnode_226132(f));
				addson_226287(result, (*n).kindU.S6.Sons->data[i_541532]);
				res_541885 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	return result;
}

N_NIMCALL(tnode225816*, semsetconstr_540633)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(((NU8) 39), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), newtypes_290214(((NU8) 19), c));
	{
		NI LOC3;
		ttype225852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_226249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_290214(((NU8) 3), c);
		rawaddson_230562((*result).Typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		ttype225852* typ;
		typ = NIM_NIL;
		{
			NI i_540651;
			NI HEX3Atmp_541163;
			NI LOC9;
			NI res_541166;
			i_540651 = 0;
			HEX3Atmp_541163 = 0;
			LOC9 = 0;
			LOC9 = sonslen_226249(n);
			HEX3Atmp_541163 = (NI32)(LOC9 - 1);
			res_541166 = 0;
			{
				while (1) {
					if (!(res_541166 <= HEX3Atmp_541163)) goto LA11;
					i_540651 = res_541166;
					{
						NIM_BOOL LOC14;
						LOC14 = 0;
						LOC14 = isrange_262216((*n).kindU.S6.Sons->data[i_540651]);
						if (!LOC14) goto LA15;
						checksonslen_291416((*n).kindU.S6.Sons->data[i_540651], 3);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[1]), semexprwithtype_487211(c, (*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[1], 0));
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[2]), semexprwithtype_487211(c, (*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[2], 0));
						{
							if (!(typ == NIM_NIL)) goto LA19;
							typ = skiptypes_230245((*(*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[1]).Typ, 8423424);
						}
						LA19: ;
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_540651]).Typ), (*(*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[2]).Typ);
					}
					goto LA12;
					LA15: ;
					{
						if (!((*(*n).kindU.S6.Sons->data[i_540651]).Kind == ((NU8) 44))) goto LA22;
						{
							if (!(typ == NIM_NIL)) goto LA26;
							typ = skiptypes_230245((*(*(*n).kindU.S6.Sons->data[i_540651]).kindU.S6.Sons->data[0]).Typ, 8423424);
						}
						LA26: ;
					}
					goto LA12;
					LA22: ;
					{
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_540651]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[i_540651], 0));
						{
							if (!(typ == NIM_NIL)) goto LA31;
							typ = skiptypes_230245((*(*n).kindU.S6.Sons->data[i_540651]).Typ, 8423424);
						}
						LA31: ;
					}
					LA12: ;
					res_541166 += 1;
				} LA11: ;
			}
		}
		{
			NIM_BOOL LOC35;
			ttype225852* LOC38;
			LOC35 = 0;
			LOC35 = isordinaltype_263092(typ);
			if (!!(LOC35)) goto LA36;
			localerror_197955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2888));
			LOC38 = 0;
			LOC38 = getsystype_282030(((NU8) 31));
			typ = makerangetype_291351(c, IL64(0), IL64(65535), (*n).Info, LOC38);
		}
		goto LA33;
		LA36: ;
		{
			NI64 LOC40;
			ttype225852* LOC43;
			LOC40 = 0;
			LOC40 = lengthord_263016(typ);
			if (!(IL64(65536) < LOC40)) goto LA41;
			LOC43 = 0;
			LOC43 = getsystype_282030(((NU8) 31));
			typ = makerangetype_291351(c, IL64(0), IL64(65535), (*n).Info, LOC43);
		}
		goto LA33;
		LA41: ;
		LA33: ;
		addsonskipintlit_282572((*result).Typ, typ);
		{
			NI i_541024;
			NI HEX3Atmp_541170;
			NI LOC45;
			NI res_541173;
			i_541024 = 0;
			HEX3Atmp_541170 = 0;
			LOC45 = 0;
			LOC45 = sonslen_226249(n);
			HEX3Atmp_541170 = (NI32)(LOC45 - 1);
			res_541173 = 0;
			{
				while (1) {
					tnode225816* m;
					if (!(res_541173 <= HEX3Atmp_541170)) goto LA47;
					i_541024 = res_541173;
					m = 0;
					{
						NIM_BOOL LOC50;
						tnode225816* LOC53;
						tnode225816* LOC54;
						LOC50 = 0;
						LOC50 = isrange_262216((*n).kindU.S6.Sons->data[i_541024]);
						if (!LOC50) goto LA51;
						m = newnodei_226138(((NU8) 44), (*(*n).kindU.S6.Sons->data[i_541024]).Info);
						LOC53 = 0;
						LOC53 = fitnode_487245(c, typ, (*(*n).kindU.S6.Sons->data[i_541024]).kindU.S6.Sons->data[1]);
						addson_226287(m, LOC53);
						LOC54 = 0;
						LOC54 = fitnode_487245(c, typ, (*(*n).kindU.S6.Sons->data[i_541024]).kindU.S6.Sons->data[2]);
						addson_226287(m, LOC54);
					}
					goto LA48;
					LA51: ;
					{
						if (!((*(*n).kindU.S6.Sons->data[i_541024]).Kind == ((NU8) 44))) goto LA56;
						m = (*n).kindU.S6.Sons->data[i_541024];
					}
					goto LA48;
					LA56: ;
					{
						m = fitnode_487245(c, typ, (*n).kindU.S6.Sons->data[i_541024]);
					}
					LA48: ;
					addson_226287(result, m);
					res_541173 += 1;
				} LA47: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semlambda_487261)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	tsym225846* s;
	tscope225840* LOC13;
	tnode225816* gp;
	result = 0;
	result = semprocannotation_524247(c, n);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = n;
	checksonslen_291416(n, 7);
	s = 0;
	{
		tnode225816* LOC7;
		tsym225846* LOC10;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_226698(n, 0);
		if (!!(((*LOC7).Kind == ((NU8) 3)))) goto LA8;
		LOC10 = 0;
		LOC10 = getcurrowner_290256();
		s = newsym_226074(((NU8) 12), idanon_200504, LOC10, (*n).Info);
		asgnRefNoCycle((void**) (&(*s).Ast), n);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_226132(s));
	}
	goto LA5;
	LA8: ;
	{
		tnode225816* LOC12;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(n, 0);
		s = (*LOC12).kindU.S4.Sym;
	}
	LA5: ;
	pushowner_290261(s);
	LOC13 = 0;
	LOC13 = openscope_295191(c);
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA16;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_504001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA14;
	LA16: ;
	{
		gp = newnodei_226138(((NU8) 75), (*n).Info);
	}
	LA14: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA21;
		semparamlist_487284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NIM_BOOL LOC25;
			NI LOC26;
			LOC25 = 0;
			LOC26 = 0;
			LOC26 = sonslen_226249(gp);
			LOC25 = (0 < LOC26);
			if (!(LOC25)) goto LA27;
			LOC25 = ((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1));
			LA27: ;
			if (!LOC25) goto LA28;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), gp);
		}
		LA28: ;
	}
	goto LA19;
	LA21: ;
	{
		asgnRefNoCycle((void**) (&(*s).Typ), newtypes_290214(((NU8) 25), c));
		rawaddson_230562((*s).Typ, NIM_NIL);
	}
	LA19: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA33;
		pragma_310079(c, s, (*n).kindU.S6.Sons->data[4], TMP3288);
	}
	LA33: ;
	(*s).Options = goptions_169116;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)))) goto LA37;
		{
			if (!(((*s).Flags &(1<<((((NU8) 5))&31)))!=0)) goto LA41;
			localerror_197955((*(*n).kindU.S6.Sons->data[6]).Info, ((NU16) 137), (*(*s).Name).S);
		}
		LA41: ;
		{
			NIM_BOOL LOC45;
			NI LOC46;
			NIM_BOOL LOC48;
			NI LOC49;
			tnode225816* LOC51;
			tnode225816* sembody;
			tnode225816* LOC54;
			LOC45 = 0;
			LOC46 = 0;
			LOC46 = len_226364(gp);
			LOC45 = (LOC46 == 0);
			if (LOC45) goto LA47;
			LOC48 = 0;
			LOC49 = 0;
			LOC49 = len_226364(gp);
			LOC48 = (LOC49 == 1);
			if (!(LOC48)) goto LA50;
			LOC51 = 0;
			LOC51 = HEX5BHEX5D_226698(gp, 0);
			LOC48 = (((*(*LOC51).Typ).Flags &(1<<((((NU8) 10))&31)))!=0);
			LA50: ;
			LOC45 = LOC48;
			LA47: ;
			if (!LOC45) goto LA52;
			pushproccon_290381(c, s);
			addresult_524075(c, (*(*s).Typ).Sons->data[0], (*n).Info, ((NU8) 12));
			LOC54 = 0;
			LOC54 = semprocbody_487238(c, (*n).kindU.S6.Sons->data[6]);
			sembody = hlobody_489479(c, LOC54);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_441373((*c).Module, sembody, s));
			addresultnode_524118(c, n);
			popproccon_290426(c);
		}
		goto LA43;
		LA52: ;
		{
			if (!!(((flags &(1<<((((NU8) 7))&15)))!=0))) goto LA56;
			localerror_197955((*n).Info, ((NU16) 227), ((NimStringDesc*) &TMP2888));
		}
		goto LA43;
		LA56: ;
		LA43: ;
		sideeffectscheck_490615(c, s);
	}
	goto LA35;
	LA37: ;
	{
		localerror_197955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA35: ;
	closescope_295211(c);
	popowner_290267();
	asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, iscastable_530025)(ttype225852* dst, ttype225852* src) {
	NIM_BOOL result;
	NI64 dstsize;
	NI64 srcsize;
	result = 0;
	{
		ttype225852* LOC3;
		LOC3 = 0;
		LOC3 = skiptypes_230245(dst, IL64(211106232576256));
		if (!((*LOC3).Kind == ((NU8) 27))) goto LA4;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA4: ;
	dstsize = 0;
	srcsize = 0;
	dstsize = computesize_263193(dst);
	srcsize = computesize_263193(src);
	{
		if (!(dstsize < IL64(0))) goto LA8;
		result = NIM_FALSE;
	}
	goto LA6;
	LA8: ;
	{
		if (!(srcsize < IL64(0))) goto LA11;
		result = NIM_FALSE;
	}
	goto LA6;
	LA11: ;
	{
		NIM_BOOL LOC14;
		LOC14 = 0;
		LOC14 = typeallowed_263231(dst, ((NU8) 3));
		if (!!(LOC14)) goto LA15;
		result = NIM_FALSE;
	}
	goto LA6;
	LA15: ;
	{
		NIM_BOOL LOC18;
		NIM_BOOL LOC19;
		ttype225852* LOC21;
		ttype225852* LOC23;
		LOC18 = 0;
		LOC19 = 0;
		LOC19 = (srcsize <= dstsize);
		if (LOC19) goto LA20;
		LOC21 = 0;
		LOC21 = skiptypes_230245(dst, IL64(211106232576256));
		LOC19 = ((*LOC21).Kind == ((NU8) 1) || (*LOC21).Kind == ((NU8) 14) || (*LOC21).Kind == ((NU8) 2) || (*LOC21).Kind >= ((NU8) 31) && (*LOC21).Kind <= ((NU8) 44));
		LA20: ;
		LOC18 = LOC19;
		if (LOC18) goto LA22;
		LOC23 = 0;
		LOC23 = skiptypes_230245(src, IL64(211106232576000));
		LOC18 = ((*LOC23).Kind == ((NU8) 1) || (*LOC23).Kind == ((NU8) 14) || (*LOC23).Kind == ((NU8) 2) || (*LOC23).Kind >= ((NU8) 31) && (*LOC23).Kind <= ((NU8) 44));
		LA22: ;
		result = LOC18;
	}
	LA6: ;
	{
		NIM_BOOL LOC26;
		LOC26 = 0;
		LOC26 = result;
		if (!(LOC26)) goto LA27;
		LOC26 = ((*src).Kind == ((NU8) 5));
		LA27: ;
		if (!LOC26) goto LA28;
		result = ((*dst).Size <= ((NI64) (ptrsize_174612)));
	}
	LA28: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semcast_530461)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* LOC5;
	tnode225816* LOC6;
	result = 0;
	{
		if (!((gglobaloptions_169118 &(1<<((((NU8) 6))&31)))!=0)) goto LA3;
		localerror_197955((*n).Info, ((NU16) 91), ((NimStringDesc*) &TMP2888));
	}
	LA3: ;
	checksonslen_291416(n, 2);
	result = newnodei_226138(((NU8) 61), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), semtypenode_487269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL));
	LOC5 = 0;
	LOC5 = copytree_226329((*n).kindU.S6.Sons->data[0]);
	addson_226287(result, LOC5);
	LOC6 = 0;
	LOC6 = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[1], 0);
	addson_226287(result, LOC6);
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC12;
		LOC9 = 0;
		LOC9 = iscastable_530025((*result).Typ, (*(*result).kindU.S6.Sons->data[1]).Typ);
		if (!!(LOC9)) goto LA10;
		LOC12 = 0;
		LOC12 = typetostring_263031((*result).Typ, ((NU8) 0));
		localerror_197955((*result).Info, ((NU16) 92), LOC12);
	}
	LA10: ;
	return result;
}

static N_INLINE(void, semdestructorcheck_517185)(tcontext290021* c, tnode225816* n, NU16 flags) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((flags &(1<<((((NU8) 5))&15)))!=0));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*n).Kind >= ((NU8) 26) && (*n).Kind <= ((NU8) 32) || (*n).Kind == ((NU8) 38));
		LA4: ;
		if (!LOC3) goto LA5;
		{
			ttype225852* LOC9;
			LOC9 = 0;
			LOC9 = instantiatedestructor_515765(c, (*n).Typ);
			if (!!((LOC9 == NIM_NIL))) goto LA10;
			localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3289));
		}
		LA10: ;
	}
	LA5: ;
}

N_NIMCALL(tnode225816*, semexprbranch_517411)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = semexpr_487201(c, n, 0);
	{
		if (!!(((*result).Typ == NIM_NIL))) goto LA3;
		semprocvarcheck_515664(c, result);
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA7;
			result = newderef_517404(result);
		}
		LA7: ;
		semdestructorcheck_517185(c, result, 0);
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, semexprbranchscope_517447)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	result = semexprbranch_517411(c, n);
	closescope_295211(c);
	return result;
}

N_NIMCALL(tnode225816*, semif_517734)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* typ;
	NIM_BOOL haselse;
	result = 0;
	result = n;
	typ = commontypebegin_487459;
	haselse = NIM_FALSE;
	{
		NI i_517753;
		NI HEX3Atmp_518142;
		NI LOC2;
		NI res_518145;
		i_517753 = 0;
		HEX3Atmp_518142 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_518142 = (NI32)(LOC2 - 1);
		res_518145 = 0;
		{
			while (1) {
				tnode225816* it;
				if (!(res_518145 <= HEX3Atmp_518142)) goto LA4;
				i_517753 = res_518145;
				it = (*n).kindU.S6.Sons->data[i_517753];
				{
					NI LOC7;
					tscope225840* LOC10;
					tnode225816* LOC11;
					LOC7 = 0;
					LOC7 = len_226364(it);
					if (!(LOC7 == 2)) goto LA8;
					LOC10 = 0;
					LOC10 = openscope_295191(c);
					LOC11 = 0;
					LOC11 = semexprwithtype_487211(c, (*it).kindU.S6.Sons->data[0], 0);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), forcebool_495036(c, LOC11));
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), semexprbranch_517411(c, (*it).kindU.S6.Sons->data[1]));
					typ = commontype_487492(typ, (*(*it).kindU.S6.Sons->data[1]).Typ);
					closescope_295211(c);
				}
				goto LA5;
				LA8: ;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = len_226364(it);
					if (!(LOC13 == 1)) goto LA14;
					haselse = NIM_TRUE;
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), semexprbranchscope_517447(c, (*it).kindU.S6.Sons->data[0]));
					typ = commontype_487492(typ, (*(*it).kindU.S6.Sons->data[0]).Typ);
				}
				goto LA5;
				LA14: ;
				{
					illformedast_291406(it);
				}
				LA5: ;
				res_518145 += 1;
			} LA4: ;
		}
	}
	{
		NIM_BOOL LOC19;
		NIM_BOOL LOC20;
		LOC19 = 0;
		LOC20 = 0;
		LOC20 = isemptytype_232990(typ);
		if (LOC20) goto LA21;
		LOC20 = ((*typ).Kind == ((NU8) 5));
		LA21: ;
		LOC19 = LOC20;
		if (LOC19) goto LA22;
		LOC19 = !(haselse);
		LA22: ;
		if (!LOC19) goto LA23;
		{
			tnode225816* it_518094;
			it_518094 = 0;
			{
				NI i_518151;
				NI HEX3Atmp_518153;
				NI LOC27;
				NI res_518155;
				i_518151 = 0;
				HEX3Atmp_518153 = 0;
				LOC27 = 0;
				LOC27 = len_226364(n);
				HEX3Atmp_518153 = (LOC27 - 1);
				res_518155 = 0;
				{
					while (1) {
						tnode225816* LOC30;
						if (!(res_518155 <= HEX3Atmp_518153)) goto LA29;
						i_518151 = res_518155;
						it_518094 = (*n).kindU.S6.Sons->data[i_518151];
						LOC30 = 0;
						LOC30 = lastson_226261(it_518094);
						discardcheck_517617(c, LOC30);
						res_518155 += 1;
					} LA29: ;
				}
			}
		}
		(*result).Kind = ((NU8) 92);
		{
			if (!(typ == enforcevoidcontext_515110)) goto LA33;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_515110);
		}
		LA33: ;
	}
	goto LA17;
	LA23: ;
	{
		{
			tnode225816* it_518111;
			it_518111 = 0;
			{
				NI i_518160;
				NI HEX3Atmp_518162;
				NI LOC38;
				NI res_518164;
				i_518160 = 0;
				HEX3Atmp_518162 = 0;
				LOC38 = 0;
				LOC38 = len_226364(n);
				HEX3Atmp_518162 = (LOC38 - 1);
				res_518164 = 0;
				{
					while (1) {
						NI j;
						NI LOC41;
						if (!(res_518164 <= HEX3Atmp_518162)) goto LA40;
						i_518160 = res_518164;
						it_518111 = (*n).kindU.S6.Sons->data[i_518160];
						LOC41 = 0;
						LOC41 = len_226364(it_518111);
						j = (NI32)(LOC41 - 1);
						asgnRefNoCycle((void**) (&(*it_518111).kindU.S6.Sons->data[j]), fitnode_487245(c, typ, (*it_518111).kindU.S6.Sons->data[j]));
						res_518164 += 1;
					} LA40: ;
				}
			}
		}
		(*result).Kind = ((NU8) 48);
		asgnRefNoCycle((void**) (&(*result).Typ), typ);
	}
	LA17: ;
	return result;
}

N_NIMCALL(tnode225816*, semtableconstr_541196)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI lastkey;
	result = 0;
	result = newnodei_226138(((NU8) 41), (*n).Info);
	lastkey = 0;
	{
		NI i_541212;
		NI HEX3Atmp_541273;
		NI LOC2;
		NI res_541276;
		i_541212 = 0;
		HEX3Atmp_541273 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_541273 = (NI32)(LOC2 - 1);
		res_541276 = 0;
		{
			while (1) {
				tnode225816* x;
				if (!(res_541276 <= HEX3Atmp_541273)) goto LA4;
				i_541212 = res_541276;
				x = (*n).kindU.S6.Sons->data[i_541212];
				{
					NIM_BOOL LOC7;
					NI LOC9;
					tnode225816* pair;
					tnode225816* LOC16;
					tnode225816* LOC17;
					LOC7 = 0;
					LOC7 = ((*x).Kind == ((NU8) 34));
					if (!(LOC7)) goto LA8;
					LOC9 = 0;
					LOC9 = sonslen_226249(x);
					LOC7 = (LOC9 == 2);
					LA8: ;
					if (!LOC7) goto LA10;
					{
						NI j_541249;
						NI HEX3Atmp_541268;
						NI res_541271;
						j_541249 = 0;
						HEX3Atmp_541268 = 0;
						HEX3Atmp_541268 = (NI32)(i_541212 - 1);
						res_541271 = lastkey;
						{
							while (1) {
								tnode225816* pair;
								tnode225816* LOC15;
								if (!(res_541271 <= HEX3Atmp_541268)) goto LA14;
								j_541249 = res_541271;
								pair = newnodei_226138(((NU8) 37), (*x).Info);
								add_226498(pair, (*n).kindU.S6.Sons->data[j_541249]);
								LOC15 = 0;
								LOC15 = HEX5BHEX5D_226698(x, 1);
								add_226498(pair, LOC15);
								add_226498(result, pair);
								res_541271 += 1;
							} LA14: ;
						}
					}
					pair = newnodei_226138(((NU8) 37), (*x).Info);
					LOC16 = 0;
					LOC16 = HEX5BHEX5D_226698(x, 0);
					add_226498(pair, LOC16);
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_226698(x, 1);
					add_226498(pair, LOC17);
					add_226498(result, pair);
					lastkey = (NI32)(i_541212 + 1);
				}
				LA10: ;
				res_541276 += 1;
			} LA4: ;
		}
	}
	{
		NI LOC20;
		LOC20 = 0;
		LOC20 = len_226364(n);
		if (!!((lastkey == LOC20))) goto LA21;
		illformedast_291406(n);
	}
	LA21: ;
	result = semexpr_487201(c, result, 0);
	return result;
}

N_NIMCALL(tnode225816*, semstaticexpr_534214)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* a;
	result = 0;
	a = semexpr_487201(c, (*n).kindU.S6.Sons->data[0], 0);
	result = evalstaticexpr_477237((*c).Module, a, (*(*c).P).Owner);
	{
		NimStringDesc* LOC5;
		if (!result == 0) goto LA3;
		LOC5 = 0;
		LOC5 = rendertree_250058(n, 0);
		localerror_197955((*n).Info, ((NU16) 208), LOC5);
		result = emptynode_226738;
	}
	goto LA1;
	LA3: ;
	{
		result = fixuptypeaftereval_488201(c, result, a);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semblock_542699)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	result = 0;
	result = n;
	(*(*c).P).Nestedblockcounter += 1;
	checksonslen_291416(n, 2);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	{
		tsym225846* labl;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA4;
		labl = newsymg_487930(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
		{
			if (!!((((*labl).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA8;
			adddecl_295694(c, labl);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227755(labl, (*(*n).kindU.S6.Sons->data[0]).Info));
		}
		LA8: ;
		suggestsym_420882((*(*n).kindU.S6.Sons->data[0]).Info, labl);
	}
	LA4: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexpr_487201(c, (*n).kindU.S6.Sons->data[1], 0));
	asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[1]).Typ);
	{
		NIM_BOOL LOC12;
		LOC12 = 0;
		LOC12 = isemptytype_232990((*n).Typ);
		if (!LOC12) goto LA13;
		(*n).Kind = ((NU8) 112);
	}
	goto LA10;
	LA13: ;
	{
		(*n).Kind = ((NU8) 127);
	}
	LA10: ;
	closescope_295211(c);
	(*(*c).P).Nestedblockcounter -= 1;
	return result;
}

N_NIMCALL(tnode225816*, semtry_518853)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	ttype225852* typ_518870;
	intset222056 check;
	NI last;
	NI LOC1;
	result = 0;
	result = n;
	(*(*c).P).Intrystmt += 1;
	checkminsonslen_291426(n, 2);
	typ_518870 = commontypebegin_487459;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprbranchscope_517447(c, (*n).kindU.S6.Sons->data[0]));
	typ_518870 = commontype_487492(typ_518870, (*(*n).kindU.S6.Sons->data[0]).Typ);
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_222950((&check));
	LOC1 = 0;
	LOC1 = sonslen_226249(n);
	last = (NI32)(LOC1 - 1);
	{
		NI i_518927;
		NI res_519421;
		i_518927 = 0;
		res_519421 = 1;
		{
			while (1) {
				tnode225816* a;
				NI length;
				if (!(res_519421 <= last)) goto LA4;
				i_518927 = res_519421;
				a = (*n).kindU.S6.Sons->data[i_518927];
				checkminsonslen_291426(a, 1);
				length = sonslen_226249(a);
				{
					if (!((*a).Kind == ((NU8) 87))) goto LA7;
					{
						NIM_BOOL LOC11;
						slice84173 LOC15;
						LOC11 = 0;
						LOC11 = (length == 2);
						if (!(LOC11)) goto LA12;
						LOC11 = ((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 41));
						LA12: ;
						if (!LOC11) goto LA13;
						LOC15 = HEX2EHEX2E_92298(0, 0);
						HEX5BHEX5DHEX3D_492447((&(*a).kindU.S6.Sons), LOC15, (*(*a).kindU.S6.Sons->data[0]).kindU.S6.Sons->data, (*(*a).kindU.S6.Sons->data[0]).kindU.S6.Sons->Sup.len);
						length = sonslen_226249(a);
					}
					LA13: ;
					{
						NI j_519067;
						NI HEX3Atmp_519414;
						NI res_519417;
						j_519067 = 0;
						HEX3Atmp_519414 = 0;
						HEX3Atmp_519414 = (NI32)(length - 2);
						res_519417 = 0;
						{
							while (1) {
								ttype225852* typ;
								if (!(res_519417 <= HEX3Atmp_519414)) goto LA18;
								j_519067 = res_519417;
								typ = semtypenode_487269(c, (*a).kindU.S6.Sons->data[j_519067], NIM_NIL);
								{
									if (!((*typ).Kind == ((NU8) 22))) goto LA21;
									typ = (*typ).Sons->data[0];
								}
								LA21: ;
								{
									if (!!(((*typ).Kind == ((NU8) 17)))) goto LA25;
									localerror_197955((*(*a).kindU.S6.Sons->data[j_519067]).Info, ((NU16) 112), ((NimStringDesc*) &TMP2888));
								}
								LA25: ;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_519067]), newnodei_226138(((NU8) 4), (*(*a).kindU.S6.Sons->data[j_519067]).Info));
								asgnRefNoCycle((void**) (&(*(*a).kindU.S6.Sons->data[j_519067]).Typ), typ);
								{
									NIM_BOOL LOC29;
									LOC29 = 0;
									LOC29 = containsorincl_222916((&check), (*typ).Sup.Id);
									if (!LOC29) goto LA30;
									localerror_197955((*(*a).kindU.S6.Sons->data[j_519067]).Info, ((NU16) 35), ((NimStringDesc*) &TMP2888));
								}
								LA30: ;
								res_519417 += 1;
							} LA18: ;
						}
					}
				}
				goto LA5;
				LA7: ;
				{
					if (!!(((*a).Kind == ((NU8) 107)))) goto LA33;
					illformedast_291406(n);
				}
				goto LA5;
				LA33: ;
				LA5: ;
				asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI32)(length - 1)]), semexprbranchscope_517447(c, (*a).kindU.S6.Sons->data[(NI32)(length - 1)]));
				{
					if (!!(((*a).Kind == ((NU8) 107)))) goto LA37;
					typ_518870 = commontype_487492(typ_518870, (*(*a).kindU.S6.Sons->data[(NI32)(length - 1)]).Typ);
				}
				goto LA35;
				LA37: ;
				{
					last -= 1;
				}
				LA35: ;
				res_519421 += 1;
			} LA4: ;
		}
	}
	(*(*c).P).Intrystmt -= 1;
	{
		NIM_BOOL LOC42;
		LOC42 = 0;
		LOC42 = isemptytype_232990(typ_518870);
		if (LOC42) goto LA43;
		LOC42 = ((*typ_518870).Kind == ((NU8) 5));
		LA43: ;
		if (!LOC42) goto LA44;
		discardcheck_517617(c, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_519289;
			NI HEX3Atmp_519424;
			NI LOC47;
			NI res_519427;
			i_519289 = 0;
			HEX3Atmp_519424 = 0;
			LOC47 = 0;
			LOC47 = len_226364(n);
			HEX3Atmp_519424 = (NI32)(LOC47 - 1);
			res_519427 = 1;
			{
				while (1) {
					tnode225816* LOC50;
					if (!(res_519427 <= HEX3Atmp_519424)) goto LA49;
					i_519289 = res_519427;
					LOC50 = 0;
					LOC50 = lastson_226261((*n).kindU.S6.Sons->data[i_519289]);
					discardcheck_517617(c, LOC50);
					res_519427 += 1;
				} LA49: ;
			}
		}
		{
			if (!(typ_518870 == enforcevoidcontext_515110)) goto LA53;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_515110);
		}
		LA53: ;
	}
	goto LA40;
	LA44: ;
	{
		{
			tnode225816* LOC58;
			tnode225816* LOC61;
			tnode225816* LOC62;
			LOC58 = 0;
			LOC58 = lastson_226261(n);
			if (!((*LOC58).Kind == ((NU8) 107))) goto LA59;
			LOC61 = 0;
			LOC61 = lastson_226261(n);
			LOC62 = 0;
			LOC62 = lastson_226261(LOC61);
			discardcheck_517617(c, LOC62);
		}
		LA59: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), fitnode_487245(c, typ_518870, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_519367;
			NI res_519432;
			i_519367 = 0;
			res_519432 = 1;
			{
				while (1) {
					tnode225816* it;
					NI j;
					NI LOC66;
					if (!(res_519432 <= last)) goto LA65;
					i_519367 = res_519432;
					it = (*n).kindU.S6.Sons->data[i_519367];
					LOC66 = 0;
					LOC66 = len_226364(it);
					j = (NI32)(LOC66 - 1);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[j]), fitnode_487245(c, typ_518870, (*it).kindU.S6.Sons->data[j]));
					res_519432 += 1;
				} LA65: ;
			}
		}
		asgnRefNoCycle((void**) (&(*result).Typ), typ_518870);
	}
	LA40: ;
	return result;
}

N_NIMCALL(NIM_BOOL, usesresult_527404)(tnode225816* n) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!(((*n).Kind >= ((NU8) 51) && (*n).Kind <= ((NU8) 52) || (*n).Kind >= ((NU8) 79) && (*n).Kind <= ((NU8) 81) || (*n).Kind == ((NU8) 84) || (*n).Kind == ((NU8) 115) || (*n).Kind == ((NU8) 126)))) goto LA3;
		{
			NIM_BOOL LOC7;
			NIM_BOOL LOC10;
			LOC7 = 0;
			LOC7 = isatom_232962(n);
			if (!LOC7) goto LA8;
			LOC10 = 0;
			LOC10 = ((*n).Kind == ((NU8) 3));
			if (!(LOC10)) goto LA11;
			LOC10 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 11));
			LA11: ;
			result = LOC10;
		}
		goto LA5;
		LA8: ;
		{
			if (!((*n).Kind == ((NU8) 109))) goto LA13;
			result = NIM_TRUE;
		}
		goto LA5;
		LA13: ;
		{
			{
				tnode225816* c_527480;
				c_527480 = 0;
				{
					NI i_527485;
					NI HEX3Atmp_527487;
					NI LOC18;
					NI res_527489;
					i_527485 = 0;
					HEX3Atmp_527487 = 0;
					LOC18 = 0;
					LOC18 = len_226364(n);
					HEX3Atmp_527487 = (LOC18 - 1);
					res_527489 = 0;
					{
						while (1) {
							if (!(res_527489 <= HEX3Atmp_527487)) goto LA20;
							i_527485 = res_527489;
							c_527480 = (*n).kindU.S6.Sons->data[i_527485];
							{
								NIM_BOOL LOC23;
								LOC23 = 0;
								LOC23 = usesresult_527404(c_527480);
								if (!LOC23) goto LA24;
								result = NIM_TRUE;
								goto BeforeRet;
							}
							LA24: ;
							res_527489 += 1;
						} LA20: ;
					}
				}
			}
		}
		LA5: ;
	}
	LA3: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, insertdestructors_516904)(tcontext290021* c, tnode225816* varsection, TY516908* Result) {
	NI totalvars;
	totalvars = sonslen_226249(varsection);
	{
		NI j_516925;
		NI HEX3Atmp_517165;
		NI res_517168;
		j_516925 = 0;
		HEX3Atmp_517165 = 0;
		HEX3Atmp_517165 = (NI32)(totalvars - 1);
		res_517168 = 0;
		{
			while (1) {
				if (!(res_517168 <= HEX3Atmp_517165)) goto LA3;
				j_516925 = res_517168;
				{
					tnode225816* varid;
					tnode225816* LOC5;
					ttype225852* vartyp;
					tlineinfo195539 info;
					ttype225852* destructablet;
					LOC5 = 0;
					LOC5 = HEX5BHEX5D_226698(varsection, j_516925);
					varid = HEX5BHEX5D_226698(LOC5, 0);
					vartyp = (*(*varid).kindU.S4.Sym).Typ;
					info = (*varid).Info;
					{
						NIM_BOOL LOC8;
						LOC8 = 0;
						LOC8 = (vartyp == NIM_NIL);
						if (LOC8) goto LA9;
						LOC8 = (((*(*varid).kindU.S4.Sym).Flags &(1<<((((NU8) 3))&31)))!=0);
						LA9: ;
						if (!LOC8) goto LA10;
						goto LA4;
					}
					LA10: ;
					destructablet = instantiatedestructor_515765(c, vartyp);
					{
						tnode225816* trystmt;
						tnodeseq225810* LOC28;
						TY246892 LOC29;
						tnodeseq225810* LOC30;
						TY291287 LOC31;
						tnode225816* LOC32;
						tnode225816* LOC33;
						if (!!((destructablet == NIM_NIL))) goto LA14;
						trystmt = newnodei_226138(((NU8) 106), info);
						{
							tnode225816* remainingvars;
							slice84173 LOC20;
							TY516908 LOC21;
							tnode225816* outer;
							tnode225816* inner;
							if (!(j_516925 < (NI32)(totalvars - 1))) goto LA18;
							remainingvars = newnodei_226138((*varsection).Kind, info);
							LOC20 = HEX2EHEX2E_92298((NI32)(j_516925 + 1), -1);
							asgnRefNoCycle((void**) (&(*remainingvars).kindU.S6.Sons), HEX5BHEX5D_516155((*varsection).kindU.S6.Sons, LOC20));
							memset((void*)(&LOC21), 0, sizeof(LOC21));
							insertdestructors_516904(c, remainingvars, (&LOC21));
							outer = 0;
							outer = LOC21.Field0;
							inner = 0;
							inner = LOC21.Field1;
							{
								if (!!((outer == NIM_NIL))) goto LA24;
								addson_226287(trystmt, outer);
								unsureAsgnRef((void**) (&(*Result).Field1), inner);
							}
							goto LA22;
							LA24: ;
							{
								unsureAsgnRef((void**) (&(*Result).Field1), newnodei_226138(((NU8) 115), info));
								addson_226287((*Result).Field1, remainingvars);
								addson_226287(trystmt, (*Result).Field1);
							}
							LA22: ;
						}
						goto LA16;
						LA18: ;
						{
							unsureAsgnRef((void**) (&(*Result).Field1), newnodei_226138(((NU8) 115), info));
							addson_226287(trystmt, (*Result).Field1);
						}
						LA16: ;
						LOC28 = 0;
						LOC28 = (tnodeseq225810*) newSeq((&NTI225810), 1);
						memset((void*)LOC29, 0, sizeof(LOC29));
						LOC30 = 0;
						LOC30 = (tnodeseq225810*) newSeq((&NTI225810), 2);
						memset((void*)LOC31, 0, sizeof(LOC31));
						LOC31[0] = usesym_421001((*destructablet).Destructor);
						LOC31[1] = usesym_421001((*varid).kindU.S4.Sym);
						asgnRefNoCycle((void**) (&LOC30->data[0]), LOC31[0]);
						asgnRefNoCycle((void**) (&LOC30->data[1]), LOC31[1]);
						LOC32 = 0;
						LOC32 = newnode_228207(((NU8) 27), info, LOC30, NIM_NIL);
						LOC29[0] = semstmt_487277(c, LOC32);
						asgnRefNoCycle((void**) (&LOC28->data[0]), LOC29[0]);
						LOC33 = 0;
						LOC33 = newnode_228207(((NU8) 107), info, LOC28, NIM_NIL);
						addson_226287(trystmt, LOC33);
						unsureAsgnRef((void**) (&(*Result).Field0), newnodei_226138(((NU8) 115), info));
						(*varsection).kindU.S6.Sons = (tnodeseq225810*) setLengthSeq(&((*varsection).kindU.S6.Sons)->Sup, sizeof(tnode225816*), (NI32)(j_516925 + 1));
						addson_226287((*Result).Field0, varsection);
						addson_226287((*Result).Field0, trystmt);
						goto BeforeRet;
					}
					LA14: ;
				} LA4: ;
				res_517168 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tnode225816*, semstmtlist_527505)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	NI length;
	NIM_BOOL voidcontext;
	NI last;
	result = 0;
	result = n;
	(*result).Kind = ((NU8) 115);
	length = sonslen_226249(n);
	voidcontext = NIM_FALSE;
	last = (NI32)(length - 1);
	{
		NI i_527528;
		NI HEX3Atmp_528410;
		NI res_528413;
		i_527528 = 0;
		HEX3Atmp_528410 = 0;
		HEX3Atmp_528410 = (NI32)(length - 1);
		res_528413 = 0;
		{
			while (1) {
				NU8 k;
				if (!(res_528413 <= HEX3Atmp_528410)) goto LA3;
				i_527528 = res_528413;
				k = (*(*n).kindU.S6.Sons->data[i_527528]).Kind;
				switch (k) {
				case ((NU8) 107):
				case ((NU8) 87):
				case ((NU8) 105):
				{
					tnode225816* deferpart;
					tnode225816* trystmt;
					tnode225816* body;
					deferpart = 0;
					{
						if (!(k == ((NU8) 105))) goto LA7;
						deferpart = newnodei_226138(((NU8) 107), (*(*n).kindU.S6.Sons->data[i_527528]).Info);
						add_226498(deferpart, (*(*n).kindU.S6.Sons->data[i_527528]).kindU.S6.Sons->data[0]);
					}
					goto LA5;
					LA7: ;
					{
						if (!(k == ((NU8) 107))) goto LA10;
						message_197976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3290));
						deferpart = (*n).kindU.S6.Sons->data[i_527528];
					}
					goto LA5;
					LA10: ;
					{
						message_197976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3291));
						deferpart = (*n).kindU.S6.Sons->data[i_527528];
					}
					LA5: ;
					trystmt = newnodei_226138(((NU8) 106), (*(*n).kindU.S6.Sons->data[i_527528]).Info);
					body = newnodei_226138(((NU8) 115), (*(*n).kindU.S6.Sons->data[i_527528]).Info);
					{
						NI LOC15;
						slice84173 LOC18;
						LOC15 = 0;
						LOC15 = sonslen_226249(n);
						if (!(i_527528 < (NI32)(LOC15 - 1))) goto LA16;
						LOC18 = HEX2EHEX2E_92298((NI32)(i_527528 + 1), -1);
						asgnRefNoCycle((void**) (&(*body).kindU.S6.Sons), HEX5BHEX5D_516155((*n).kindU.S6.Sons, LOC18));
					}
					LA16: ;
					addson_226287(trystmt, body);
					addson_226287(trystmt, deferpart);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_527528]), semtry_518853(c, trystmt));
					(*n).kindU.S6.Sons = (tnodeseq225810*) setLengthSeq(&((*n).kindU.S6.Sons)->Sup, sizeof(tnode225816*), (NI32)(i_527528 + 1));
					asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[i_527528]).Typ);
					goto BeforeRet;
				}
				break;
				default:
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_527528]), semexpr_487201(c, (*n).kindU.S6.Sons->data[i_527528], 0));
					{
						NIM_BOOL LOC22;
						NIM_BOOL LOC23;
						tnode225816* LOC25;
						tnode225816* LOC27;
						tnode225816* verdict;
						tnode225816* LOC30;
						LOC22 = 0;
						LOC23 = 0;
						LOC23 = (0 < (*c).Intypeclass);
						if (!(LOC23)) goto LA24;
						LOC25 = 0;
						LOC25 = HEX5BHEX5D_226698(n, i_527528);
						LOC23 = !(((*LOC25).Typ == NIM_NIL));
						LA24: ;
						LOC22 = LOC23;
						if (!(LOC22)) goto LA26;
						LOC27 = 0;
						LOC27 = HEX5BHEX5D_226698(n, i_527528);
						LOC22 = ((*(*LOC27).Typ).Kind == ((NU8) 1));
						LA26: ;
						if (!LOC22) goto LA28;
						LOC30 = 0;
						LOC30 = HEX5BHEX5D_226698(n, i_527528);
						verdict = semconstexpr_488503(c, LOC30);
						{
							if (!((*verdict).kindU.S1.Intval == IL64(0))) goto LA33;
							localerror_197966((*result).Info, ((NimStringDesc*) &TMP3292));
						}
						LA33: ;
					}
					LA28: ;
					{
						NIM_BOOL LOC37;
						LOC37 = 0;
						LOC37 = ((*(*n).kindU.S6.Sons->data[i_527528]).Typ == enforcevoidcontext_515110);
						if (LOC37) goto LA38;
						LOC37 = usesresult_527404((*n).kindU.S6.Sons->data[i_527528]);
						LA38: ;
						if (!LOC37) goto LA39;
						voidcontext = NIM_TRUE;
						asgnRefNoCycle((void**) (&(*n).Typ), enforcevoidcontext_515110);
					}
					LA39: ;
					{
						NIM_BOOL LOC43;
						NIM_BOOL LOC45;
						LOC43 = 0;
						LOC43 = (i_527528 == last);
						if (!(LOC43)) goto LA44;
						LOC45 = 0;
						LOC45 = (length == 1);
						if (LOC45) goto LA46;
						LOC45 = ((flags &(1<<((((NU8) 6))&15)))!=0);
						LA46: ;
						LOC43 = LOC45;
						LA44: ;
						if (!LOC43) goto LA47;
						asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[i_527528]).Typ);
						{
							NIM_BOOL LOC51;
							LOC51 = 0;
							LOC51 = isemptytype_232990((*n).Typ);
							if (!!(LOC51)) goto LA52;
							(*n).Kind = ((NU8) 126);
						}
						LA52: ;
					}
					goto LA41;
					LA47: ;
					{
						NIM_BOOL LOC55;
						LOC55 = 0;
						LOC55 = !((i_527528 == last));
						if (LOC55) goto LA56;
						LOC55 = voidcontext;
						LA56: ;
						if (!LOC55) goto LA57;
						discardcheck_517617(c, (*n).kindU.S6.Sons->data[i_527528]);
					}
					goto LA41;
					LA57: ;
					{
						asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[i_527528]).Typ);
						{
							NIM_BOOL LOC62;
							LOC62 = 0;
							LOC62 = isemptytype_232990((*n).Typ);
							if (!!(LOC62)) goto LA63;
							(*n).Kind = ((NU8) 126);
						}
						LA63: ;
					}
					LA41: ;
					switch ((*(*n).kindU.S6.Sons->data[i_527528]).Kind) {
					case ((NU8) 99):
					case ((NU8) 100):
					{
						TY516908 LOC66;
						tnode225816* outer;
						tnode225816* inner;
						memset((void*)(&LOC66), 0, sizeof(LOC66));
						insertdestructors_516904(c, (*n).kindU.S6.Sons->data[i_527528], (&LOC66));
						outer = 0;
						outer = LOC66.Field0;
						inner = 0;
						inner = LOC66.Field1;
						{
							tnode225816* rest;
							slice84173 LOC71;
							tnodeseq225810* LOC72;
							tnode225816* LOC73;
							if (!!((outer == NIM_NIL))) goto LA69;
							asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_527528]), outer);
							LOC71 = HEX2EHEX2E_92298((NI32)(i_527528 + 1), (NI32)(length - 1));
							LOC72 = 0;
							LOC72 = HEX5BHEX5D_516155((*n).kindU.S6.Sons, LOC71);
							rest = newnode_228207(((NU8) 115), (*n).Info, LOC72, NIM_NIL);
							LOC73 = 0;
							LOC73 = semstmtlist_527505(c, rest, flags);
							addson_226287(inner, LOC73);
							(*n).kindU.S6.Sons = (tnodeseq225810*) setLengthSeq(&((*n).kindU.S6.Sons)->Sup, sizeof(tnode225816*), (NI32)(i_527528 + 1));
							goto BeforeRet;
						}
						LA69: ;
					}
					break;
					case ((NU8) 108):
					case ((NU8) 109):
					case ((NU8) 110):
					case ((NU8) 111):
					{
						{
							NI j_528093;
							NI HEX3Atmp_528404;
							NI HEX3Atmp_528405;
							NI res_528408;
							j_528093 = 0;
							HEX3Atmp_528404 = 0;
							HEX3Atmp_528405 = 0;
							HEX3Atmp_528404 = (NI32)(i_527528 + 1);
							HEX3Atmp_528405 = (NI32)(length - 1);
							res_528408 = HEX3Atmp_528404;
							{
								while (1) {
									if (!(res_528408 <= HEX3Atmp_528405)) goto LA77;
									j_528093 = res_528408;
									switch ((*(*n).kindU.S6.Sons->data[j_528093]).Kind) {
									case ((NU8) 90):
									case ((NU8) 125):
									case ((NU8) 23):
									case ((NU8) 1):
									{
									}
									break;
									default:
									{
										localerror_197955((*(*n).kindU.S6.Sons->data[j_528093]).Info, ((NU16) 41), ((NimStringDesc*) &TMP2888));
									}
									break;
									}
									res_528408 += 1;
								} LA77: ;
							}
						}
					}
					break;
					default:
					{
					}
					break;
					}
				}
				break;
				}
				res_528413 += 1;
			} LA3: ;
		}
	}
	{
		NI LOC83;
		LOC83 = 0;
		LOC83 = len_226364(result);
		if (!(LOC83 == 1)) goto LA84;
		result = (*result).kindU.S6.Sons->data[0];
	}
	LA84: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semraise_522655)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 1);
	{
		ttype225852* typ;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
		typ = (*(*n).kindU.S6.Sons->data[0]).Typ;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = !(((*typ).Kind == ((NU8) 22)));
			if (LOC7) goto LA8;
			LOC7 = !(((*(*typ).Sons->data[0]).Kind == ((NU8) 17)));
			LA8: ;
			if (!LOC7) goto LA9;
			localerror_197955((*n).Info, ((NU16) 112), ((NimStringDesc*) &TMP2888));
		}
		LA9: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tsym225846*, findshadowedvar_519524)(tcontext290021* c, tsym225846* v) {
	tsym225846* result;
	result = 0;
	{
		tscope225840* scope_519529;
		tscope225840* HEX3Atmp_519578;
		tscope225840* current_519581;
		scope_519529 = 0;
		HEX3Atmp_519578 = 0;
		HEX3Atmp_519578 = (*(*c).Currentscope).Parent;
		current_519581 = HEX3Atmp_519578;
		{
			while (1) {
				tsym225846* shadowed;
				if (!!((current_519581 == NIM_NIL))) goto LA3;
				scope_519529 = current_519581;
				{
					if (!(scope_519529 == (*c).Toplevelscope)) goto LA6;
					goto LA1;
				}
				LA6: ;
				shadowed = strtableget_235111((*scope_519529).Symbols, (*v).Name);
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = !((shadowed == NIM_NIL));
					if (!(LOC10)) goto LA11;
					LOC10 = ((2099976 &(1<<(((*shadowed).Kind)&31)))!=0);
					LA11: ;
					if (!LOC10) goto LA12;
					result = shadowed;
					goto BeforeRet;
				}
				LA12: ;
				current_519581 = (*current_519581).Parent;
			} LA3: ;
		}
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, identwithin_519594)(tnode225816* n, tident200021* s) {
	NIM_BOOL result;
	NIM_BOOL LOC10;
	result = 0;
	{
		NI i_519609;
		NI HEX3Atmp_519648;
		NI LOC2;
		NI res_519651;
		i_519609 = 0;
		HEX3Atmp_519648 = 0;
		LOC2 = 0;
		LOC2 = safelen_226424(n);
		HEX3Atmp_519648 = (NI32)(LOC2 - 1);
		res_519651 = 0;
		{
			while (1) {
				if (!(res_519651 <= HEX3Atmp_519648)) goto LA4;
				i_519609 = res_519651;
				{
					NIM_BOOL LOC7;
					LOC7 = 0;
					LOC7 = identwithin_519594((*n).kindU.S6.Sons->data[i_519609], s);
					if (!LOC7) goto LA8;
					result = NIM_TRUE;
					goto BeforeRet;
				}
				LA8: ;
				res_519651 += 1;
			} LA4: ;
		}
	}
	LOC10 = 0;
	LOC10 = ((*n).Kind == ((NU8) 3));
	if (!(LOC10)) goto LA11;
	LOC10 = ((*(*(*n).kindU.S4.Sym).Name).Sup.Id == (*s).Sup.Id);
	LA11: ;
	result = LOC10;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, checknilable_519804)(tsym225846* v) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (((*v).Flags &(1<<((((NU8) 3))&31)))!=0);
		if (!(LOC3)) goto LA4;
		LOC3 = !(((196608 & (*(*v).Typ).Flags) == 0));
		LA4: ;
		if (!LOC3) goto LA5;
		{
			if (!(*v).Ast == 0) goto LA9;
			message_197976((*v).Info, ((NU16) 250), (*(*v).Name).S);
		}
		goto LA7;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = (((*(*v).Typ).Flags &(1<<((((NU8) 16))&31)))!=0);
			if (!(LOC12)) goto LA13;
			LOC12 = !((((*(*(*v).Ast).Typ).Flags &(1<<((((NU8) 16))&31)))!=0));
			LA13: ;
			if (!LOC12) goto LA14;
			message_197976((*v).Info, ((NU16) 250), (*(*v).Name).S);
		}
		goto LA7;
		LA14: ;
		LA7: ;
	}
	LA5: ;
}

N_NIMCALL(tnode225816*, semvarorlet_519897)(tcontext290021* c, tnode225816* n, NU8 symkind) {
	tnode225816* result;
	tnode225816* b;
	NIM_BOOL hascompiletime;
	result = 0;
	b = 0;
	result = copynode_226323(n);
	hascompiletime = NIM_FALSE;
	{
		NI i_519917;
		NI HEX3Atmp_520574;
		NI LOC2;
		NI res_520577;
		i_519917 = 0;
		HEX3Atmp_520574 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_520574 = (NI32)(LOC2 - 1);
		res_520577 = 0;
		{
			while (1) {
				if (!(res_520577 <= HEX3Atmp_520574)) goto LA4;
				i_519917 = res_520577;
				{
					tnode225816* a;
					NI length;
					ttype225852* typ;
					tnode225816* def;
					ttype225852* tup;
					a = (*n).kindU.S6.Sons->data[i_519917];
					{
						if (!(gcmd_169120 == ((NU8) 14))) goto LA8;
						suggeststmt_421299(c, a);
					}
					LA8: ;
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA12;
						goto LA5;
					}
					LA12: ;
					{
						if (!!(((*a).Kind == ((NU8) 35) || (*a).Kind == ((NU8) 36) || (*a).Kind == ((NU8) 102)))) goto LA16;
						illformedast_291406(a);
					}
					LA16: ;
					checkminsonslen_291426(a, 3);
					length = sonslen_226249(a);
					typ = 0;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[(NI32)(length - 2)]).Kind == ((NU8) 1)))) goto LA20;
						typ = semtypenode_487269(c, (*a).kindU.S6.Sons->data[(NI32)(length - 2)], NIM_NIL);
					}
					goto LA18;
					LA20: ;
					{
						typ = NIM_NIL;
					}
					LA18: ;
					def = 0;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[(NI32)(length - 1)]).Kind == ((NU8) 1)))) goto LA25;
						def = semexprwithtype_487211(c, (*a).kindU.S6.Sons->data[(NI32)(length - 1)], 32);
						{
							if (!!((typ == NIM_NIL))) goto LA29;
							{
								NIM_BOOL LOC33;
								LOC33 = 0;
								LOC33 = ismetatype_226752(typ);
								if (!LOC33) goto LA34;
								def = inferwithmetatype_487450(c, typ, def, NIM_FALSE);
								typ = (*def).Typ;
							}
							goto LA31;
							LA34: ;
							{
								def = fitnode_487245(c, typ, def);
							}
							LA31: ;
						}
						goto LA27;
						LA29: ;
						{
							typ = skipintlit_282531((*def).Typ);
							{
								NIM_BOOL LOC40;
								ttype225852* LOC42;
								NimStringDesc* LOC45;
								NimStringDesc* LOC46;
								LOC40 = 0;
								LOC40 = ((*typ).Kind == ((NU8) 24) || (*typ).Kind == ((NU8) 16) || (*typ).Kind == ((NU8) 19));
								if (!(LOC40)) goto LA41;
								LOC42 = 0;
								LOC42 = lastson_226267(typ);
								LOC40 = ((*LOC42).Kind == ((NU8) 3));
								LA41: ;
								if (!LOC40) goto LA43;
								LOC45 = 0;
								LOC45 = copyStr(reprEnum((*typ).Kind, (&NTI225258)), 2);
								LOC46 = 0;
								LOC46 = nsuToLowerStr(LOC45);
								localerror_197955((*def).Info, ((NU16) 225), LOC46);
							}
							LA43: ;
						}
						LA27: ;
					}
					goto LA23;
					LA25: ;
					{
						def = emptynode_226738;
						{
							if (!(symkind == ((NU8) 9))) goto LA50;
							localerror_197955((*a).Info, ((NU16) 219), ((NimStringDesc*) &TMP2888));
						}
						LA50: ;
					}
					LA23: ;
					{
						if (!(typ == NIM_NIL)) goto LA54;
						goto LA5;
					}
					LA54: ;
					{
						NIM_BOOL LOC58;
						NimStringDesc* LOC61;
						LOC58 = 0;
						LOC58 = typeallowed_263231(typ, symkind);
						if (!!(LOC58)) goto LA59;
						LOC61 = 0;
						LOC61 = typetostring_263031(typ, ((NU8) 0));
						localerror_197955((*a).Info, ((NU16) 165), LOC61);
					}
					LA59: ;
					tup = skiptypes_230245(typ, 2048);
					{
						if (!((*a).Kind == ((NU8) 36))) goto LA64;
						{
							if (!!(((*tup).Kind == ((NU8) 18)))) goto LA68;
							localerror_197955((*a).Info, ((NU16) 188), ((NimStringDesc*) &TMP3293));
						}
						goto LA66;
						LA68: ;
						{
							NI LOC71;
							LOC71 = 0;
							LOC71 = sonslen_226255(tup);
							if (!!(((NI32)(length - 2) == LOC71))) goto LA72;
							localerror_197955((*a).Info, ((NU16) 111), ((NimStringDesc*) &TMP2888));
						}
						goto LA66;
						LA72: ;
						{
							b = newnodei_226138(((NU8) 36), (*a).Info);
							newsons_226273(b, length);
							asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[(NI32)(length - 2)]), (*a).kindU.S6.Sons->data[(NI32)(length - 2)]);
							asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[(NI32)(length - 1)]), def);
							addson_226287(result, b);
						}
						LA66: ;
					}
					goto LA62;
					LA64: ;
					{
						NIM_BOOL LOC76;
						NIM_BOOL LOC77;
						NIM_BOOL LOC78;
						NI LOC82;
						LOC76 = 0;
						LOC77 = 0;
						LOC78 = 0;
						LOC78 = ((*tup).Kind == ((NU8) 18));
						if (!(LOC78)) goto LA79;
						LOC78 = ((*def).Kind == ((NU8) 37));
						LA79: ;
						LOC77 = LOC78;
						if (!(LOC77)) goto LA80;
						LOC77 = ((*a).Kind == ((NU8) 35));
						LA80: ;
						LOC76 = LOC77;
						if (!(LOC76)) goto LA81;
						LOC82 = 0;
						LOC82 = len_226364(a);
						LOC76 = (3 < LOC82);
						LA81: ;
						if (!LOC76) goto LA83;
						message_197976((*a).Info, ((NU16) 248), ((NimStringDesc*) &TMP2888));
					}
					goto LA62;
					LA83: ;
					LA62: ;
					{
						NI j_520218;
						NI HEX3Atmp_520569;
						NI res_520572;
						j_520218 = 0;
						HEX3Atmp_520569 = 0;
						HEX3Atmp_520569 = (NI32)(length - 3);
						res_520572 = 0;
						{
							while (1) {
								tsym225846* v;
								if (!(res_520572 <= HEX3Atmp_520569)) goto LA87;
								j_520218 = res_520572;
								v = semidentdef_519665(c, (*a).kindU.S6.Sons->data[j_520218], symkind);
								{
									if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA90;
									addinterfacedecl_295845(c, v);
								}
								LA90: ;
								{
									if (!(0 < (*c).Inunrolledcontext)) goto LA94;
									(*v).Flags |= ((NI32)1)<<((((NU8) 21))%(sizeof(NI32)*8));
								}
								goto LA92;
								LA94: ;
								{
									tsym225846* shadowed;
									shadowed = findshadowedvar_519524(c, v);
									{
										if (!!((shadowed == NIM_NIL))) goto LA99;
										(*shadowed).Flags |= ((NI32)1)<<((((NU8) 21))%(sizeof(NI32)*8));
										{
											NIM_BOOL LOC103;
											NIM_BOOL LOC105;
											LOC103 = 0;
											LOC103 = ((gnotes_196305 &(IL64(1)<<(((((NU16) 249)- 230))&IL64(63))))!=0);
											if (!(LOC103)) goto LA104;
											LOC105 = 0;
											LOC105 = identwithin_519594(def, (*v).Name);
											LOC103 = !(LOC105);
											LA104: ;
											if (!LOC103) goto LA106;
											message_197976((*a).Info, ((NU16) 249), (*(*v).Name).S);
										}
										LA106: ;
									}
									LA99: ;
								}
								LA92: ;
								{
									tnode225816* LOC128;
									tnode225816* LOC129;
									if (!!(((*a).Kind == ((NU8) 36)))) goto LA110;
									{
										NIM_BOOL LOC114;
										LOC114 = 0;
										LOC114 = !((def == NIM_NIL));
										if (!(LOC114)) goto LA115;
										LOC114 = !(((*def).Kind == ((NU8) 1)));
										LA115: ;
										if (!LOC114) goto LA116;
										asgnRefNoCycle((void**) (&(*v).Ast), def);
										{
											if (!(((*v).Flags &(1<<((((NU8) 22))&31)))!=0)) goto LA120;
											localerror_197955((*def).Info, ((NU16) 220), ((NimStringDesc*) &TMP2888));
										}
										LA120: ;
									}
									LA116: ;
									asgnRefNoCycle((void**) (&(*v).Typ), typ);
									b = newnodei_226138(((NU8) 35), (*a).Info);
									{
										NIM_BOOL LOC124;
										NimStringDesc* LOC127;
										LOC124 = 0;
										LOC124 = importantcomments_169156();
										if (!LOC124) goto LA125;
										LOC127 = 0;
										LOC127 = (*b).Comment; (*b).Comment = copyStringRC1((*a).Comment);
										if (LOC127) nimGCunrefNoCycle(LOC127);
									}
									LA125: ;
									LOC128 = 0;
									LOC128 = newsymnode_226132(v);
									addson_226287(b, LOC128);
									addson_226287(b, (*a).kindU.S6.Sons->data[(NI32)(length - 2)]);
									LOC129 = 0;
									LOC129 = copytree_226329(def);
									addson_226287(b, LOC129);
									addson_226287(result, b);
								}
								goto LA108;
								LA110: ;
								{
									{
										if (!((*def).Kind == ((NU8) 37))) goto LA133;
										asgnRefNoCycle((void**) (&(*v).Ast), HEX5BHEX5D_226698(def, j_520218));
									}
									LA133: ;
									asgnRefNoCycle((void**) (&(*v).Typ), (*tup).Sons->data[j_520218]);
									asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[j_520218]), newsymnode_226132(v));
								}
								LA108: ;
								checknilable_519804(v);
								{
									if (!(((*v).Flags &(1<<((((NU8) 23))&31)))!=0)) goto LA137;
									hascompiletime = NIM_TRUE;
								}
								LA137: ;
								res_520572 += 1;
							} LA87: ;
						}
					}
				} LA5: ;
				res_520577 += 1;
			} LA4: ;
		}
	}
	{
		if (!hascompiletime) goto LA141;
		setupcompiletimevar_477260((*c).Module, result);
	}
	LA141: ;
	return result;
}

N_NIMCALL(tnode225816*, fitremovehiddenconv_519473)(tcontext290021* c, ttype225852* typ, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = fitnode_487245(c, typ, n);
	{
		if (!((*result).Kind == ((NU8) 58) || (*result).Kind == ((NU8) 59))) goto LA3;
		changetype_487253((*result).kindU.S6.Sons->data[1], typ, NIM_TRUE);
		result = (*result).kindU.S6.Sons->data[1];
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = sametype_268351((*result).Typ, typ, 0);
		if (!!(LOC6)) goto LA7;
		changetype_487253(result, typ, NIM_FALSE);
	}
	goto LA1;
	LA7: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semconst_520603)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = copynode_226323(n);
	{
		NI i_520620;
		NI HEX3Atmp_520850;
		NI LOC2;
		NI res_520853;
		i_520620 = 0;
		HEX3Atmp_520850 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_520850 = (NI32)(LOC2 - 1);
		res_520853 = 0;
		{
			while (1) {
				if (!(res_520853 <= HEX3Atmp_520850)) goto LA4;
				i_520620 = res_520853;
				{
					tnode225816* a;
					tsym225846* v;
					ttype225852* typ;
					tnode225816* def;
					tnode225816* b;
					tnode225816* LOC53;
					tnode225816* LOC54;
					a = (*n).kindU.S6.Sons->data[i_520620];
					{
						if (!(gcmd_169120 == ((NU8) 14))) goto LA8;
						suggeststmt_421299(c, a);
					}
					LA8: ;
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA12;
						goto LA5;
					}
					LA12: ;
					{
						if (!!(((*a).Kind == ((NU8) 102)))) goto LA16;
						illformedast_291406(a);
					}
					LA16: ;
					checksonslen_291416(a, 3);
					v = semidentdef_519665(c, (*a).kindU.S6.Sons->data[0], ((NU8) 10));
					typ = NIM_NIL;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA20;
						typ = semtypenode_487269(c, (*a).kindU.S6.Sons->data[1], NIM_NIL);
					}
					LA20: ;
					def = semconstexpr_488503(c, (*a).kindU.S6.Sons->data[2]);
					{
						if (!(def == NIM_NIL)) goto LA24;
						localerror_197955((*(*a).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
						goto LA5;
					}
					LA24: ;
					{
						if (!!((typ == NIM_NIL))) goto LA28;
						def = fitremovehiddenconv_519473(c, typ, def);
					}
					goto LA26;
					LA28: ;
					{
						typ = (*def).Typ;
					}
					LA26: ;
					{
						if (!(typ == NIM_NIL)) goto LA33;
						localerror_197955((*(*a).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
						goto LA5;
					}
					LA33: ;
					{
						NIM_BOOL LOC37;
						NIM_BOOL LOC38;
						NimStringDesc* LOC42;
						LOC37 = 0;
						LOC38 = 0;
						LOC38 = typeallowed_263231(typ, ((NU8) 10));
						LOC37 = !(LOC38);
						if (!(LOC37)) goto LA39;
						LOC37 = !(((*def).Kind == ((NU8) 23)));
						LA39: ;
						if (!LOC37) goto LA40;
						LOC42 = 0;
						LOC42 = typetostring_263031(typ, ((NU8) 0));
						localerror_197955((*a).Info, ((NU16) 165), LOC42);
						goto LA5;
					}
					LA40: ;
					asgnRefNoCycle((void**) (&(*v).Typ), typ);
					asgnRefNoCycle((void**) (&(*v).Ast), def);
					{
						if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA45;
						addinterfacedecl_295845(c, v);
					}
					LA45: ;
					b = newnodei_226138(((NU8) 102), (*a).Info);
					{
						NIM_BOOL LOC49;
						NimStringDesc* LOC52;
						LOC49 = 0;
						LOC49 = importantcomments_169156();
						if (!LOC49) goto LA50;
						LOC52 = 0;
						LOC52 = (*b).Comment; (*b).Comment = copyStringRC1((*a).Comment);
						if (LOC52) nimGCunrefNoCycle(LOC52);
					}
					LA50: ;
					LOC53 = 0;
					LOC53 = newsymnode_226132(v);
					addson_226287(b, LOC53);
					addson_226287(b, (*a).kindU.S6.Sons->data[1]);
					LOC54 = 0;
					LOC54 = copytree_226329(def);
					addson_226287(b, LOC54);
					addson_226287(result, b);
				} LA5: ;
				res_520853 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(void, typesectionleftsidepass_522829)(tcontext290021* c, tnode225816* n) {
	{
		NI i_522845;
		NI HEX3Atmp_522983;
		NI LOC2;
		NI res_522986;
		i_522845 = 0;
		HEX3Atmp_522983 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_522983 = (NI32)(LOC2 - 1);
		res_522986 = 0;
		{
			while (1) {
				if (!(res_522986 <= HEX3Atmp_522983)) goto LA4;
				i_522845 = res_522986;
				{
					tnode225816* a;
					tsym225846* s;
					a = (*n).kindU.S6.Sons->data[i_522845];
					{
						if (!(gcmd_169120 == ((NU8) 14))) goto LA8;
						suggeststmt_421299(c, a);
					}
					LA8: ;
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA12;
						goto LA5;
					}
					LA12: ;
					{
						if (!!(((*a).Kind == ((NU8) 103)))) goto LA16;
						illformedast_291406(a);
					}
					LA16: ;
					checksonslen_291416(a, 3);
					s = semidentdef_519665(c, (*a).kindU.S6.Sons->data[0], ((NU8) 7));
					asgnRefNoCycle((void**) (&(*s).Typ), newtypes_290214(((NU8) 30), c));
					asgnRefNoCycle((void**) (&(*(*s).Typ).Sym), s);
					{
						if (!((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 43))) goto LA20;
						pragma_310079(c, s, (*(*a).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[1], TMP3249);
					}
					LA20: ;
					{
						if (!!((((*s).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA24;
						addinterfacedecl_295845(c, s);
					}
					LA24: ;
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newsymnode_226132(s));
				} LA5: ;
				res_522986 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(void, setmagictype_503928)(tsym225846* m, NU8 kind, NI size) {
	(*(*m).Typ).Kind = kind;
	(*(*m).Typ).Align = ((NI16) (size));
	(*(*m).Typ).Size = ((NI64) (size));
}

N_NIMCALL(void, processmagictype_503936)(tcontext290021* c, tsym225846* m) {
	switch ((*m).Magic) {
	case ((NU16) 183):
	{
		setmagictype_503928(m, ((NU8) 31), intsize_174610);
	}
	break;
	case ((NU16) 184):
	{
		setmagictype_503928(m, ((NU8) 32), 1);
	}
	break;
	case ((NU16) 185):
	{
		setmagictype_503928(m, ((NU8) 33), 2);
	}
	break;
	case ((NU16) 186):
	{
		setmagictype_503928(m, ((NU8) 34), 4);
	}
	break;
	case ((NU16) 187):
	{
		setmagictype_503928(m, ((NU8) 35), 8);
	}
	break;
	case ((NU16) 188):
	{
		setmagictype_503928(m, ((NU8) 40), intsize_174610);
	}
	break;
	case ((NU16) 189):
	{
		setmagictype_503928(m, ((NU8) 41), 1);
	}
	break;
	case ((NU16) 190):
	{
		setmagictype_503928(m, ((NU8) 42), 2);
	}
	break;
	case ((NU16) 191):
	{
		setmagictype_503928(m, ((NU8) 43), 4);
	}
	break;
	case ((NU16) 192):
	{
		setmagictype_503928(m, ((NU8) 44), 8);
	}
	break;
	case ((NU16) 193):
	{
		setmagictype_503928(m, ((NU8) 36), floatsize_174611);
	}
	break;
	case ((NU16) 194):
	{
		setmagictype_503928(m, ((NU8) 37), 4);
	}
	break;
	case ((NU16) 195):
	{
		setmagictype_503928(m, ((NU8) 38), 8);
	}
	break;
	case ((NU16) 196):
	{
		setmagictype_503928(m, ((NU8) 39), 16);
	}
	break;
	case ((NU16) 197):
	{
		setmagictype_503928(m, ((NU8) 1), 1);
	}
	break;
	case ((NU16) 198):
	{
		setmagictype_503928(m, ((NU8) 2), 1);
	}
	break;
	case ((NU16) 199):
	{
		ttype225852* LOC18;
		setmagictype_503928(m, ((NU8) 28), ptrsize_174612);
		LOC18 = 0;
		LOC18 = getsystype_282030(((NU8) 2));
		rawaddson_230562((*m).Typ, LOC18);
	}
	break;
	case ((NU16) 200):
	{
		ttype225852* LOC20;
		setmagictype_503928(m, ((NU8) 29), ptrsize_174612);
		LOC20 = 0;
		LOC20 = getsystype_282030(((NU8) 2));
		rawaddson_230562((*m).Typ, LOC20);
	}
	break;
	case ((NU16) 201):
	{
		setmagictype_503928(m, ((NU8) 26), ptrsize_174612);
	}
	break;
	case ((NU16) 202):
	{
		ttype225852* LOC23;
		setmagictype_503928(m, ((NU8) 19), 1);
		LOC23 = 0;
		LOC23 = newtypes_290214(((NU8) 3), c);
		rawaddson_230562((*m).Typ, LOC23);
	}
	break;
	case ((NU16) 203):
	{
		setmagictype_503928(m, ((NU8) 20), intsize_174610);
	}
	break;
	case ((NU16) 204):
	{
		setmagictype_503928(m, ((NU8) 5), ptrsize_174612);
	}
	break;
	case ((NU16) 205):
	{
		setmagictype_503928(m, ((NU8) 6), 0);
	}
	break;
	case ((NU16) 206):
	{
		setmagictype_503928(m, ((NU8) 7), 0);
	}
	break;
	case ((NU16) 207):
	{
		ttype225852* LOC29;
		setmagictype_503928(m, ((NU8) 8), 0);
		LOC29 = 0;
		LOC29 = newtypes_290214(((NU8) 0), c);
		rawaddson_230562((*m).Typ, LOC29);
	}
	break;
	case ((NU16) 208):
	{
		setmagictype_503928(m, ((NU8) 3), 0);
	}
	break;
	case ((NU16) 176):
	{
		setmagictype_503928(m, ((NU8) 16), 0);
	}
	break;
	case ((NU16) 177):
	{
		setmagictype_503928(m, ((NU8) 27), 0);
	}
	break;
	case ((NU16) 181):
	{
		setmagictype_503928(m, ((NU8) 48), 0);
	}
	break;
	case ((NU16) 178):
	{
		ttype225852* LOC35;
		setmagictype_503928(m, ((NU8) 20), 0);
		LOC35 = 0;
		LOC35 = newtypes_290214(((NU8) 0), c);
		rawaddson_230562((*m).Typ, LOC35);
	}
	break;
	case ((NU16) 179):
	{
		setmagictype_503928(m, ((NU8) 19), 0);
	}
	break;
	case ((NU16) 180):
	{
		setmagictype_503928(m, ((NU8) 24), 0);
	}
	break;
	case ((NU16) 182):
	{
		ttype225852* LOC39;
		setmagictype_503928(m, ((NU8) 15), 0);
		LOC39 = 0;
		LOC39 = newtypes_290214(((NU8) 0), c);
		rawaddson_230562((*m).Typ, LOC39);
	}
	break;
	case ((NU16) 209):
	{
	}
	break;
	case ((NU16) 210):
	{
		setmagictype_503928(m, ((NU8) 17), 0);
		asgnRefNoCycle((void**) (&(*(*m).Typ).N), newnodei_226138(((NU8) 137), (*m).Info));
		(*(*m).Typ).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
	}
	break;
	case ((NU16) 211):
	{
		ttype225852* LOC43;
		setmagictype_503928(m, ((NU8) 17), 0);
		asgnRefNoCycle((void**) (&(*(*m).Typ).N), newnodei_226138(((NU8) 137), (*m).Info));
		(*(*m).Typ).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
		LOC43 = 0;
		LOC43 = systypefromname_282261(((NimStringDesc*) &TMP3294));
		rawaddson_230562((*m).Typ, LOC43);
	}
	break;
	default:
	{
		localerror_197955((*m).Info, ((NU16) 63), ((NimStringDesc*) &TMP2888));
	}
	break;
	}
}

N_NIMCALL(void, typesectionrightsidepass_523003)(tcontext290021* c, tnode225816* n) {
	{
		NI i_523019;
		NI HEX3Atmp_523335;
		NI LOC2;
		NI res_523338;
		i_523019 = 0;
		HEX3Atmp_523335 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_523335 = (NI32)(LOC2 - 1);
		res_523338 = 0;
		{
			while (1) {
				if (!(res_523338 <= HEX3Atmp_523335)) goto LA4;
				i_523019 = res_523338;
				{
					tnode225816* a;
					tsym225846* s;
					a = (*n).kindU.S6.Sons->data[i_523019];
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA8;
						goto LA5;
					}
					LA8: ;
					{
						if (!!(((*a).Kind == ((NU8) 103)))) goto LA12;
						illformedast_291406(a);
					}
					LA12: ;
					checksonslen_291416(a, 3);
					{
						if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA16;
						illformedast_291406(a);
					}
					LA16: ;
					s = (*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym;
					{
						NIM_BOOL LOC20;
						LOC20 = 0;
						LOC20 = ((*s).Magic == ((NU16) 0));
						if (!(LOC20)) goto LA21;
						LOC20 = ((*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 1));
						LA21: ;
						if (!LOC20) goto LA22;
						localerror_197955((*a).Info, ((NU16) 138), (*(*s).Name).S);
					}
					LA22: ;
					{
						if (!!(((*s).Magic == ((NU16) 0)))) goto LA26;
						processmagictype_503936(c, s);
					}
					LA26: ;
					{
						tscope225840* LOC32;
						ttype225852* LOC37;
						ttype225852* body;
						if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA30;
						LOC32 = 0;
						LOC32 = openscope_295191(c);
						pushowner_290261(s);
						{
							if (!((*s).Magic == ((NU16) 0))) goto LA35;
							(*(*s).Typ).Kind = ((NU8) 10);
						}
						LA35: ;
						asgnRefNoCycle((void**) (&(*(*s).Typ).N), semgenericparamlist_504001(c, (*a).kindU.S6.Sons->data[1], (*s).Typ));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), (*(*s).Typ).N);
						(*(*s).Typ).Size = IL64(-1);
						LOC37 = 0;
						LOC37 = newtypes_290214(((NU8) 0), c);
						rawaddson_230562((*s).Typ, LOC37);
						asgnRefNoCycle((void**) (&(*s).Ast), a);
						(*c).Ingenericcontext += 1;
						body = semtypenode_487269(c, (*a).kindU.S6.Sons->data[2], NIM_NIL);
						(*c).Ingenericcontext -= 1;
						{
							NI LOC42;
							if (!!((body == NIM_NIL))) goto LA40;
							asgnRefNoCycle((void**) (&(*body).Sym), s);
							(*body).Size = IL64(-1);
							LOC42 = 0;
							LOC42 = sonslen_226255((*s).Typ);
							asgnRefNoCycle((void**) (&(*(*s).Typ).Sons->data[(NI32)(LOC42 - 1)]), body);
						}
						LA40: ;
						popowner_290267();
						closescope_295211(c);
					}
					goto LA28;
					LA30: ;
					{
						ttype225852* t;
						if (!!(((*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA44;
						pushowner_290261(s);
						t = semtypenode_487269(c, (*a).kindU.S6.Sons->data[2], (*s).Typ);
						{
							if (!((*s).Typ == NIM_NIL)) goto LA48;
							asgnRefNoCycle((void**) (&(*s).Typ), t);
						}
						goto LA46;
						LA48: ;
						{
							if (!!((t == (*s).Typ))) goto LA51;
							assigntype_226210((*s).Typ, t);
						}
						goto LA46;
						LA51: ;
						LA46: ;
						asgnRefNoCycle((void**) (&(*s).Ast), a);
						popowner_290267();
					}
					goto LA28;
					LA44: ;
					LA28: ;
				} LA5: ;
				res_523338 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(void, checkformetafields_523355)(tnode225816* n) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	case ((NU8) 138):
	{
		{
			tnode225816* s_523366;
			s_523366 = 0;
			{
				NI i_523509;
				NI HEX3Atmp_523511;
				NI LOC4;
				NI res_523513;
				i_523509 = 0;
				HEX3Atmp_523511 = 0;
				LOC4 = 0;
				LOC4 = len_226364(n);
				HEX3Atmp_523511 = (LOC4 - 1);
				res_523513 = 0;
				{
					while (1) {
						if (!(res_523513 <= HEX3Atmp_523511)) goto LA6;
						i_523509 = res_523513;
						s_523366 = (*n).kindU.S6.Sons->data[i_523509];
						checkformetafields_523355(s_523366);
						res_523513 += 1;
					} LA6: ;
				}
			}
		}
	}
	break;
	case ((NU8) 85):
	case ((NU8) 88):
	{
		tnode225816* LOC8;
		LOC8 = 0;
		LOC8 = lastson_226261(n);
		checkformetafields_523355(LOC8);
	}
	break;
	case ((NU8) 3):
	{
		ttype225852* t;
		t = (*(*n).kindU.S4.Sym).Typ;
		switch ((*t).Kind) {
		case ((NU8) 24):
		case ((NU8) 19):
		case ((NU8) 16):
		case ((NU8) 27):
		case ((NU8) 23):
		case ((NU8) 21):
		case ((NU8) 22):
		case ((NU8) 25):
		case ((NU8) 9):
		case ((NU8) 11):
		{
			NI start;
			start = ((*t).Kind == ((NU8) 9) || (*t).Kind == ((NU8) 11));
			{
				NI i_523437;
				NI HEX3Atmp_523515;
				NI res_523518;
				i_523437 = 0;
				HEX3Atmp_523515 = 0;
				HEX3Atmp_523515 = ((*t).Sons->Sup.len - 1);
				res_523518 = ((NI) (start));
				{
					while (1) {
						if (!(res_523518 <= HEX3Atmp_523515)) goto LA13;
						i_523437 = res_523518;
						{
							NIM_BOOL LOC16;
							NIM_BOOL LOC17;
							NimStringDesc* LOC22;
							LOC16 = 0;
							LOC17 = 0;
							LOC17 = !(((*t).Sons->data[i_523437] == NIM_NIL));
							if (!(LOC17)) goto LA18;
							LOC17 = ismetatype_226752((*t).Sons->data[i_523437]);
							LA18: ;
							LOC16 = LOC17;
							if (!(LOC16)) goto LA19;
							LOC16 = !((((*(*t).Sons->data[i_523437]).Flags &(1<<((((NU8) 23))&31)))!=0));
							LA19: ;
							if (!LOC16) goto LA20;
							LOC22 = 0;
							LOC22 = typetostring_263031((*t).Sons->data[i_523437], ((NU8) 0));
							localerror_197955((*n).Info, ((NU16) 189), LOC22);
						}
						LA20: ;
						res_523518 += 1;
					} LA13: ;
				}
			}
		}
		break;
		default:
		{
			{
				NIM_BOOL LOC26;
				NIM_BOOL LOC27;
				NimStringDesc* LOC32;
				LOC26 = 0;
				LOC27 = 0;
				LOC27 = !((t == NIM_NIL));
				if (!(LOC27)) goto LA28;
				LOC27 = ismetatype_226752(t);
				LA28: ;
				LOC26 = LOC27;
				if (!(LOC26)) goto LA29;
				LOC26 = !((((*t).Flags &(1<<((((NU8) 23))&31)))!=0));
				LA29: ;
				if (!LOC26) goto LA30;
				LOC32 = 0;
				LOC32 = typetostring_263031(t, ((NU8) 0));
				localerror_197955((*n).Info, ((NU16) 189), LOC32);
			}
			LA30: ;
		}
		break;
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC38;
			if (!NIM_TRUE) goto LA36;
			LOC38 = 0;
			LOC38 = HEX24_198126(TMP3295);
			internalerror_198006(LOC38);
		}
		LA36: ;
	}
	break;
	}
}

N_NIMCALL(void, typesectionfinalpass_523544)(tcontext290021* c, tnode225816* n) {
	{
		NI i_523560;
		NI HEX3Atmp_523871;
		NI LOC2;
		NI res_523874;
		i_523560 = 0;
		HEX3Atmp_523871 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_523871 = (NI32)(LOC2 - 1);
		res_523874 = 0;
		{
			while (1) {
				if (!(res_523874 <= HEX3Atmp_523871)) goto LA4;
				i_523560 = res_523874;
				{
					tnode225816* a;
					tsym225846* s;
					tnode225816* aa;
					a = (*n).kindU.S6.Sons->data[i_523560];
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA8;
						goto LA5;
					}
					LA8: ;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA12;
						illformedast_291406(a);
					}
					LA12: ;
					s = (*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym;
					{
						if (!((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1))) goto LA16;
						{
							ttype225852* t;
							if (!((*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 3) || (*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 2) || (*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 53))) goto LA20;
							t = semtypenode_487269(c, (*a).kindU.S6.Sons->data[2], NIM_NIL);
							{
								if (!((*t).Kind == ((NU8) 17) || (*t).Kind == ((NU8) 14))) goto LA24;
								assigntype_226210((*s).Typ, t);
								(*(*s).Typ).Sup.Id = (*t).Sup.Id;
							}
							LA24: ;
						}
						LA20: ;
						checkconstructedtype_317152((*s).Info, (*s).Typ);
						{
							if (!((*(*s).Typ).Kind == ((NU8) 17) || (*(*s).Typ).Kind == ((NU8) 18))) goto LA28;
							checkformetafields_523355((*(*s).Typ).N);
						}
						LA28: ;
					}
					LA16: ;
					aa = (*a).kindU.S6.Sons->data[2];
					{
						NIM_BOOL LOC32;
						NIM_BOOL LOC33;
						NI LOC35;
						ttype225852* st;
						ttype225852* LOC54;
						NimStringDesc* LOC55;
						tident200021* LOC56;
						tsym225846* LOC57;
						LOC32 = 0;
						LOC33 = 0;
						LOC33 = ((*aa).Kind == ((NU8) 140) || (*aa).Kind == ((NU8) 141));
						if (!(LOC33)) goto LA34;
						LOC35 = 0;
						LOC35 = len_226364(aa);
						LOC33 = (LOC35 == 1);
						LA34: ;
						LOC32 = LOC33;
						if (!(LOC32)) goto LA36;
						LOC32 = ((*(*aa).kindU.S6.Sons->data[0]).Kind == ((NU8) 133));
						LA36: ;
						if (!LOC32) goto LA37;
						st = (*s).Typ;
						{
							if (!((*st).Kind == ((NU8) 10))) goto LA41;
							st = lastson_226267(st);
						}
						LA41: ;
						{
							NimStringDesc* LOC47;
							if (!!(((*st).Kind == ((NU8) 21) || (*st).Kind == ((NU8) 22)))) goto LA45;
							LOC47 = 0;
							LOC47 = HEX24_198126(TMP3297);
							internalerror_198006(LOC47);
						}
						LA45: ;
						{
							ttype225852* LOC50;
							NimStringDesc* LOC53;
							LOC50 = 0;
							LOC50 = lastson_226267(st);
							if (!!(((*LOC50).Sym == NIM_NIL))) goto LA51;
							LOC53 = 0;
							LOC53 = HEX24_198126(TMP3298);
							internalerror_198006(LOC53);
						}
						LA51: ;
						LOC54 = 0;
						LOC54 = lastson_226267(st);
						LOC55 = 0;
						LOC55 = rawNewString((*(*s).Name).S->Sup.len + 11);
appendString(LOC55, (*(*s).Name).S);
appendString(LOC55, ((NimStringDesc*) &TMP3299));
						LOC56 = 0;
						LOC56 = getident_200472(LOC55);
						LOC57 = 0;
						LOC57 = getcurrowner_290256();
						asgnRefNoCycle((void**) (&(*LOC54).Sym), newsym_226074(((NU8) 7), LOC56, LOC57, (*s).Info));
					}
					LA37: ;
				} LA5: ;
				res_523874 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode225816*, semtypesection_523891)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	typesectionleftsidepass_522829(c, n);
	typesectionrightsidepass_523003(c, n);
	typesectionfinalpass_523544(c, n);
	result = n;
	return result;
}

N_NIMCALL(tnode225816*, semdiscard_515111)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 1);
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isemptytype_232990((*(*n).kindU.S6.Sons->data[0]).Typ);
			if (!LOC7) goto LA8;
			localerror_197955((*n).Info, ((NU16) 141), ((NimStringDesc*) &TMP2888));
		}
		LA8: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode225816*, semwhile_515429)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	tnode225816* LOC2;
	result = 0;
	result = n;
	checksonslen_291416(n, 2);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	LOC2 = 0;
	LOC2 = semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), forcebool_495036(c, LOC2));
	(*(*c).P).Nestedloopcounter += 1;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semstmt_487277(c, (*n).kindU.S6.Sons->data[1]));
	(*(*c).P).Nestedloopcounter -= 1;
	closescope_295211(c);
	{
		if (!((*(*n).kindU.S6.Sons->data[1]).Typ == enforcevoidcontext_515110)) goto LA5;
		asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_515110);
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode225816*, sembreakorcontinue_515184)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 1);
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		{
			tsym225846* s;
			if (!!(((*n).Kind == ((NU8) 111)))) goto LA7;
			s = 0;
			switch ((*(*n).kindU.S6.Sons->data[0]).Kind) {
			case ((NU8) 2):
			{
				s = lookup_296004(c, (*n).kindU.S6.Sons->data[0]);
			}
			break;
			case ((NU8) 3):
			{
				s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
			}
			break;
			default:
			{
				illformedast_291406(n);
			}
			break;
			}
			{
				NIM_BOOL LOC14;
				tnode225816* x;
				LOC14 = 0;
				LOC14 = ((*s).Kind == ((NU8) 22));
				if (!(LOC14)) goto LA15;
				LOC14 = ((*(*s).Owner).Sup.Id == (*(*(*c).P).Owner).Sup.Id);
				LA15: ;
				if (!LOC14) goto LA16;
				x = newsymnode_226132(s);
				(*x).Info = (*n).Info;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), x);
				suggestsym_420882((*x).Info, s);
			}
			goto LA12;
			LA16: ;
			{
				localerror_197955((*n).Info, ((NU16) 164), (*(*s).Name).S);
			}
			LA12: ;
		}
		goto LA5;
		LA7: ;
		{
			localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3300));
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC21;
		NimStringDesc* LOC25;
		LOC21 = 0;
		LOC21 = ((*(*c).P).Nestedloopcounter <= 0);
		if (!(LOC21)) goto LA22;
		LOC21 = ((*(*c).P).Nestedblockcounter <= 0);
		LA22: ;
		if (!LOC21) goto LA23;
		LOC25 = 0;
		LOC25 = rendertree_250058(n, 4);
		localerror_197955((*n).Info, ((NU16) 164), LOC25);
	}
	goto LA1;
	LA23: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semexprnoderef_487228)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = semexpr_487201(c, n, flags);
	{
		if (!((*result).Kind == ((NU8) 1))) goto LA3;
		result = errornode_291329(c, n);
	}
	LA3: ;
	{
		NimStringDesc* LOC9;
		if (!((*result).Typ == NIM_NIL)) goto LA7;
		LOC9 = 0;
		LOC9 = rendertree_250058(result, 4);
		localerror_197955((*n).Info, ((NU16) 90), LOC9);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_291319(c));
	}
	goto LA5;
	LA7: ;
	{
		semprocvarcheck_515664(c, result);
		semdestructorcheck_517185(c, result, flags);
	}
	LA5: ;
	return result;
}

N_NIMCALL(tsym225846*, symforvar_521803)(tcontext290021* c, tnode225816* n) {
	tsym225846* result;
	tnode225816* m;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 43))) goto LA3;
		m = (*n).kindU.S6.Sons->data[0];
	}
	goto LA1;
	LA3: ;
	{
		m = n;
	}
	LA1: ;
	result = newsymg_487930(((NU8) 21), m, c);
	return result;
}

N_NIMCALL(void, addforvardecl_521765)(tcontext290021* c, tsym225846* v) {
	{
		tsym225846* shadowed;
		if (!((gnotes_196305 &(IL64(1)<<(((((NU16) 249)- 230))&IL64(63))))!=0)) goto LA3;
		shadowed = findshadowedvar_519524(c, v);
		{
			if (!!((shadowed == NIM_NIL))) goto LA7;
			message_197976((*v).Info, ((NU16) 249), (*(*v).Name).S);
		}
		LA7: ;
	}
	LA3: ;
	adddecl_295694(c, v);
}

N_NIMCALL(tnode225816*, semforvars_522004)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI length;
	ttype225852* iterbase;
	ttype225852* iter;
	result = 0;
	result = n;
	length = sonslen_226249(n);
	iterbase = skiptypes_230245((*(*n).kindU.S6.Sons->data[(NI32)(length - 2)]).Typ, IL64(562949953421312));
	iter = skiptypes_230245(iterbase, 2048);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((*iter).Kind == ((NU8) 18)));
		if (LOC3) goto LA4;
		LOC3 = (length == 3);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			tsym225846* v;
			if (!(length == 3)) goto LA9;
			v = symforvar_521803(c, (*n).kindU.S6.Sons->data[0]);
			{
				tsym225846* LOC13;
				LOC13 = 0;
				LOC13 = getcurrowner_290256();
				if (!((*LOC13).Kind == ((NU8) 6))) goto LA14;
				(*v).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
			}
			LA14: ;
			asgnRefNoCycle((void**) (&(*v).Typ), iterbase);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_226132(v));
			{
				if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA18;
				addforvardecl_521765(c, v);
			}
			LA18: ;
		}
		goto LA7;
		LA9: ;
		{
			localerror_197955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2888));
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NI LOC22;
		LOC22 = 0;
		LOC22 = sonslen_226255(iter);
		if (!!(((NI32)(length - 2) == LOC22))) goto LA23;
		localerror_197955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2888));
	}
	goto LA1;
	LA23: ;
	{
		{
			NI i_522116;
			NI HEX3Atmp_522237;
			NI res_522240;
			i_522116 = 0;
			HEX3Atmp_522237 = 0;
			HEX3Atmp_522237 = (NI32)(length - 3);
			res_522240 = 0;
			{
				while (1) {
					tsym225846* v;
					if (!(res_522240 <= HEX3Atmp_522237)) goto LA28;
					i_522116 = res_522240;
					v = symforvar_521803(c, (*n).kindU.S6.Sons->data[i_522116]);
					{
						tsym225846* LOC31;
						LOC31 = 0;
						LOC31 = getcurrowner_290256();
						if (!((*LOC31).Kind == ((NU8) 6))) goto LA32;
						(*v).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
					}
					LA32: ;
					asgnRefNoCycle((void**) (&(*v).Typ), (*iter).Sons->data[i_522116]);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_522116]), newsymnode_226132(v));
					{
						if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA36;
						addforvardecl_521765(c, v);
					}
					LA36: ;
					res_522240 += 1;
				} LA28: ;
			}
		}
	}
	LA1: ;
	(*(*c).P).Nestedloopcounter += 1;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(length - 1)]), semstmt_487277(c, (*n).kindU.S6.Sons->data[(NI32)(length - 1)]));
	(*(*c).P).Nestedloopcounter -= 1;
	return result;
}

N_NIMCALL(tnode225816*, instfieldloopbody_520876)(tfieldinstctx520871 c, tnode225816* n, tnode225816* forloop) {
	tnode225816* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 1) ... ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
		result = n;
	}
	break;
	case ((NU8) 2):
	{
		NI l;
		result = n;
		l = sonslen_226249(forloop);
		{
			if (!c.Replacebyfieldname) goto LA5;
			{
				tnode225816* LOC9;
				NimStringDesc* fieldname;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_226698(forloop, 0);
				if (!((*(*n).kindU.S5.Ident).Sup.Id == (*(*LOC9).kindU.S5.Ident).Sup.Id)) goto LA10;
				{
					if (!c.Tupletype == 0) goto LA14;
					fieldname = (*(*c.Field).Name).S;
				}
				goto LA12;
				LA14: ;
				{
					NimStringDesc* LOC19;
					NimStringDesc* LOC20;
					if (!(*c.Tupletype).N == 0) goto LA17;
					LOC19 = 0;
					LOC20 = 0;
					LOC20 = nimIntToStr(c.Tupleindex);
					LOC19 = rawNewString(LOC20->Sup.len + 5);
appendString(LOC19, ((NimStringDesc*) &TMP3304));
appendString(LOC19, LOC20);
					fieldname = LOC19;
				}
				goto LA12;
				LA17: ;
				{
					fieldname = (*(*(*(*(*c.Tupletype).N).kindU.S6.Sons->data[c.Tupleindex]).kindU.S4.Sym).Name).S;
				}
				LA12: ;
				result = newstrnode_226118(((NU8) 20), fieldname);
				goto BeforeRet;
			}
			LA10: ;
		}
		LA5: ;
		{
			NI i_521006;
			NI HEX3Atmp_521135;
			NI HEX3Atmp_521136;
			NI res_521139;
			i_521006 = 0;
			HEX3Atmp_521135 = 0;
			HEX3Atmp_521136 = 0;
			HEX3Atmp_521135 = c.Replacebyfieldname;
			HEX3Atmp_521136 = (NI32)(l - 3);
			res_521139 = ((NI) (HEX3Atmp_521135));
			{
				while (1) {
					if (!(res_521139 <= HEX3Atmp_521136)) goto LA24;
					i_521006 = res_521139;
					{
						tnode225816* LOC27;
						tnode225816* call;
						tnode225816* tupl;
						LOC27 = 0;
						LOC27 = HEX5BHEX5D_226698(forloop, i_521006);
						if (!((*(*n).kindU.S5.Ident).Sup.Id == (*(*LOC27).kindU.S5.Ident).Sup.Id)) goto LA28;
						call = (*forloop).kindU.S6.Sons->data[(NI32)(l - 2)];
						tupl = (*call).kindU.S6.Sons->data[(NI32)((NI32)(i_521006 + 1) - ((NI) (c.Replacebyfieldname)))];
						{
							tnode225816* LOC34;
							if (!c.Field == 0) goto LA32;
							result = newnodei_226138(((NU8) 42), (*n).Info);
							add_226498(result, tupl);
							LOC34 = 0;
							LOC34 = newintnode_226096(((NU8) 6), ((NI64) (c.Tupleindex)));
							add_226498(result, LOC34);
						}
						goto LA30;
						LA32: ;
						{
							tnode225816* LOC36;
							result = newnodei_226138(((NU8) 45), (*n).Info);
							add_226498(result, tupl);
							LOC36 = 0;
							LOC36 = newsymnode_227755(c.Field, (*n).Info);
							add_226498(result, LOC36);
						}
						LA30: ;
						goto LA22;
					}
					LA28: ;
					res_521139 += 1;
				} LA24: ;
			}
		} LA22: ;
	}
	break;
	default:
	{
		NI LOC42;
		{
			if (!((*n).Kind == ((NU8) 111))) goto LA40;
			localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3305));
		}
		LA40: ;
		result = copynode_226323(n);
		LOC42 = 0;
		LOC42 = sonslen_226249(n);
		newsons_226273(result, LOC42);
		{
			NI i_521105;
			NI HEX3Atmp_521142;
			NI LOC44;
			NI res_521145;
			i_521105 = 0;
			HEX3Atmp_521142 = 0;
			LOC44 = 0;
			LOC44 = sonslen_226249(n);
			HEX3Atmp_521142 = (NI32)(LOC44 - 1);
			res_521145 = 0;
			{
				while (1) {
					if (!(res_521145 <= HEX3Atmp_521142)) goto LA46;
					i_521105 = res_521145;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_521105]), instfieldloopbody_520876(c, (*n).kindU.S6.Sons->data[i_521105], forloop));
					res_521145 += 1;
				} LA46: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, semforobjectfields_521172)(tfieldsctx521169 c, tnode225816* typ, tnode225816* forloop, tnode225816* father) {
	switch ((*typ).Kind) {
	case ((NU8) 3):
	{
		tfieldinstctx520871 fc;
		tscope225840* LOC2;
		tnode225816* body;
		tnode225816* LOC3;
		tnode225816* LOC4;
		memset((void*)(&fc), 0, sizeof(fc));
		fc.Field = (*typ).kindU.S4.Sym;
		fc.Replacebyfieldname = (c.M == ((NU16) 153));
		LOC2 = 0;
		LOC2 = openscope_295191(c.C);
		(*c.C).Inunrolledcontext += 1;
		LOC3 = 0;
		LOC3 = lastson_226261(forloop);
		body = instfieldloopbody_520876(fc, LOC3, forloop);
		LOC4 = 0;
		LOC4 = semstmt_487277(c.C, body);
		add_226498(father, LOC4);
		(*c.C).Inunrolledcontext -= 1;
		closescope_295211(c.C);
	}
	break;
	case ((NU8) 23):
	{
	}
	break;
	case ((NU8) 138):
	{
		NI l_521227;
		tnode225816* call;
		tnode225816* LOC12;
		tnode225816* casestmt;
		tnode225816* access;
		tnode225816* LOC13;
		l_521227 = len_226364(forloop);
		call = (*forloop).kindU.S6.Sons->data[(NI32)(l_521227 - 2)];
		{
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_226364(call);
			if (!(2 < LOC9)) goto LA10;
			localerror_197955((*forloop).Info, ((NU16) 4), ((NimStringDesc*) &TMP3306));
			goto BeforeRet;
		}
		LA10: ;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(typ, 0);
		semforobjectfields_521172(c, LOC12, forloop, father);
		casestmt = newnodei_226138(((NU8) 97), (*forloop).Info);
		access = newnodei_228007(((NU8) 45), (*forloop).Info, 2);
		asgnRefNoCycle((void**) (&(*access).kindU.S6.Sons->data[0]), (*call).kindU.S6.Sons->data[1]);
		asgnRefNoCycle((void**) (&(*access).kindU.S6.Sons->data[1]), newsymnode_227755((*(*typ).kindU.S6.Sons->data[0]).kindU.S4.Sym, (*forloop).Info));
		LOC13 = 0;
		LOC13 = semexprwithtype_487211(c.C, access, 0);
		add_226498(casestmt, LOC13);
		{
			NI i_521337;
			NI HEX3Atmp_521357;
			NI LOC15;
			NI res_521360;
			i_521337 = 0;
			HEX3Atmp_521357 = 0;
			LOC15 = 0;
			LOC15 = len_226364(typ);
			HEX3Atmp_521357 = (LOC15 - 1);
			res_521360 = 1;
			{
				while (1) {
					tnode225816* branch;
					tnode225816* LOC18;
					NI l;
					tnode225816* LOC19;
					tnode225816* LOC20;
					tnode225816* LOC21;
					if (!(res_521360 <= HEX3Atmp_521357)) goto LA17;
					i_521337 = res_521360;
					LOC18 = 0;
					LOC18 = HEX5BHEX5D_226698(typ, i_521337);
					branch = copytree_226329(LOC18);
					l = len_226364(branch);
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI32)(l - 1)]), newnodei_226138(((NU8) 115), (*forloop).Info));
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_226698(typ, i_521337);
					LOC20 = 0;
					LOC20 = lastson_226261(LOC19);
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_226698(branch, (NI32)(l - 1));
					semforobjectfields_521172(c, LOC20, forloop, LOC21);
					add_226498(casestmt, branch);
					res_521360 += 1;
				} LA17: ;
			}
		}
		add_226498(father, casestmt);
	}
	break;
	case ((NU8) 137):
	{
		{
			tnode225816* t_521354;
			t_521354 = 0;
			{
				NI i_521366;
				NI HEX3Atmp_521368;
				NI LOC25;
				NI res_521370;
				i_521366 = 0;
				HEX3Atmp_521368 = 0;
				LOC25 = 0;
				LOC25 = len_226364(typ);
				HEX3Atmp_521368 = (LOC25 - 1);
				res_521370 = 0;
				{
					while (1) {
						if (!(res_521370 <= HEX3Atmp_521368)) goto LA27;
						i_521366 = res_521370;
						t_521354 = (*typ).kindU.S6.Sons->data[i_521366];
						semforobjectfields_521172(c, t_521354, forloop, father);
						res_521370 += 1;
					} LA27: ;
				}
			}
		}
	}
	break;
	default:
	{
		illformedast_291406(typ);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(tnode225816*, semforfields_521395)(tcontext290021* c, tnode225816* n, NU16 m) {
	tnode225816* result;
	tsym225846* truesymbol;
	tident200021* LOC1;
	tnode225816* stmts;
	NI length;
	tnode225816* call;
	ttype225852* tupletypea;
	result = 0;
	result = newnodei_228007(((NU8) 96), (*n).Info, 2);
	LOC1 = 0;
	LOC1 = getident_200472(((NimStringDesc*) &TMP3301));
	truesymbol = strtableget_235111((*systemmodule_282019).kindU.S3.Tab, LOC1);
	{
		tident200021* LOC6;
		tsym225846* LOC7;
		if (!(truesymbol == NIM_NIL)) goto LA4;
		localerror_197955((*n).Info, ((NU16) 64), ((NimStringDesc*) &TMP3302));
		LOC6 = 0;
		LOC6 = getident_200472(((NimStringDesc*) &TMP3301));
		LOC7 = 0;
		LOC7 = getcurrowner_290256();
		truesymbol = newsym_226074(((NU8) 0), LOC6, LOC7, (*n).Info);
		asgnRefNoCycle((void**) (&(*truesymbol).Typ), getsystype_282030(((NU8) 1)));
	}
	LA4: ;
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_227755(truesymbol, (*n).Info));
	stmts = newnodei_226138(((NU8) 115), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), stmts);
	length = sonslen_226249(n);
	call = (*n).kindU.S6.Sons->data[(NI32)(length - 2)];
	{
		NI LOC10;
		LOC10 = 0;
		LOC10 = sonslen_226249(call);
		if (!!(((NI32)(length - 2) == (NI32)((NI32)(LOC10 - 1) + ((NI) ((m == ((NU16) 153)))))))) goto LA11;
		localerror_197955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2888));
		goto BeforeRet;
	}
	LA11: ;
	tupletypea = skiptypes_230245((*(*call).kindU.S6.Sons->data[1]).Typ, IL64(211106240964608));
	{
		if (!!(((*tupletypea).Kind == ((NU8) 18) || (*tupletypea).Kind == ((NU8) 17)))) goto LA15;
		localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3303));
		goto BeforeRet;
	}
	LA15: ;
	{
		NI i_521552;
		NI HEX3Atmp_521724;
		NI LOC18;
		NI res_521727;
		i_521552 = 0;
		HEX3Atmp_521724 = 0;
		LOC18 = 0;
		LOC18 = len_226364(call);
		HEX3Atmp_521724 = (NI32)(LOC18 - 1);
		res_521727 = 1;
		{
			while (1) {
				ttype225852* tupletypeb;
				if (!(res_521727 <= HEX3Atmp_521724)) goto LA20;
				i_521552 = res_521727;
				tupletypeb = skiptypes_230245((*(*call).kindU.S6.Sons->data[i_521552]).Typ, IL64(211106240964608));
				{
					NIM_BOOL LOC23;
					LOC23 = 0;
					LOC23 = sametype_268351(tupletypea, tupletypeb, 0);
					if (!!(LOC23)) goto LA24;
					typemismatch_487357((*call).kindU.S6.Sons->data[i_521552], tupletypea, tupletypeb);
				}
				LA24: ;
				res_521727 += 1;
			} LA20: ;
		}
	}
	(*(*c).P).Nestedloopcounter += 1;
	{
		tnode225816* loopbody;
		if (!((*tupletypea).Kind == ((NU8) 18))) goto LA28;
		loopbody = (*n).kindU.S6.Sons->data[(NI32)(length - 1)];
		{
			NI i_521646;
			NI HEX3Atmp_521731;
			NI LOC31;
			NI res_521734;
			i_521646 = 0;
			HEX3Atmp_521731 = 0;
			LOC31 = 0;
			LOC31 = sonslen_226255(tupletypea);
			HEX3Atmp_521731 = (NI32)(LOC31 - 1);
			res_521734 = 0;
			{
				while (1) {
					tscope225840* LOC34;
					tfieldinstctx520871 fc;
					tnode225816* body;
					tnode225816* LOC35;
					if (!(res_521734 <= HEX3Atmp_521731)) goto LA33;
					i_521646 = res_521734;
					LOC34 = 0;
					LOC34 = openscope_295191(c);
					memset((void*)(&fc), 0, sizeof(fc));
					fc.Tupletype = tupletypea;
					fc.Tupleindex = i_521646;
					fc.Replacebyfieldname = (m == ((NU16) 153));
					body = instfieldloopbody_520876(fc, loopbody, n);
					(*c).Inunrolledcontext += 1;
					LOC35 = 0;
					LOC35 = semstmt_487277(c, body);
					add_226498(stmts, LOC35);
					(*c).Inunrolledcontext -= 1;
					closescope_295211(c);
					res_521734 += 1;
				} LA33: ;
			}
		}
	}
	goto LA26;
	LA28: ;
	{
		tfieldsctx521169 fc;
		ttype225852* t;
		memset((void*)(&fc), 0, sizeof(fc));
		fc.M = m;
		fc.C = c;
		t = tupletypea;
		{
			while (1) {
				if (!((*t).Kind == ((NU8) 17))) goto LA38;
				semforobjectfields_521172(fc, (*t).N, n, stmts);
				{
					if (!((*t).Sons->data[0] == NIM_NIL)) goto LA41;
					goto LA37;
				}
				LA41: ;
				t = skiptypes_230245((*t).Sons->data[0], IL64(211106247256320));
			} LA38: ;
		} LA37: ;
	}
	LA26: ;
	(*(*c).P).Nestedloopcounter -= 1;
	{
		NIM_BOOL LOC45;
		tnode225816* b;
		LOC45 = 0;
		LOC45 = hassonwith_226301(stmts, ((NU8) 110));
		if (!LOC45) goto LA46;
		b = newnodei_226138(((NU8) 110), (*n).Info);
		add_226498(b, emptynode_226738);
		add_226498(stmts, b);
	}
	goto LA43;
	LA46: ;
	{
		result = stmts;
	}
	LA43: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, implicititerator_522254)(tcontext290021* c, NimStringDesc* it, tnode225816* arg) {
	tnode225816* result;
	tident200021* LOC1;
	tnode225816* LOC2;
	result = 0;
	result = newnodei_226138(((NU8) 27), (*arg).Info);
	LOC1 = 0;
	LOC1 = getident_200472(it);
	LOC2 = 0;
	LOC2 = newidentnode_226125(LOC1, (*arg).Info);
	add_226498(result, LOC2);
	{
		NIM_BOOL LOC5;
		tnode225816* LOC9;
		LOC5 = 0;
		LOC5 = !(((*arg).Typ == NIM_NIL));
		if (!(LOC5)) goto LA6;
		LOC5 = ((*(*arg).Typ).Kind == ((NU8) 23));
		LA6: ;
		if (!LOC5) goto LA7;
		LOC9 = 0;
		LOC9 = newderef_517404(arg);
		add_226498(result, LOC9);
	}
	goto LA3;
	LA7: ;
	{
		add_226498(result, arg);
	}
	LA3: ;
	result = semexprnoderef_487228(c, result, 2);
	return result;
}

N_NIMCALL(tnode225816*, semfor_522290)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NI length;
	tscope225840* LOC1;
	tnode225816* call;
	NIM_BOOL iscallexpr;
	result = 0;
	result = n;
	checkminsonslen_291426(n, 3);
	length = sonslen_226249(n);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(length - 2)]), semexprnoderef_487228(c, (*n).kindU.S6.Sons->data[(NI32)(length - 2)], 2));
	call = (*n).kindU.S6.Sons->data[(NI32)(length - 2)];
	iscallexpr = ((*call).Kind == ((NU8) 27) || (*call).Kind == ((NU8) 29) || (*call).Kind == ((NU8) 30) || (*call).Kind == ((NU8) 31) || (*call).Kind == ((NU8) 26) || (*call).Kind == ((NU8) 28) || (*call).Kind == ((NU8) 32));
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		tnode225816* LOC7;
		tnode225816* LOC9;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = iscallexpr;
		if (!(LOC5)) goto LA6;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_226698(call, 0);
		LOC5 = ((*LOC7).Kind == ((NU8) 3));
		LA6: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA8;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_226698(call, 0);
		LOC4 = ((*(*LOC9).kindU.S4.Sym).Magic == ((NU16) 152) || (*(*LOC9).kindU.S4.Sym).Magic == ((NU16) 153) || (*(*LOC9).kindU.S4.Sym).Magic == ((NU16) 154));
		LA8: ;
		if (!LOC4) goto LA10;
		{
			if (!((*(*(*call).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic == ((NU16) 154))) goto LA14;
			result = semforvars_522004(c, n);
			(*result).Kind = ((NU8) 95);
		}
		goto LA12;
		LA14: ;
		{
			result = semforfields_521395(c, n, (*(*(*call).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic);
		}
		LA12: ;
	}
	goto LA2;
	LA10: ;
	{
		NIM_BOOL LOC18;
		NIM_BOOL LOC19;
		LOC18 = 0;
		LOC19 = 0;
		LOC19 = iscallexpr;
		if (!(LOC19)) goto LA20;
		LOC19 = ((*(*(*call).kindU.S6.Sons->data[0]).Typ).Callconv == ((NU8) 8));
		LA20: ;
		LOC18 = LOC19;
		if (LOC18) goto LA21;
		LOC18 = ((*(*call).Typ).Kind == ((NU8) 49));
		LA21: ;
		if (!LOC18) goto LA22;
		result = semforvars_522004(c, n);
	}
	goto LA2;
	LA22: ;
	{
		NIM_BOOL LOC25;
		NIM_BOOL LOC26;
		LOC25 = 0;
		LOC26 = 0;
		LOC26 = !(iscallexpr);
		if (LOC26) goto LA27;
		LOC26 = !(((*(*call).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)));
		LA27: ;
		LOC25 = LOC26;
		if (LOC25) goto LA28;
		LOC25 = !(((49152 &(1<<(((*(*(*call).kindU.S6.Sons->data[0]).kindU.S4.Sym).Kind)&31)))!=0));
		LA28: ;
		if (!LOC25) goto LA29;
		{
			if (!(length == 3)) goto LA33;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(length - 2)]), implicititerator_522254(c, ((NimStringDesc*) &TMP3307), (*n).kindU.S6.Sons->data[(NI32)(length - 2)]));
		}
		goto LA31;
		LA33: ;
		{
			if (!(length == 4)) goto LA36;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI32)(length - 2)]), implicititerator_522254(c, ((NimStringDesc*) &TMP3308), (*n).kindU.S6.Sons->data[(NI32)(length - 2)]));
		}
		goto LA31;
		LA36: ;
		{
			localerror_197955((*(*n).kindU.S6.Sons->data[(NI32)(length - 2)]).Info, ((NU16) 218), ((NimStringDesc*) &TMP2888));
		}
		LA31: ;
		result = semforvars_522004(c, n);
	}
	goto LA2;
	LA29: ;
	{
		result = semforvars_522004(c, n);
	}
	LA2: ;
	{
		if (!((*(*n).kindU.S6.Sons->data[(NI32)(length - 1)]).Typ == enforcevoidcontext_515110)) goto LA42;
		asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_515110);
	}
	LA42: ;
	closescope_295211(c);
	return result;
}

N_NIMCALL(NI64, tocover_515547)(ttype225852* t) {
	NI64 result;
	ttype225852* t2;
	result = 0;
	t2 = skiptypes_230245(t, IL64(211106242013184));
	{
		NIM_BOOL LOC3;
		NI LOC7;
		LOC3 = 0;
		LOC3 = ((*t2).Kind == ((NU8) 14));
		if (!(LOC3)) goto LA4;
		LOC3 = enumhasholes_263098(t2);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = sonslen_226249((*t2).N);
		result = ((NI64) (LOC7));
	}
	goto LA1;
	LA5: ;
	{
		ttype225852* LOC9;
		LOC9 = 0;
		LOC9 = skiptypes_230245(t, IL64(211106240964608));
		result = lengthord_263016(LOC9);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semcase_518201)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tscope225840* LOC1;
	NIM_BOOL chckcovered;
	NI64 covered;
	ttype225852* typ;
	NIM_BOOL haselse;
	NIM_BOOL notordinal;
	ttype225852* LOC2;
	result = 0;
	result = n;
	checkminsonslen_291426(n, 2);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
	chckcovered = NIM_FALSE;
	covered = IL64(0);
	typ = commontypebegin_487459;
	haselse = NIM_FALSE;
	notordinal = NIM_FALSE;
	LOC2 = 0;
	LOC2 = skiptypes_230245((*(*n).kindU.S6.Sons->data[0]).Typ, IL64(211106242013184));
	switch ((*LOC2).Kind) {
	case ((NU8) 31) ... ((NU8) 35):
	case ((NU8) 2):
	case ((NU8) 14):
	case ((NU8) 40) ... ((NU8) 43):
	case ((NU8) 1):
	{
		chckcovered = NIM_TRUE;
	}
	break;
	case ((NU8) 36) ... ((NU8) 39):
	case ((NU8) 28):
	case ((NU8) 50):
	{
		notordinal = NIM_TRUE;
	}
	break;
	default:
	{
		localerror_197955((*n).Info, ((NU16) 107), ((NimStringDesc*) &TMP2888));
		goto BeforeRet;
	}
	break;
	}
	{
		NI i_518283;
		NI HEX3Atmp_518806;
		NI LOC7;
		NI res_518809;
		i_518283 = 0;
		HEX3Atmp_518806 = 0;
		LOC7 = 0;
		LOC7 = sonslen_226249(n);
		HEX3Atmp_518806 = (NI32)(LOC7 - 1);
		res_518809 = 1;
		{
			while (1) {
				tnode225816* x;
				if (!(res_518809 <= HEX3Atmp_518806)) goto LA9;
				i_518283 = res_518809;
				x = (*n).kindU.S6.Sons->data[i_518283];
				switch ((*x).Kind) {
				case ((NU8) 85):
				{
					NI last;
					NI LOC11;
					checkminsonslen_291426(x, 2);
					semcasebranch_498296(c, n, x, i_518283, (&covered));
					LOC11 = 0;
					LOC11 = sonslen_226249(x);
					last = (NI32)(LOC11 - 1);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[last]), semexprbranchscope_517447(c, (*x).kindU.S6.Sons->data[last]));
					typ = commontype_487492(typ, (*(*x).kindU.S6.Sons->data[last]).Typ);
				}
				break;
				case ((NU8) 86):
				{
					tscope225840* LOC13;
					tnode225816* LOC14;
					chckcovered = NIM_FALSE;
					checksonslen_291416(x, 2);
					LOC13 = 0;
					LOC13 = openscope_295191(c);
					LOC14 = 0;
					LOC14 = semexprwithtype_487211(c, (*x).kindU.S6.Sons->data[0], 0);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[0]), forcebool_495036(c, LOC14));
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[1]), semexprbranch_517411(c, (*x).kindU.S6.Sons->data[1]));
					typ = commontype_487492(typ, (*(*x).kindU.S6.Sons->data[1]).Typ);
					closescope_295211(c);
				}
				break;
				case ((NU8) 88):
				{
					chckcovered = NIM_FALSE;
					checksonslen_291416(x, 1);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[0]), semexprbranchscope_517447(c, (*x).kindU.S6.Sons->data[0]));
					typ = commontype_487492(typ, (*(*x).kindU.S6.Sons->data[0]).Typ);
					haselse = NIM_TRUE;
				}
				break;
				default:
				{
					illformedast_291406(x);
				}
				break;
				}
				res_518809 += 1;
			} LA9: ;
		}
	}
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = notordinal;
		if (!(LOC19)) goto LA20;
		LOC19 = !(haselse);
		LA20: ;
		if (!LOC19) goto LA21;
		message_197976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3309));
	}
	LA21: ;
	{
		if (!chckcovered) goto LA25;
		{
			NI64 LOC29;
			LOC29 = 0;
			LOC29 = tocover_515547((*(*n).kindU.S6.Sons->data[0]).Typ);
			if (!(covered == LOC29)) goto LA30;
			haselse = NIM_TRUE;
		}
		goto LA27;
		LA30: ;
		{
			localerror_197955((*n).Info, ((NU16) 151), ((NimStringDesc*) &TMP2888));
		}
		LA27: ;
	}
	LA25: ;
	closescope_295211(c);
	{
		NIM_BOOL LOC35;
		NIM_BOOL LOC36;
		LOC35 = 0;
		LOC36 = 0;
		LOC36 = isemptytype_232990(typ);
		if (LOC36) goto LA37;
		LOC36 = ((*typ).Kind == ((NU8) 5));
		LA37: ;
		LOC35 = LOC36;
		if (LOC35) goto LA38;
		LOC35 = !(haselse);
		LA38: ;
		if (!LOC35) goto LA39;
		{
			NI i_518718;
			NI HEX3Atmp_518812;
			NI LOC42;
			NI res_518815;
			i_518718 = 0;
			HEX3Atmp_518812 = 0;
			LOC42 = 0;
			LOC42 = len_226364(n);
			HEX3Atmp_518812 = (NI32)(LOC42 - 1);
			res_518815 = 1;
			{
				while (1) {
					tnode225816* LOC45;
					if (!(res_518815 <= HEX3Atmp_518812)) goto LA44;
					i_518718 = res_518815;
					LOC45 = 0;
					LOC45 = lastson_226261((*n).kindU.S6.Sons->data[i_518718]);
					discardcheck_517617(c, LOC45);
					res_518815 += 1;
				} LA44: ;
			}
		}
		{
			if (!(typ == enforcevoidcontext_515110)) goto LA48;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_515110);
		}
		LA48: ;
	}
	goto LA33;
	LA39: ;
	{
		{
			NI i_518759;
			NI HEX3Atmp_518818;
			NI LOC52;
			NI res_518821;
			i_518759 = 0;
			HEX3Atmp_518818 = 0;
			LOC52 = 0;
			LOC52 = len_226364(n);
			HEX3Atmp_518818 = (NI32)(LOC52 - 1);
			res_518821 = 1;
			{
				while (1) {
					tnode225816* it;
					NI j;
					NI LOC55;
					if (!(res_518821 <= HEX3Atmp_518818)) goto LA54;
					i_518759 = res_518821;
					it = (*n).kindU.S6.Sons->data[i_518759];
					LOC55 = 0;
					LOC55 = len_226364(it);
					j = (NI32)(LOC55 - 1);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[j]), fitnode_487245(c, typ, (*it).kindU.S6.Sons->data[j]));
					res_518821 += 1;
				} LA54: ;
			}
		}
		asgnRefNoCycle((void**) (&(*result).Typ), typ);
	}
	LA33: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semreturn_537903)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 1);
	{
		if (!((241664 &(1<<(((*(*(*c).P).Owner).Kind)&31)))!=0)) goto LA3;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA7;
			{
				tnode225816* a;
				tnode225816* LOC13;
				if (!!(((*(*c).P).Resultsym == NIM_NIL))) goto LA11;
				a = newnodei_226138(((NU8) 73), (*(*n).kindU.S6.Sons->data[0]).Info);
				LOC13 = 0;
				LOC13 = newsymnode_226132((*(*c).P).Resultsym);
				addson_226287(a, LOC13);
				addson_226287(a, (*n).kindU.S6.Sons->data[0]);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semasgn_537534(c, a));
				{
					NIM_BOOL LOC16;
					tnode225816* LOC17;
					tnode225816* LOC18;
					tnode225816* LOC20;
					tnode225816* LOC21;
					LOC16 = 0;
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_226698(n, 0);
					LOC18 = 0;
					LOC18 = HEX5BHEX5D_226698(LOC17, 1);
					LOC16 = ((*LOC18).Kind == ((NU8) 3));
					if (!(LOC16)) goto LA19;
					LOC20 = 0;
					LOC20 = HEX5BHEX5D_226698(n, 0);
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_226698(LOC20, 1);
					LOC16 = ((*LOC21).kindU.S4.Sym == (*(*c).P).Resultsym);
					LA19: ;
					if (!LOC16) goto LA22;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), emptynode_226738);
				}
				LA22: ;
			}
			goto LA9;
			LA11: ;
			{
				localerror_197955((*n).Info, ((NU16) 179), ((NimStringDesc*) &TMP2888));
			}
			LA9: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		localerror_197955((*n).Info, ((NU16) 163), ((NimStringDesc*) &TMP3310));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semusing_539158)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(((NU8) 1), (*n).Info);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = experimentalmode_291447(c);
		if (!!(LOC3)) goto LA4;
		localerror_197966((*n).Info, ((NimStringDesc*) &TMP3311));
	}
	LA4: ;
	{
		tnode225816* e_539189;
		tnodeseq225810* HEX3Atmp_539265;
		NI i_539268;
		NI l_539270;
		e_539189 = 0;
		HEX3Atmp_539265 = 0;
		HEX3Atmp_539265 = (*n).kindU.S6.Sons;
		i_539268 = 0;
		l_539270 = HEX3Atmp_539265->Sup.len;
		{
			while (1) {
				if (!(i_539268 < l_539270)) goto LA8;
				e_539189 = HEX3Atmp_539265->data[i_539268];
				{
					tnode225816* usedsym;
					NimStringDesc* LOC17;
					usedsym = semexpr_487201(c, e_539189, 0);
					{
						if (!((*usedsym).Kind == ((NU8) 3))) goto LA12;
						switch ((*(*usedsym).kindU.S4.Sym).Kind) {
						case ((NU8) 3):
						case ((NU8) 8) ... ((NU8) 11):
						case ((NU8) 21):
						{
							safeadd_491915((&(*(*c).Currentscope).Usingsyms), usedsym);
							goto LA9;
						}
						break;
						case ((NU8) 12):
						case ((NU8) 18):
						case ((NU8) 17):
						case ((NU8) 14):
						case ((NU8) 15):
						case ((NU8) 13):
						case ((NU8) 16):
						{
							adddeclat_295714((*c).Currentscope, (*usedsym).kindU.S4.Sym);
							goto LA9;
						}
						break;
						default:
						{
						}
						break;
						}
					}
					LA12: ;
					LOC17 = 0;
					LOC17 = rendertree_250058(e_539189, 0);
					localerror_197955((*e_539189).Info, ((NU16) 200), LOC17);
				} LA9: ;
				i_539268 += 1;
			} LA8: ;
		}
	}
	return result;
}

N_NIMCALL(tnode225816*, semasm_515406)(tcontext290021* con, tnode225816* n) {
	tnode225816* result;
	NIM_CHAR marker;
	result = 0;
	checksonslen_291416(n, 2);
	marker = pragmaasm_310098(con, (*n).kindU.S6.Sons->data[0]);
	{
		if (!((NU8)(marker) == (NU8)(0))) goto LA3;
		marker = 96;
	}
	LA3: ;
	result = semasmoremit_312632(con, n, marker);
	return result;
}

N_NIMCALL(void, semyieldvarresult_538212)(tcontext290021* c, tnode225816* n, ttype225852* restype) {
	ttype225852* t;
	t = skiptypes_230245(restype, 2048);
	switch ((*t).Kind) {
	case ((NU8) 23):
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), takeimplicitaddr_537372(c, (*n).kindU.S6.Sons->data[0]));
	}
	break;
	case ((NU8) 18):
	{
		{
			NI i_538268;
			NI HEX3Atmp_538496;
			NI LOC4;
			NI res_538499;
			i_538268 = 0;
			HEX3Atmp_538496 = 0;
			LOC4 = 0;
			LOC4 = sonslen_226255(t);
			HEX3Atmp_538496 = (LOC4 - 1);
			res_538499 = 0;
			{
				while (1) {
					ttype225852* e;
					if (!(res_538499 <= HEX3Atmp_538496)) goto LA6;
					i_538268 = res_538499;
					e = skiptypes_230245((*t).Sons->data[i_538268], 2048);
					{
						if (!((*e).Kind == ((NU8) 23))) goto LA9;
						{
							if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 37))) goto LA13;
							asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[i_538268]), takeimplicitaddr_537372(c, (*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[i_538268]));
						}
						goto LA11;
						LA13: ;
						{
							NIM_BOOL LOC16;
							tnode225816* a;
							LOC16 = 0;
							LOC16 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 58) || (*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 59));
							if (!(LOC16)) goto LA17;
							LOC16 = ((*(*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[1]).Kind == ((NU8) 37));
							LA17: ;
							if (!LOC16) goto LA18;
							a = (*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[1];
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[i_538268]), takeimplicitaddr_537372(c, (*a).kindU.S6.Sons->data[i_538268]));
						}
						goto LA11;
						LA18: ;
						{
							localerror_197955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 188), ((NimStringDesc*) &TMP3313));
						}
						LA11: ;
					}
					LA9: ;
					res_538499 += 1;
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(tnode225816*, semyield_538513)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = n;
	checksonslen_291416(n, 1);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*(*c).P).Owner == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = !(((49152 &(1<<(((*(*(*c).P).Owner).Kind)&31)))!=0));
		LA4: ;
		if (!LOC3) goto LA5;
		localerror_197955((*n).Info, ((NU16) 36), ((NimStringDesc*) &TMP2888));
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		LOC8 = 0;
		LOC8 = (0 < (*(*c).P).Intrystmt);
		if (!(LOC8)) goto LA9;
		LOC8 = !(((*(*(*(*c).P).Owner).Typ).Callconv == ((NU8) 5)));
		LA9: ;
		if (!LOC8) goto LA10;
		localerror_197955((*n).Info, ((NU16) 37), ((NimStringDesc*) &TMP2888));
	}
	goto LA1;
	LA10: ;
	{
		ttype225852* itertype;
		ttype225852* restype;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA13;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
		itertype = (*(*(*c).P).Owner).Typ;
		restype = (*itertype).Sons->data[0];
		{
			ttype225852* adjustedres;
			if (!!((restype == NIM_NIL))) goto LA17;
			{
				if (!((*(*(*c).P).Owner).Kind == ((NU8) 14))) goto LA21;
				adjustedres = base_263038(restype);
			}
			goto LA19;
			LA21: ;
			{
				adjustedres = restype;
			}
			LA19: ;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), fitnode_487245(c, adjustedres, (*n).kindU.S6.Sons->data[0]));
			{
				if (!((*(*n).kindU.S6.Sons->data[0]).Typ == NIM_NIL)) goto LA26;
				internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3312));
			}
			LA26: ;
			{
				NIM_BOOL LOC30;
				ttype225852* inferred;
				LOC30 = 0;
				LOC30 = ismetatype_226752(adjustedres);
				if (!(LOC30)) goto LA31;
				LOC30 = !(((*adjustedres).Kind == ((NU8) 8)));
				LA31: ;
				if (!LOC30) goto LA32;
				inferred = (*(*n).kindU.S6.Sons->data[0]).Typ;
				{
					if (!((*(*(*c).P).Owner).Kind == ((NU8) 14))) goto LA36;
					asgnRefNoCycle((void**) (&(*(*itertype).Sons->data[0]).Sons->data[0]), inferred);
				}
				goto LA34;
				LA36: ;
				{
					asgnRefNoCycle((void**) (&(*itertype).Sons->data[0]), inferred);
				}
				LA34: ;
			}
			LA32: ;
			semyieldvarresult_538212(c, n, adjustedres);
		}
		goto LA15;
		LA17: ;
		{
			localerror_197955((*n).Info, ((NU16) 39), ((NimStringDesc*) &TMP2888));
		}
		LA15: ;
	}
	goto LA1;
	LA13: ;
	{
		if (!!(((*(*(*(*c).P).Owner).Typ).Sons->data[0] == NIM_NIL))) goto LA41;
		localerror_197955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3314));
	}
	goto LA1;
	LA41: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, semiterator_526541)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	NU8 kind;
	tsym225846* s;
	ttype225852* t;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode225816* LOC4;
		tnode225816* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_226698(n, 4);
		LOC3 = haspragma_315628(LOC4, ((NU8) 135));
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_226698(n, 0);
		LOC3 = ((*LOC6).Kind == ((NU8) 1));
		LA5: ;
		if (!LOC3) goto LA7;
		kind = ((NU8) 15);
	}
	goto LA1;
	LA7: ;
	{
		kind = ((NU8) 14);
	}
	LA1: ;
	{
		tnode225816* LOC12;
		tnode225816* LOC15;
		tnode225816* LOC16;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_226698(n, 0);
		if (!((*LOC12).Kind == ((NU8) 3))) goto LA13;
		LOC15 = 0;
		LOC15 = HEX5BHEX5D_226698(n, 0);
		asgnRefNoCycle((void**) (&(*(*LOC15).kindU.S4.Sym).Owner), getcurrowner_290256());
		LOC16 = 0;
		LOC16 = HEX5BHEX5D_226698(n, 0);
		(*(*LOC16).kindU.S4.Sym).Kind = kind;
	}
	LA13: ;
	result = semprocaux_525170(c, n, kind, TMP3316, ((NU8) 0));
	s = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	t = (*s).Typ;
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = ((*t).Sons->data[0] == NIM_NIL);
		if (!(LOC19)) goto LA20;
		LOC19 = !(((*(*s).Typ).Callconv == ((NU8) 8)));
		LA20: ;
		if (!LOC19) goto LA21;
		localerror_197955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3317));
	}
	LA21: ;
	{
		if (!((*(*s).Typ).Callconv == ((NU8) 8))) goto LA25;
		(*(*s).Typ).Flags |= ((NI32)1)<<((((NU8) 11))%(sizeof(NI32)*8));
	}
	goto LA23;
	LA25: ;
	{
		(*(*s).Typ).Callconv = ((NU8) 5);
	}
	LA23: ;
	{
		NIM_BOOL LOC30;
		LOC30 = 0;
		LOC30 = ((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1));
		if (!(LOC30)) goto LA31;
		LOC30 = ((*s).Magic == ((NU16) 0));
		LA31: ;
		if (!LOC30) goto LA32;
		localerror_197955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA32: ;
	return result;
}

N_NIMCALL(tnode225816*, semmethod_526896)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* s;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_291437(c);
		if (!!(LOC3)) goto LA4;
		localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3318));
	}
	LA4: ;
	result = semprocaux_525170(c, n, ((NU8) 13), TMP3057, ((NU8) 0));
	s = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	{
		NIM_BOOL LOC8;
		NIM_BOOL LOC9;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = isgenericroutine_232649(s);
		LOC8 = !(LOC9);
		if (!(LOC8)) goto LA10;
		LOC8 = !(((*(*result).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)));
		LA10: ;
		if (!LOC8) goto LA11;
		{
			NIM_BOOL LOC15;
			LOC15 = 0;
			LOC15 = hasobjparam_526844(s);
			if (!LOC15) goto LA16;
			methoddef_422824(s, NIM_FALSE);
		}
		goto LA13;
		LA16: ;
		{
			localerror_197955((*n).Info, ((NU16) 182), ((NimStringDesc*) &TMP3318));
		}
		LA13: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(tnode225816*, semconverterdef_526956)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* s;
	ttype225852* t;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_291437(c);
		if (!!(LOC3)) goto LA4;
		localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3319));
	}
	LA4: ;
	checksonslen_291416(n, 7);
	result = semprocaux_525170(c, n, ((NU8) 16), TMP3057, ((NU8) 0));
	s = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	t = (*s).Typ;
	{
		if (!((*t).Sons->data[0] == NIM_NIL)) goto LA8;
		localerror_197955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3319));
	}
	LA8: ;
	{
		NI LOC12;
		LOC12 = 0;
		LOC12 = sonslen_226255(t);
		if (!!((LOC12 == 2))) goto LA13;
		localerror_197955((*n).Info, ((NU16) 213), ((NimStringDesc*) &TMP3319));
	}
	LA13: ;
	addconverter_290635(c, s);
	return result;
}

N_NIMCALL(tnode225816*, semmacrodef_527011)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* s;
	ttype225852* t;
	result = 0;
	checksonslen_291416(n, 7);
	result = semprocaux_525170(c, n, ((NU8) 17), TMP3320, ((NU8) 0));
	s = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	t = (*s).Typ;
	{
		if (!((*t).Sons->data[0] == NIM_NIL)) goto LA3;
		localerror_197955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3321));
	}
	LA3: ;
	{
		if (!((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1))) goto LA7;
		localerror_197955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode225816*, evalinclude_527089)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(((NU8) 115), (*n).Info);
	addson_226287(result, n);
	{
		NI i_527106;
		NI HEX3Atmp_527125;
		NI LOC2;
		NI res_527128;
		i_527106 = 0;
		HEX3Atmp_527125 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(n);
		HEX3Atmp_527125 = (NI32)(LOC2 - 1);
		res_527128 = 0;
		{
			while (1) {
				NI32 f;
				if (!(res_527128 <= HEX3Atmp_527125)) goto LA4;
				i_527106 = res_527128;
				f = checkmodulename_298237((*n).kindU.S6.Sons->data[i_527106]);
				{
					if (!!((f == ((NI32) -1)))) goto LA7;
					{
						NIM_BOOL LOC11;
						NimStringDesc* LOC14;
						LOC11 = 0;
						LOC11 = containsorincl_222916((&(*c).Includedfiles), ((NI) (f)));
						if (!LOC11) goto LA12;
						LOC14 = 0;
						LOC14 = tofilename_197025(f);
						localerror_197955((*n).Info, ((NU16) 25), LOC14);
					}
					goto LA9;
					LA12: ;
					{
						tnode225816* LOC16;
						tnode225816* LOC17;
						LOC16 = 0;
						LOC16 = gincludefile_286073((*c).Module, f);
						LOC17 = 0;
						LOC17 = semstmt_487277(c, LOC16);
						addson_226287(result, LOC17);
						excl_222884((&(*c).Includedfiles), ((NI) (f)));
					}
					LA9: ;
				}
				LA7: ;
				res_527128 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode225816*, semexport_543058)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* x;
	result = 0;
	x = newnodei_226138((*n).Kind, (*n).Info);
	{
		NI i_543085;
		NI HEX3Atmp_543406;
		NI LOC2;
		NI res_543409;
		i_543085 = 0;
		HEX3Atmp_543406 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_543406 = (LOC2 - 1);
		res_543409 = 0;
		{
			while (1) {
				tnode225816* a;
				toverloaditer295491 o;
				tsym225846* s;
				if (!(res_543409 <= HEX3Atmp_543406)) goto LA4;
				i_543085 = res_543409;
				a = (*n).kindU.S6.Sons->data[i_543085];
				memset((void*)(&o), 0, sizeof(o));
				s = initoverloaditer_296665((&o), c, a);
				{
					NimStringDesc* LOC9;
					NimStringDesc* LOC10;
					if (!(s == NIM_NIL)) goto LA7;
					LOC9 = 0;
					LOC10 = 0;
					LOC10 = rendertree_250058(a, 0);
					LOC9 = rawNewString(LOC10->Sup.len + 15);
appendString(LOC9, ((NimStringDesc*) &TMP3338));
appendString(LOC9, LOC10);
					localerror_197955((*a).Info, ((NU16) 4), LOC9);
				}
				goto LA5;
				LA7: ;
				{
					tnode225816* LOC14;
					ttabiter235119 ti;
					tsym225846* it;
					if (!((*s).Kind == ((NU8) 6))) goto LA12;
					strtableadd_235103((&(*(*c).Module).kindU.S3.Tab), s);
					LOC14 = 0;
					LOC14 = newsymnode_227755(s, (*a).Info);
					add_226498(x, LOC14);
					memset((void*)(&ti), 0, sizeof(ti));
					it = inittabiter_235124((&ti), (*s).kindU.S3.Tab);
					{
						while (1) {
							if (!!((it == NIM_NIL))) goto LA16;
							{
								if (!((43513792 &(1<<(((*it).Kind)&31)))!=0)) goto LA19;
								strtableadd_235103((&(*(*c).Module).kindU.S3.Tab), it);
							}
							LA19: ;
							it = nextiter_235132((&ti), (*s).kindU.S3.Tab);
						} LA16: ;
					}
				}
				goto LA5;
				LA12: ;
				{
					{
						while (1) {
							if (!!((s == NIM_NIL))) goto LA23;
							{
								tnode225816* LOC28;
								if (!((43513792 &(1<<(((*s).Kind)&31)))!=0)) goto LA26;
								LOC28 = 0;
								LOC28 = newsymnode_227755(s, (*a).Info);
								add_226498(x, LOC28);
								strtableadd_235103((&(*(*c).Module).kindU.S3.Tab), s);
							}
							LA26: ;
							s = nextoverloaditer_297032((&o), c, a);
						} LA23: ;
					}
				}
				LA5: ;
				res_543409 += 1;
			} LA4: ;
		}
	}
	result = n;
	return result;
}

N_NIMCALL(void, setline_527142)(tnode225816* n, tlineinfo195539 info) {
	{
		NI i_527167;
		NI HEX3Atmp_527183;
		NI LOC2;
		NI res_527186;
		i_527167 = 0;
		HEX3Atmp_527183 = 0;
		LOC2 = 0;
		LOC2 = safelen_226424(n);
		HEX3Atmp_527183 = (LOC2 - 1);
		res_527186 = 0;
		{
			while (1) {
				if (!(res_527186 <= HEX3Atmp_527183)) goto LA4;
				i_527167 = res_527186;
				setline_527142((*n).kindU.S6.Sons->data[i_527167], info);
				res_527186 += 1;
			} LA4: ;
		}
	}
	(*n).Info = info;
}

N_NIMCALL(tnode225816*, sempragmablock_527200)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* pragmalist;
	result = 0;
	pragmalist = (*n).kindU.S6.Sons->data[0];
	pragma_310079(c, NIM_NIL, pragmalist, TMP3339);
	result = semexpr_487201(c, (*n).kindU.S6.Sons->data[1], 0);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), result);
	{
		NI i_527269;
		NI HEX3Atmp_527313;
		NI LOC2;
		NI res_527316;
		i_527269 = 0;
		HEX3Atmp_527313 = 0;
		LOC2 = 0;
		LOC2 = len_226364(pragmalist);
		HEX3Atmp_527313 = (LOC2 - 1);
		res_527316 = 0;
		{
			while (1) {
				NU8 LOC5;
				if (!(res_527316 <= HEX3Atmp_527313)) goto LA4;
				i_527269 = res_527316;
				LOC5 = 0;
				LOC5 = whichpragma_262304((*pragmalist).kindU.S6.Sons->data[i_527269]);
				switch (LOC5) {
				case ((NU8) 111):
				{
					setline_527142(result, (*(*pragmalist).kindU.S6.Sons->data[i_527269]).Info);
				}
				break;
				case ((NU8) 191):
				{
					result = n;
					asgnRefNoCycle((void**) (&(*result).Typ), (*(*n).kindU.S6.Sons->data[1]).Typ);
				}
				break;
				default:
				{
				}
				break;
				}
				res_527316 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode225816*, semstaticstmt_527330)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* a;
	result = 0;
	a = semstmt_487277(c, (*n).kindU.S6.Sons->data[0]);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), a);
	evalstaticstmt_477249((*c).Module, a, (*(*c).P).Owner);
	result = newnodei_228007(((NU8) 114), (*n).Info, 1);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), emptynode_226738);
	return result;
}

N_NIMCALL(tnode225816*, semexpr_487201)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = n;
	{
		if (!(gcmd_169120 == ((NU8) 14))) goto LA3;
		suggestexpr_421008(c, n);
	}
	LA3: ;
	{
		if (!(((*n).Flags &(1<<((((NU8) 6))&15)))!=0)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	switch ((*n).Kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		tsym225846* s;
		s = lookup_296004(c, n);
		semcapturesym_429685(s, (*(*c).P).Owner);
		result = semsym_528849(c, n, s, flags);
		{
			if (!((126976 &(1<<(((*s).Kind)&31)))!=0)) goto LA12;
			result = symchoice_504476(c, n, s, ((NU8) 0));
			{
				if (!((*result).Kind == ((NU8) 3))) goto LA16;
				markindirect_291366(c, (*result).kindU.S4.Sym);
			}
			LA16: ;
		}
		LA12: ;
	}
	break;
	case ((NU8) 3):
	{
		result = semsym_528849(c, n, (*n).kindU.S4.Sym, flags);
	}
	break;
	case ((NU8) 1):
	case ((NU8) 0):
	case ((NU8) 125):
	{
	}
	break;
	case ((NU8) 23):
	{
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 5)));
	}
	break;
	case ((NU8) 6):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA24;
			setintlittype_282632(result);
		}
		LA24: ;
	}
	break;
	case ((NU8) 7):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA29;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 32)));
		}
		LA29: ;
	}
	break;
	case ((NU8) 8):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA34;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 33)));
		}
		LA34: ;
	}
	break;
	case ((NU8) 9):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA39;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 34)));
		}
		LA39: ;
	}
	break;
	case ((NU8) 10):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA44;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 35)));
		}
		LA44: ;
	}
	break;
	case ((NU8) 11):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA49;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 40)));
		}
		LA49: ;
	}
	break;
	case ((NU8) 12):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA54;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 41)));
		}
		LA54: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA59;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 42)));
		}
		LA59: ;
	}
	break;
	case ((NU8) 14):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA64;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 43)));
		}
		LA64: ;
	}
	break;
	case ((NU8) 15):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA69;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 44)));
		}
		LA69: ;
	}
	break;
	case ((NU8) 16):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA74;
			asgnRefNoCycle((void**) (&(*result).Typ), getfloatlittype_282521(result));
		}
		LA74: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA79;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 37)));
		}
		LA79: ;
	}
	break;
	case ((NU8) 18):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA84;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 38)));
		}
		LA84: ;
	}
	break;
	case ((NU8) 19):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA89;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 39)));
		}
		LA89: ;
	}
	break;
	case ((NU8) 20) ... ((NU8) 22):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA94;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 28)));
		}
		LA94: ;
	}
	break;
	case ((NU8) 5):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA99;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_282030(((NU8) 2)));
		}
		LA99: ;
	}
	break;
	case ((NU8) 45):
	{
		result = semfieldaccess_528617(c, n, flags);
		{
			if (!((*result).Kind == ((NU8) 25))) goto LA104;
			(*result).Kind = ((NU8) 27);
			result = semexpr_487201(c, result, flags);
		}
		LA104: ;
	}
	break;
	case ((NU8) 55):
	{
		message_197976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3254));
		result = semexpr_487201(c, (*n).kindU.S6.Sons->data[0], flags);
	}
	break;
	case ((NU8) 132):
	case ((NU8) 134):
	case ((NU8) 140) ... ((NU8) 149):
	case ((NU8) 136):
	{
		ttype225852* typ;
		ttype225852* LOC108;
		LOC108 = 0;
		LOC108 = semtypenode_487269(c, n, NIM_NIL);
		typ = skiptypes_230245(LOC108, IL64(562949953421568));
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_290763(c, typ));
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		NU8 mode;
		tsym225846* s;
		checkminsonslen_291426(n, 1);
		{
			if (!(((*n).Flags &(1<<((((NU8) 8))&15)))!=0)) goto LA112;
			mode = 0;
		}
		goto LA110;
		LA112: ;
		{
			mode = 2;
		}
		LA110: ;
		s = qualifiedlookup_296122(c, (*n).kindU.S6.Sons->data[0], mode);
		{
			if (!!((s == NIM_NIL))) goto LA117;
			switch ((*s).Kind) {
			case ((NU8) 17):
			{
				{
					if (!!((((*s).Flags &(1<<((((NU8) 25))&31)))!=0))) goto LA122;
					result = semdirectop_488032(c, n, flags);
				}
				goto LA120;
				LA122: ;
				{
					result = semmacroexpr_488066(c, n, n, s, flags);
				}
				LA120: ;
			}
			break;
			case ((NU8) 18):
			{
				{
					if (!!((((*s).Flags &(1<<((((NU8) 25))&31)))!=0))) goto LA128;
					result = semdirectop_488032(c, n, flags);
				}
				goto LA126;
				LA128: ;
				{
					result = semtemplateexpr_488055(c, n, s, flags);
				}
				LA126: ;
			}
			break;
			case ((NU8) 7):
			{
				{
					NI LOC134;
					LOC134 = 0;
					LOC134 = len_226364(n);
					if (!(LOC134 == 2)) goto LA135;
					result = semconv_530168(c, n);
				}
				goto LA132;
				LA135: ;
				{
					NI LOC138;
					LOC138 = 0;
					LOC138 = len_226364(n);
					if (!(LOC138 == 1)) goto LA139;
					result = semobjconstr_534462(c, n, flags);
				}
				goto LA132;
				LA139: ;
				{
					NIM_BOOL LOC142;
					LOC142 = 0;
					LOC142 = contains_222837((*c).Ambiguoussymbols, (*s).Sup.Id);
					if (!LOC142) goto LA143;
					localerror_197955((*n).Info, ((NU16) 62), (*(*s).Name).S);
				}
				goto LA132;
				LA143: ;
				{
					if (!((*s).Magic == ((NU16) 0))) goto LA146;
					result = semdirectop_488032(c, n, flags);
				}
				goto LA132;
				LA146: ;
				{
					result = semmagic_540264(c, n, s, flags);
				}
				LA132: ;
			}
			break;
			case ((NU8) 12):
			case ((NU8) 13):
			case ((NU8) 16):
			case ((NU8) 14):
			case ((NU8) 15):
			{
				{
					if (!((*s).Magic == ((NU16) 0))) goto LA152;
					result = semdirectop_488032(c, n, flags);
				}
				goto LA150;
				LA152: ;
				{
					result = semmagic_540264(c, n, s, flags);
				}
				LA150: ;
			}
			break;
			default:
			{
				result = semindirectop_534467(c, n, flags);
			}
			break;
			}
		}
		goto LA115;
		LA117: ;
		{
			NIM_BOOL LOC157;
			tnode225816* LOC158;
			tnode225816* LOC160;
			tnode225816* LOC161;
			LOC157 = 0;
			LOC158 = 0;
			LOC158 = HEX5BHEX5D_226698(n, 0);
			LOC157 = ((*LOC158).Kind == ((NU8) 42));
			if (!(LOC157)) goto LA159;
			LOC160 = 0;
			LOC160 = HEX5BHEX5D_226698(n, 0);
			LOC161 = 0;
			LOC161 = HEX5BHEX5D_226698(LOC160, 0);
			LOC157 = issymchoice_530121(LOC161);
			LA159: ;
			if (!LOC157) goto LA162;
			setgenericparams_543435(c, (*n).kindU.S6.Sons->data[0]);
			result = semdirectop_488032(c, n, flags);
		}
		goto LA115;
		LA162: ;
		{
			NIM_BOOL LOC165;
			LOC165 = 0;
			LOC165 = issymchoice_530121((*n).kindU.S6.Sons->data[0]);
			if (LOC165) goto LA166;
			LOC165 = (((*n).Flags &(1<<((((NU8) 8))&15)))!=0);
			LA166: ;
			if (!LOC165) goto LA167;
			result = semdirectop_488032(c, n, flags);
		}
		goto LA115;
		LA167: ;
		{
			result = semindirectop_534467(c, n, flags);
		}
		LA115: ;
	}
	break;
	case ((NU8) 93):
	{
		{
			if (!((flags &(1<<((((NU8) 3))&15)))!=0)) goto LA173;
			result = semwhen_488040(c, n, NIM_TRUE);
		}
		goto LA171;
		LA173: ;
		{
			result = semwhen_488040(c, n, NIM_FALSE);
			result = semexpr_487201(c, result, flags);
		}
		LA171: ;
	}
	break;
	case ((NU8) 42):
	{
		tsym225846* s;
		checkminsonslen_291426(n, 1);
		s = qualifiedlookup_296122(c, (*n).kindU.S6.Sons->data[0], 2);
		{
			NIM_BOOL LOC179;
			NIM_BOOL LOC180;
			tnode225816* LOC183;
			LOC179 = 0;
			LOC180 = 0;
			LOC180 = !((s == NIM_NIL));
			if (!(LOC180)) goto LA181;
			LOC180 = ((126976 &(1<<(((*s).Kind)&31)))!=0);
			LA181: ;
			LOC179 = LOC180;
			if (LOC179) goto LA182;
			LOC183 = 0;
			LOC183 = HEX5BHEX5D_226698(n, 0);
			LOC179 = ((*LOC183).Kind == ((NU8) 56) || (*LOC183).Kind == ((NU8) 57));
			LA182: ;
			if (!LOC179) goto LA184;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semsymgenericinstantiation_528832(c, (*n).kindU.S6.Sons->data[0], s));
			result = explicitgenericinstantiation_494205(c, n, s);
		}
		goto LA177;
		LA184: ;
		{
			NIM_BOOL LOC187;
			ttype225852* LOC191;
			LOC187 = 0;
			LOC187 = !((s == NIM_NIL));
			if (!(LOC187)) goto LA188;
			LOC187 = ((128 &(1<<(((*s).Kind)&31)))!=0);
			LA188: ;
			if (!LOC187) goto LA189;
			LOC191 = 0;
			LOC191 = semtypenode_487269(c, n, NIM_NIL);
			result = symnodefromtype_488122(c, LOC191, (*n).Info);
		}
		goto LA177;
		LA189: ;
		{
			result = semarrayaccess_537259(c, n, flags);
		}
		LA177: ;
	}
	break;
	case ((NU8) 40):
	{
		tident200021* LOC194;
		tnode225816* LOC195;
		LOC194 = 0;
		LOC194 = getident_200472(((NimStringDesc*) &TMP3286));
		LOC195 = 0;
		LOC195 = buildoverloadedsubscripts_536829(n, LOC194);
		result = semexpr_487201(c, LOC195, flags);
	}
	break;
	case ((NU8) 43):
	{
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3287));
	}
	break;
	case ((NU8) 37):
	{
		NU8 LOC198;
		LOC198 = 0;
		LOC198 = checkpar_541305(n);
		switch (LOC198) {
		case ((NU8) 0):
		{
			result = errornode_291329(c, n);
		}
		break;
		case ((NU8) 3):
		{
			result = semtuplepositionsconstr_541899(c, n, flags);
		}
		break;
		case ((NU8) 2):
		{
			result = semtuplefieldsconstr_541512(c, n, flags);
		}
		break;
		case ((NU8) 1):
		{
			result = semexpr_487201(c, (*n).kindU.S6.Sons->data[0], flags);
		}
		break;
		}
	}
	break;
	case ((NU8) 39):
	{
		result = semsetconstr_540633(c, n);
	}
	break;
	case ((NU8) 41):
	{
		result = semarrayconstr_531588(c, n, flags);
	}
	break;
	case ((NU8) 38):
	{
		result = semobjconstr_534462(c, n, flags);
	}
	break;
	case ((NU8) 51):
	case ((NU8) 52):
	{
		result = semlambda_487261(c, n, flags);
	}
	break;
	case ((NU8) 47):
	{
		result = semderef_536863(c, n);
	}
	break;
	case ((NU8) 63):
	{
		result = n;
		checksonslen_291416(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_487211(c, (*n).kindU.S6.Sons->data[0], 0));
		{
			NU8 LOC211;
			LOC211 = 0;
			LOC211 = isassignable_532184(c, (*n).kindU.S6.Sons->data[0]);
			if (!!(((6 &(1<<((LOC211)&7)))!=0))) goto LA212;
			localerror_197955((*n).Info, ((NU16) 125), ((NimStringDesc*) &TMP2888));
		}
		LA212: ;
		asgnRefNoCycle((void**) (&(*n).Typ), makeptrtype_290200(c, (*(*n).kindU.S6.Sons->data[0]).Typ));
	}
	break;
	case ((NU8) 64):
	case ((NU8) 65):
	{
		checksonslen_291416(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexpr_487201(c, (*n).kindU.S6.Sons->data[0], flags));
	}
	break;
	case ((NU8) 61):
	{
		result = semcast_530461(c, n);
	}
	break;
	case ((NU8) 48):
	case ((NU8) 92):
	{
		result = semif_517734(c, n);
	}
	break;
	case ((NU8) 58):
	case ((NU8) 59):
	case ((NU8) 60):
	case ((NU8) 32):
	{
		checksonslen_291416(n, 2);
	}
	break;
	case ((NU8) 71):
	case ((NU8) 72):
	case ((NU8) 66):
	case ((NU8) 67):
	{
		checksonslen_291416(n, 1);
	}
	break;
	case ((NU8) 68):
	case ((NU8) 69):
	case ((NU8) 70):
	{
		checksonslen_291416(n, 3);
	}
	break;
	case ((NU8) 46):
	{
		checkminsonslen_291426(n, 2);
	}
	break;
	case ((NU8) 54):
	{
		result = semtableconstr_541196(c, n);
	}
	break;
	case ((NU8) 56):
	case ((NU8) 57):
	{
	}
	break;
	case ((NU8) 62):
	{
		result = semstaticexpr_534214(c, n);
	}
	break;
	case ((NU8) 73):
	{
		result = semasgn_537534(c, n);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	{
		result = semblock_542699(c, n);
	}
	break;
	case ((NU8) 115):
	case ((NU8) 126):
	{
		result = semstmtlist_527505(c, n, flags);
	}
	break;
	case ((NU8) 108):
	{
		result = semraise_522655(c, n);
	}
	break;
	case ((NU8) 99):
	{
		result = semvarorlet_519897(c, n, ((NU8) 8));
	}
	break;
	case ((NU8) 100):
	{
		result = semvarorlet_519897(c, n, ((NU8) 9));
	}
	break;
	case ((NU8) 101):
	{
		result = semconst_520603(c, n);
	}
	break;
	case ((NU8) 98):
	{
		result = semtypesection_523891(c, n);
	}
	break;
	case ((NU8) 114):
	{
		result = semdiscard_515111(c, n);
	}
	break;
	case ((NU8) 96):
	{
		result = semwhile_515429(c, n);
	}
	break;
	case ((NU8) 106):
	{
		result = semtry_518853(c, n);
	}
	break;
	case ((NU8) 110):
	case ((NU8) 111):
	{
		result = sembreakorcontinue_515184(c, n);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		result = semfor_522290(c, n);
	}
	break;
	case ((NU8) 97):
	{
		result = semcase_518201(c, n);
	}
	break;
	case ((NU8) 109):
	{
		result = semreturn_537903(c, n);
	}
	break;
	case ((NU8) 124):
	{
		result = semusing_539158(c, n);
	}
	break;
	case ((NU8) 89):
	{
		result = semasm_515406(c, n);
	}
	break;
	case ((NU8) 104):
	{
		result = semyield_538513(c, n);
	}
	break;
	case ((NU8) 90):
	{
		pragma_310079(c, (*(*c).P).Owner, n, TMP3315);
	}
	break;
	case ((NU8) 84):
	{
		result = semiterator_526541(c, n);
	}
	break;
	case ((NU8) 79):
	{
		result = semproc_515723(c, n);
	}
	break;
	case ((NU8) 80):
	{
		result = semmethod_526896(c, n);
	}
	break;
	case ((NU8) 81):
	{
		result = semconverterdef_526956(c, n);
	}
	break;
	case ((NU8) 82):
	{
		result = semmacrodef_527011(c, n);
	}
	break;
	case ((NU8) 83):
	{
		result = semtemplatedef_508258(c, n);
	}
	break;
	case ((NU8) 116):
	{
		{
			NIM_BOOL LOC252;
			LOC252 = 0;
			LOC252 = istoplevel_291437(c);
			if (!!(LOC252)) goto LA253;
			localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3322));
		}
		LA253: ;
		result = evalimport_298004(c, n);
	}
	break;
	case ((NU8) 117):
	{
		{
			NIM_BOOL LOC258;
			LOC258 = 0;
			LOC258 = istoplevel_291437(c);
			if (!!(LOC258)) goto LA259;
			localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3322));
		}
		LA259: ;
		result = evalimportexcept_299211(c, n);
	}
	break;
	case ((NU8) 120):
	{
		{
			NIM_BOOL LOC264;
			LOC264 = 0;
			LOC264 = istoplevel_291437(c);
			if (!!(LOC264)) goto LA265;
			localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3333));
		}
		LA265: ;
		result = evalfrom_298011(c, n);
	}
	break;
	case ((NU8) 121):
	{
		{
			NIM_BOOL LOC270;
			LOC270 = 0;
			LOC270 = istoplevel_291437(c);
			if (!!(LOC270)) goto LA271;
			localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3336));
		}
		LA271: ;
		result = evalinclude_527089(c, n);
	}
	break;
	case ((NU8) 118):
	case ((NU8) 119):
	{
		{
			NIM_BOOL LOC276;
			LOC276 = 0;
			LOC276 = istoplevel_291437(c);
			if (!!(LOC276)) goto LA277;
			localerror_197955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3337));
		}
		LA277: ;
		result = semexport_543058(c, n);
	}
	break;
	case ((NU8) 91):
	{
		result = sempragmablock_527200(c, n);
	}
	break;
	case ((NU8) 113):
	{
		result = semstaticstmt_527330(c, n);
	}
	break;
	default:
	{
		NimStringDesc* LOC282;
		LOC282 = 0;
		LOC282 = rendertree_250058(n, 4);
		localerror_197955((*n).Info, ((NU16) 168), LOC282);
	}
	break;
	}
	{
		if (!!((result == NIM_NIL))) goto LA285;
		(*result).Flags |= ((NI16)1)<<((((NU8) 6))%(sizeof(NI16)*8));
	}
	LA285: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semexprwithtype_487211)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = semexpr_487201(c, n, (flags | 64));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = result == 0;
		if (LOC3) goto LA4;
		LOC3 = ((*result).Kind == ((NU8) 1));
		LA4: ;
		if (!LOC3) goto LA5;
		result = errornode_291329(c, n);
	}
	LA5: ;
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC13;
		LOC9 = 0;
		LOC9 = ((*result).Typ == NIM_NIL);
		if (LOC9) goto LA10;
		LOC9 = ((*result).Typ == enforcevoidcontext_515110);
		LA10: ;
		if (!LOC9) goto LA11;
		LOC13 = 0;
		LOC13 = rendertree_250058(result, 4);
		localerror_197955((*n).Info, ((NU16) 90), LOC13);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_291319(c));
	}
	goto LA7;
	LA11: ;
	{
		semprocvarcheck_515664(c, result);
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA17;
			result = newderef_517404(result);
		}
		LA17: ;
		semdestructorcheck_517185(c, result, flags);
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode225816*, semconstexpr_488503)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tnode225816* e;
	result = 0;
	e = semexprwithtype_487211(c, n, 0);
	{
		if (!(e == NIM_NIL)) goto LA3;
		localerror_197955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
		result = n;
		goto BeforeRet;
	}
	LA3: ;
	result = getconstexpr_304004((*c).Module, e);
	{
		if (!(result == NIM_NIL)) goto LA7;
		result = evalconstexpr_477226((*c).Module, e);
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = (result == NIM_NIL);
			if (LOC11) goto LA12;
			LOC11 = ((*result).Kind == ((NU8) 1));
			LA12: ;
			if (!LOC11) goto LA13;
			{
				NIM_BOOL LOC17;
				LOC17 = 0;
				LOC17 = HEX3DHEX3D_197579((*e).Info, (*n).Info);
				if (!!(LOC17)) goto LA18;
				pushinfocontext_196930((*n).Info);
				localerror_197955((*e).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
				popinfocontext_196957();
			}
			goto LA15;
			LA18: ;
			{
				localerror_197955((*e).Info, ((NU16) 104), ((NimStringDesc*) &TMP2888));
			}
			LA15: ;
			result = e;
		}
		goto LA9;
		LA13: ;
		{
			result = fixuptypeaftereval_488201(c, result, e);
		}
		LA9: ;
	}
	LA7: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, tryconstexpr_488423)(tcontext290021* c, tnode225816* n) {
	tnode225816* volatile result;
	tnode225816* e;
	NI olderrorcount;
	NI olderrormax;
	NU8 olderroroutputs;
	TSafePoint TMP3340;
	result = 0;
	e = semexprwithtype_487211(c, n, 0);
	{
		if (!(e == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = getconstexpr_304004((*c).Module, e);
	{
		if (!!((result == NIM_NIL))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	olderrorcount = gerrorcounter_196306;
	olderrormax = gerrormax_196309;
	olderroroutputs = erroroutputs_196440;
	erroroutputs_196440 = 0;
	gerrormax_196309 = 2147483647;
	pushSafePoint(&TMP3340);
	TMP3340.status = _setjmp(TMP3340.context);
	if (TMP3340.status == 0) {
		result = evalconstexpr_477226((*c).Module, e);
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = (result == NIM_NIL);
			if (LOC12) goto LA13;
			LOC12 = ((*result).Kind == ((NU8) 1));
			LA13: ;
			if (!LOC12) goto LA14;
			result = NIM_NIL;
		}
		goto LA10;
		LA14: ;
		{
			result = fixuptypeaftereval_488201(c, result, e);
		}
		LA10: ;
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI195545))) {
			TMP3340.status = 0;
			result = NIM_NIL;
			popCurrentException();
		}
	}
	if (TMP3340.status != 0) reraiseException();
	gerrorcounter_196306 = olderrorcount;
	gerrormax_196309 = olderrormax;
	erroroutputs_196440 = olderroroutputs;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, semoperand_528624)(tcontext290021* c, tnode225816* n, NU16 flags) {
	tnode225816* result;
	result = 0;
	result = semexpr_487201(c, n, (flags | 128));
	{
		if (!((*result).Kind == ((NU8) 1))) goto LA3;
		result = errornode_291329(c, n);
	}
	LA3: ;
	{
		if (!!(((*result).Typ == NIM_NIL))) goto LA7;
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA11;
			result = newderef_517404(result);
		}
		LA11: ;
	}
	goto LA5;
	LA7: ;
	{
		if (!((flags &(1<<((((NU8) 3))&15)))!=0)) goto LA14;
		asgnRefNoCycle((void**) (&(*result).Typ), newtypes_290214(((NU8) 3), c));
	}
	goto LA5;
	LA14: ;
	{
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rendertree_250058(result, 4);
		localerror_197955((*n).Info, ((NU16) 90), LOC17);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_291319(c));
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode225816*, seminferredlambda_524857)(tcontext290021* c, tidtable225864 pt, tnode225816* n_524861) {
	tnode225816* result;
	tnode225816* n;
	tscope225840* LOC1;
	tsym225846* s;
	tnode225816* sembody;
	tnode225816* LOC2;
	result = 0;
	n = n_524861;
	n = replacetypesinbody_320489(c, pt, n);
	result = n;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), emptynode_226738);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[3]), (*(*n).Typ).N);
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	addparams_487293(c, (*(*n).Typ).N, ((NU8) 12));
	pushproccon_290381(c, s);
	addresult_524075(c, (*(*n).Typ).Sons->data[0], (*n).Info, ((NU8) 12));
	LOC2 = 0;
	LOC2 = semprocbody_487238(c, (*n).kindU.S6.Sons->data[6]);
	sembody = hlobody_489479(c, LOC2);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_441373((*c).Module, sembody, (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym));
	addresultnode_524118(c, n);
	popproccon_290426(c);
	closescope_295211(c);
	asgnRefNoCycle((void**) (&(*s).Ast), result);
	return result;
}

N_NIMCALL(tpasscontext286005*, myopen_544456)(tsym225846* module) {
	tpasscontext286005* result;
	tcontext290021* c;
	TY290116 LOC5;
	TY290122 LOC6;
	result = 0;
	c = newcontext_290170(module);
	{
		if (!!(((*c).P == NIM_NIL))) goto LA3;
		internalerror_197987((*module).Info, ((NimStringDesc*) &TMP1979));
	}
	LA3: ;
	(*c).Semconstexpr = semconstexpr_488503;
	(*c).Semexpr = semexpr_487201;
	(*c).Semtryexpr = tryexpr_487317;
	(*c).Semtryconstexpr = tryconstexpr_488423;
	(*c).Semoperand = semoperand_528624;
	(*c).Semconstboolexpr = semconstboolexpr_495064;
	(*c).Semoverloadedcall = semoverloadedcall_494100;
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	LOC5.ClPrc = ((TMP3341) (seminferredlambda_524857)); LOC5.ClEnv = NIM_NIL;
	asgnRef((void**) (&(*c).Seminferredlambda.ClEnv), LOC5.ClEnv);
	(*c).Seminferredlambda.ClPrc = LOC5.ClPrc;
	memset((void*)(&LOC6), 0, sizeof(LOC6));
	LOC6.ClPrc = ((TMP3342) (generateinstance_490802)); LOC6.ClEnv = NIM_NIL;
	asgnRef((void**) (&(*c).Semgenerateinstance.ClEnv), LOC6.ClEnv);
	(*c).Semgenerateinstance.ClPrc = LOC6.ClPrc;
	(*c).Semtypenode = semtypenode_487269;
	(*c).Instdeepcopy = instdeepcopy_414518;
	pushproccon_290381(c, module);
	pushowner_290261((*c).Module);
	asgnRef((void**) (&(*c).Importtable), openscope_295191(c));
	strtableadd_235103((&(*(*c).Importtable).Symbols), module);
	{
		if (!(((*module).Flags &(1<<((((NU8) 13))&31)))!=0)) goto LA9;
		asgnRefNoCycle((void**) (&systemmodule_282019), module);
	}
	goto LA7;
	LA9: ;
	{
		strtableadd_235103((&(*(*c).Importtable).Symbols), systemmodule_282019);
		importallsymbols_298679(c, systemmodule_282019);
	}
	LA7: ;
	asgnRef((void**) (&(*c).Toplevelscope), openscope_295191(c));
	result = &c->Sup;
	return result;
}

N_NIMCALL(tpasscontext286005*, myopencached_544499)(tsym225846* module, trodreader276030* rd) {
	tpasscontext286005* result;
	result = 0;
	result = myopen_544456(module);
	{
		tsym225846* m_544516;
		tsymseq225818* HEX3Atmp_544518;
		NI i_544521;
		NI l_544523;
		m_544516 = 0;
		HEX3Atmp_544518 = 0;
		HEX3Atmp_544518 = (*rd).Methods;
		i_544521 = 0;
		l_544523 = HEX3Atmp_544518->Sup.len;
		{
			while (1) {
				if (!(i_544521 < l_544523)) goto LA3;
				m_544516 = HEX3Atmp_544518->data[i_544521];
				methoddef_422824(m_544516, NIM_TRUE);
				i_544521 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(void, addcodeforgenerics_544323)(tcontext290021* c, tnode225816* n) {
	{
		NI i_544350;
		NI HEX3Atmp_544435;
		NI HEX3Atmp_544436;
		NI res_544439;
		i_544350 = 0;
		HEX3Atmp_544435 = 0;
		HEX3Atmp_544436 = 0;
		HEX3Atmp_544435 = (*c).Lastgenericidx;
		HEX3Atmp_544436 = (NI32)((*c).Generics->Sup.len - 1);
		res_544439 = HEX3Atmp_544435;
		{
			while (1) {
				tsym225846* prc;
				if (!(res_544439 <= HEX3Atmp_544436)) goto LA3;
				i_544350 = res_544439;
				prc = (*(*c).Generics->data[i_544350].Inst).Sym;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = ((77824 &(1<<(((*prc).Kind)&31)))!=0);
					if (!(LOC6)) goto LA7;
					LOC6 = ((*prc).Magic == ((NU16) 0));
					LA7: ;
					if (!LOC6) goto LA8;
					{
						NIM_BOOL LOC12;
						NimStringDesc* LOC16;
						LOC12 = 0;
						LOC12 = ((*prc).Ast == NIM_NIL);
						if (LOC12) goto LA13;
						LOC12 = ((*(*prc).Ast).kindU.S6.Sons->data[6] == NIM_NIL);
						LA13: ;
						if (!LOC12) goto LA14;
						LOC16 = 0;
						LOC16 = rawNewString((*(*prc).Name).S->Sup.len + 12);
appendString(LOC16, ((NimStringDesc*) &TMP3345));
appendString(LOC16, (*(*prc).Name).S);
						internalerror_197987((*prc).Info, LOC16);
					}
					goto LA10;
					LA14: ;
					{
						addson_226287(n, (*prc).Ast);
					}
					LA10: ;
				}
				LA8: ;
				res_544439 += 1;
			} LA3: ;
		}
	}
	(*c).Lastgenericidx = (*c).Generics->Sup.len;
}

N_NIMCALL(tnode225816*, hlostmt_489511)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*c).Patterns->Sup.len == 0);
		if (LOC3) goto LA4;
		LOC3 = !(((goptions_169116 &(1<<((((NU8) 21))&31)))!=0));
		LA4: ;
		if (!LOC3) goto LA5;
		result = n;
		goto BeforeRet;
	}
	LA5: ;
	(*c).Hloloopdetector = 0;
	result = hlo_488575(c, n);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, buildechostmt_535137)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	tsym225846* e;
	tident200021* LOC1;
	result = 0;
	result = newnodei_226138(((NU8) 27), (*n).Info);
	LOC1 = 0;
	LOC1 = getident_200472(((NimStringDesc*) &TMP3346));
	e = strtableget_235111((*systemmodule_282019).kindU.S3.Tab, LOC1);
	{
		tnode225816* LOC6;
		if (!!((e == NIM_NIL))) goto LA4;
		LOC6 = 0;
		LOC6 = newsymnode_226132(e);
		add_226498(result, LOC6);
	}
	goto LA2;
	LA4: ;
	{
		tnode225816* LOC8;
		localerror_197955((*n).Info, ((NU16) 64), ((NimStringDesc*) &TMP3347));
		LOC8 = 0;
		LOC8 = errornode_291329(c, n);
		add_226498(result, LOC8);
	}
	LA2: ;
	add_226498(result, n);
	result = semexpr_487201(c, result, 0);
	return result;
}

N_NIMCALL(tnode225816*, semstmtandgenerategenerics_544539)(tcontext290021* c, tnode225816* n) {
	tnode225816* result;
	result = 0;
	result = semstmt_487277(c, n);
	{
		tnode225816* a;
		if (!((*c).Lastgenericidx < (*c).Generics->Sup.len)) goto LA3;
		a = newnodei_226138(((NU8) 115), (*n).Info);
		addcodeforgenerics_544323(c, a);
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = sonslen_226249(a);
			if (!(0 < LOC7)) goto LA8;
			{
				if (!!(((*result).Kind == ((NU8) 1)))) goto LA12;
				addson_226287(a, result);
			}
			LA12: ;
			result = a;
		}
		LA8: ;
	}
	LA3: ;
	result = hlostmt_489511(c, result);
	{
		NIM_BOOL LOC16;
		NIM_BOOL LOC18;
		LOC16 = 0;
		LOC16 = (gcmd_169120 == ((NU8) 18));
		if (!(LOC16)) goto LA17;
		LOC18 = 0;
		LOC18 = isemptytype_232990((*result).Typ);
		LOC16 = !(LOC18);
		LA17: ;
		if (!LOC16) goto LA19;
		result = buildechostmt_535137(c, result);
	}
	LA19: ;
	result = transformstmt_441607((*c).Module, result);
	return result;
}

N_NIMCALL(void, recovercontext_544582)(tcontext290021* c) {
	asgnRef((void**) (&(*c).Currentscope), (*c).Toplevelscope);
	{
		while (1) {
			tsym225846* LOC3;
			LOC3 = 0;
			LOC3 = getcurrowner_290256();
			if (!!(((*LOC3).Kind == ((NU8) 6)))) goto LA2;
			popowner_290267();
		} LA2: ;
	}
	{
		while (1) {
			NIM_BOOL LOC6;
			LOC6 = 0;
			LOC6 = !(((*c).P == NIM_NIL));
			if (!(LOC6)) goto LA7;
			LOC6 = !(((*(*(*c).P).Owner).Kind == ((NU8) 6)));
			LA7: ;
			if (!LOC6) goto LA5;
			asgnRef((void**) (&(*c).P), (*(*c).P).Next);
		} LA5: ;
	}
}

static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache) {
	NIM_BOOL result;
	result = 0;
	{
		if (!(obj == subclass)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*obj).base == subclass)) goto LA7;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!(cache[(0)- 0] == obj)) goto LA11;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA11: ;
	{
		if (!(cache[(1)- 0] == obj)) goto LA15;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA15: ;
	result = isobjslowpath_21825(obj, subclass, cache);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, myprocess_544640)(tpasscontext286005* context, tnode225816* n) {
	tnode225816* volatile result;
	tcontext290021* c;
	result = 0;
	c = ((tcontext290021*) (context));
	{
		if (!(gerrormax_196309 <= 1)) goto LA3;
		result = semstmtandgenerategenerics_544539(c, n);
	}
	goto LA1;
	LA3: ;
	{
		NI oldcontextlen;
		NI oldingenericinst;
		TSafePoint TMP3348;
		oldcontextlen = getinfocontextlen_196885();
		oldingenericinst = (*c).Ingenericinst;
		pushSafePoint(&TMP3348);
		TMP3348.status = _setjmp(TMP3348.context);
		if (TMP3348.status == 0) {
			result = semstmtandgenerategenerics_544539(c, n);
			popSafePoint();
		}
		else {
			popSafePoint();
			if (isObj(getCurrentException()->Sup.m_type, (&NTI195545))||isObj(getCurrentException()->Sup.m_type, (&NTI195547))) {
				TMP3348.status = 0;
				recovercontext_544582(c);
				(*c).Ingenericinst = oldingenericinst;
				setinfocontextlen_196905(oldcontextlen);
				{
					Exception* LOC11;
					LOC11 = 0;
					LOC11 = getCurrentException();
					if (!((LOC11) && (isObjWithCache((*LOC11).Sup.m_type, (&NTI195547), Nim_OfCheck_CACHE1)))) goto LA12;
					result = NIM_NIL;
				}
				goto LA9;
				LA12: ;
				{
					result = emptynode_226738;
				}
				LA9: ;
				popCurrentException();
			}
		}
		if (TMP3348.status != 0) reraiseException();
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode225816*, myclose_544656)(tpasscontext286005* context, tnode225816* n) {
	tnode225816* result;
	tcontext290021* c;
	result = 0;
	c = ((tcontext290021*) (context));
	closescope_295211(c);
	rawclosescope_295202(c);
	result = newnode_226090(((NU8) 115));
	{
		if (!!((n == NIM_NIL))) goto LA3;
		internalerror_197987((*n).Info, ((NimStringDesc*) &TMP3349));
	}
	LA3: ;
	addcodeforgenerics_544323(c, result);
	{
		if (!!(((*(*c).Module).Ast == NIM_NIL))) goto LA7;
		add_226498(result, (*(*c).Module).Ast);
	}
	LA7: ;
	popowner_290267();
	popproccon_290426(c);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_semInit)(void) {
	ttype225852* LOC1;
	ttype225852* LOC2;
	tident200021* LOC3;
	tlineinfo195539 LOC4;
	LOC1 = 0;
	LOC1 = (ttype225852*) newObj((&NTI225812), sizeof(ttype225852));
	(*LOC1).Sup.Sup.m_type = (&NTI225852);
	(*LOC1).Kind = ((NU8) 6);
	asgnRefNoCycle((void**) (&commontypebegin_487459), LOC1);
	asgnRefNoCycle((void**) (&typedescid_500285), getident_200472(((NimStringDesc*) &TMP953)));
	LOC2 = 0;
	LOC2 = (ttype225852*) newObj((&NTI225812), sizeof(ttype225852));
	(*LOC2).Sup.Sup.m_type = (&NTI225852);
	(*LOC2).Kind = ((NU8) 7);
	asgnRefNoCycle((void**) (&enforcevoidcontext_515110), LOC2);
	if (analyzingdestructor_515727) nimGCunrefNoCycle(analyzingdestructor_515727);
	analyzingdestructor_515727 = (tsym225846*) newObjRC1((&NTI225814), sizeof(tsym225846));
	(*analyzingdestructor_515727).Sup.Sup.m_type = (&NTI225846);
	if (destructoristrivial_515728) nimGCunrefNoCycle(destructoristrivial_515728);
	destructoristrivial_515728 = (tsym225846*) newObjRC1((&NTI225814), sizeof(tsym225846));
	(*destructoristrivial_515728).Sup.Sup.m_type = (&NTI225846);
	asgnRefNoCycle((void**) (&destructorname_515761), getident_200472(((NimStringDesc*) &TMP954)));
	asgnRefNoCycle((void**) (&destructorparam_515762), getident_200472(((NimStringDesc*) &TMP955)));
	LOC3 = 0;
	LOC3 = getident_200472(((NimStringDesc*) &TMP956));
	LOC4 = unknownlineinfo_196405();
	asgnRefNoCycle((void**) (&destructorpragma_515763), newidentnode_226125(LOC3, LOC4));
}

NIM_EXTERNC N_NOINLINE(void, HEX00_semDatInit)(void) {
static TNimNode* TMP3024[5];
static TNimNode* TMP3870[2];
static TNimNode TMP858[9];
NTI501454.size = sizeof(TY501454);
NTI501454.kind = 18;
NTI501454.base = 0;
TMP3024[0] = &TMP858[1];
TMP858[1].kind = 1;
TMP858[1].offset = offsetof(TY501454, HEX3Astate);
TMP858[1].typ = (&NTI357033);
TMP858[1].name = ":state";
TMP3024[1] = &TMP858[2];
TMP858[2].kind = 1;
TMP858[2].offset = offsetof(TY501454, Paramname500297);
TMP858[2].typ = (&NTI149);
TMP858[2].name = "paramName500297";
TMP3024[2] = &TMP858[3];
TMP858[3].kind = 1;
TMP858[3].offset = offsetof(TY501454, Genericparams500295);
TMP858[3].typ = (&NTI225808);
TMP858[3].name = "genericParams500295";
TMP3024[3] = &TMP858[4];
TMP858[4].kind = 1;
TMP858[4].offset = offsetof(TY501454, Info500298);
TMP858[4].typ = (&NTI195539);
TMP858[4].name = "info500298";
TMP3024[4] = &TMP858[5];
TMP858[5].kind = 1;
TMP858[5].offset = offsetof(TY501454, C500293);
TMP858[5].typ = (&NTI290019);
TMP858[5].name = "c500293";
TMP858[0].len = 5; TMP858[0].kind = 2; TMP858[0].sons = &TMP3024[0];
NTI501454.node = &TMP858[0];
NTI501512.size = sizeof(TY501454*);
NTI501512.kind = 22;
NTI501512.base = (&NTI501454);
NTI501512.marker = TMP3025;
NTI516908.size = sizeof(TY516908);
NTI516908.kind = 18;
NTI516908.base = 0;
NTI516908.flags = 2;
TMP3870[0] = &TMP858[7];
TMP858[7].kind = 1;
TMP858[7].offset = offsetof(TY516908, Field0);
TMP858[7].typ = (&NTI225808);
TMP858[7].name = "Field0";
TMP3870[1] = &TMP858[8];
TMP858[8].kind = 1;
TMP858[8].offset = offsetof(TY516908, Field1);
TMP858[8].typ = (&NTI225808);
TMP858[8].name = "Field1";
TMP858[6].len = 2; TMP858[6].kind = 2; TMP858[6].sons = &TMP3870[0];
NTI516908.node = &TMP858[6];
}

